Deleted Added
full compact
proto.m4 (71345) proto.m4 (77349)
1divert(-1)
2#
3# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
4# All rights reserved.
5# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
6# Copyright (c) 1988, 1993
7# The Regents of the University of California. All rights reserved.
8#
9# By using this file, you agree to the terms and conditions set
10# forth in the LICENSE file which can be found at the top level of
11# the sendmail distribution.
12#
13#
14divert(0)
15
1divert(-1)
2#
3# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
4# All rights reserved.
5# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
6# Copyright (c) 1988, 1993
7# The Regents of the University of California. All rights reserved.
8#
9# By using this file, you agree to the terms and conditions set
10# forth in the LICENSE file which can be found at the top level of
11# the sendmail distribution.
12#
13#
14divert(0)
15
16VERSIONID(`$Id: proto.m4,v 8.446.2.5.2.38 2000/12/28 03:37:28 ca Exp $')
16VERSIONID(`$Id: proto.m4,v 8.446.2.5.2.41 2001/05/23 21:32:16 ca Exp $')
17
18MAILER(local)dnl
19
20# level CF_LEVEL config file format
21V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
22divert(-1)
23
24# do some sanity checking

--- 47 unchanged lines hidden (view full) ---

72
73# clean option definitions below....
74define(`_OPTION', `ifdef(`$2', `O $1`'ifelse(defn(`$2'), `',, `=$2')', `#O $1`'ifelse(`$3', `',,`=$3')')')dnl
75
76dnl required to "rename" the check_* rulesets...
77define(`_U_',ifdef(`_DELAY_CHECKS_',`',`_'))
78dnl default relaying denied message
79ifdef(`confRELAY_MSG', `', `define(`confRELAY_MSG', `"550 Relaying denied"')')
17
18MAILER(local)dnl
19
20# level CF_LEVEL config file format
21V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
22divert(-1)
23
24# do some sanity checking

--- 47 unchanged lines hidden (view full) ---

72
73# clean option definitions below....
74define(`_OPTION', `ifdef(`$2', `O $1`'ifelse(defn(`$2'), `',, `=$2')', `#O $1`'ifelse(`$3', `',,`=$3')')')dnl
75
76dnl required to "rename" the check_* rulesets...
77define(`_U_',ifdef(`_DELAY_CHECKS_',`',`_'))
78dnl default relaying denied message
79ifdef(`confRELAY_MSG', `', `define(`confRELAY_MSG', `"550 Relaying denied"')')
80define(`CODE553', `553')
80divert(0)dnl
81
82# override file safeties - setting this option compromises system security,
83# addressing the actual file configuration problem is preferred
84# need to set this before any file actions are encountered in the cf file
85_OPTION(DontBlameSendmail, `confDONT_BLAME_SENDMAIL', `safe')
86
87# default LDAP map specification

--- 128 unchanged lines hidden (view full) ---

216###############
217# Options #
218###############
219
220# strip message body to 7 bits on input?
221_OPTION(SevenBitInput, `confSEVEN_BIT_INPUT', `False')
222
223# 8-bit data handling
81divert(0)dnl
82
83# override file safeties - setting this option compromises system security,
84# addressing the actual file configuration problem is preferred
85# need to set this before any file actions are encountered in the cf file
86_OPTION(DontBlameSendmail, `confDONT_BLAME_SENDMAIL', `safe')
87
88# default LDAP map specification

--- 128 unchanged lines hidden (view full) ---

217###############
218# Options #
219###############
220
221# strip message body to 7 bits on input?
222_OPTION(SevenBitInput, `confSEVEN_BIT_INPUT', `False')
223
224# 8-bit data handling
224_OPTION(EightBitMode, `confEIGHT_BIT_HANDLING', `adaptive')
225_OPTION(EightBitMode, `confEIGHT_BIT_HANDLING', `pass8')
225
226# wait for alias file rebuild (default units: minutes)
227_OPTION(AliasWait, `confALIAS_WAIT', `5m')
228
229# location of alias file
230_OPTION(AliasFile, `ALIAS_FILE', `MAIL_SETTINGS_DIR`'aliases')
231
232# minimum number of free blocks on filesystem

--- 629 unchanged lines hidden (view full) ---

862# Parse0 -- do initial syntax checking and eliminate local addresses.
863# This should either return with the (possibly modified) input
864# or return with a #error mailer. It should not return with a
865# #mailer other than the #error mailer.
866#
867
868SParse0
869R<@> $@ <@> special case error msgs
226
227# wait for alias file rebuild (default units: minutes)
228_OPTION(AliasWait, `confALIAS_WAIT', `5m')
229
230# location of alias file
231_OPTION(AliasFile, `ALIAS_FILE', `MAIL_SETTINGS_DIR`'aliases')
232
233# minimum number of free blocks on filesystem

--- 629 unchanged lines hidden (view full) ---

863# Parse0 -- do initial syntax checking and eliminate local addresses.
864# This should either return with the (possibly modified) input
865# or return with a #error mailer. It should not return with a
866# #mailer other than the #error mailer.
867#
868
869SParse0
870R<@> $@ <@> special case error msgs
870R$* : $* ; <@> $#error $@ 5.1.3 $: "501 List:; syntax illegal for recipient addresses"
871R$* : $* ; <@> $#error $@ 5.1.3 $: "CODE553 List:; syntax illegal for recipient addresses"
871R@ <@ $* > < @ $1 > catch "@@host" bogosity
872R@ <@ $* > < @ $1 > catch "@@host" bogosity
872R<@ $+> $#error $@ 5.1.3 $: "501 User address required"
873R<@ $+> $#error $@ 5.1.3 $: "CODE553 User address required"
873R$* $: <> $1
874R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
874R$* $: <> $1
875R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
875R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "501 Colon illegal in host name part"
876R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "CODE553 Colon illegal in host name part"
876R<> $* $1
877R<> $* $1
877R$* < @ . $* > $* $#error $@ 5.1.2 $: "501 Invalid host name"
878R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "501 Invalid host name"
878R$* < @ . $* > $* $#error $@ 5.1.2 $: "CODE553 Invalid host name"
879R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "CODE553 Invalid host name"
879dnl comma only allowed before @; this check is not complete
880dnl comma only allowed before @; this check is not complete
880R$* , $~O $* $#error $@ 5.1.2 $: "501 Invalid route address"
881R$* , $~O $* $#error $@ 5.1.2 $: "CODE553 Invalid route address"
881
882# now delete the local info -- note $=O to find characters that cause forwarding
883R$* < @ > $* $@ $>Parse0 $>canonify $1 user@ => user
884R< @ $=w . > : $* $@ $>Parse0 $>canonify $2 @here:... -> ...
885R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
882
883# now delete the local info -- note $=O to find characters that cause forwarding
884R$* < @ > $* $@ $>Parse0 $>canonify $1 user@ => user
885R< @ $=w . > : $* $@ $>Parse0 $>canonify $2 @here:... -> ...
886R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
886R< @ $+ > $#error $@ 5.1.3 $: "501 User address required"
887R< @ $+ > $#error $@ 5.1.3 $: "CODE553 User address required"
887R$* $=O $* < @ $=w . > $@ $>Parse0 $>canonify $1 $2 $3 ...@here -> ...
888R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
888R$* $=O $* < @ $=w . > $@ $>Parse0 $>canonify $1 $2 $3 ...@here -> ...
889R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
889R< @ *LOCAL* > $#error $@ 5.1.3 $: "501 User address required"
890R< @ *LOCAL* > $#error $@ 5.1.3 $: "CODE553 User address required"
890R$* $=O $* < @ *LOCAL* >
891 $@ $>Parse0 $>canonify $1 $2 $3 ...@*LOCAL* -> ...
892R$* < @ *LOCAL* > $: $1
893
894#
895# Parse1 -- the bottom half of ruleset 0.
896#
897

--- 32 unchanged lines hidden (view full) ---

930dnl @domain if +detail exists
931R<@> $+ + $* < @ $+ . > $: < $(virtuser @ $3 $@ $1 $@ $2 $: @ $) > $1 + $2 < @ $3 . >
932dnl without +detail (or no match)
933R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
934R<@> $+ $: $1
935R<!> $+ $: $1
936R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
937R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
891R$* $=O $* < @ *LOCAL* >
892 $@ $>Parse0 $>canonify $1 $2 $3 ...@*LOCAL* -> ...
893R$* < @ *LOCAL* > $: $1
894
895#
896# Parse1 -- the bottom half of ruleset 0.
897#
898

--- 32 unchanged lines hidden (view full) ---

931dnl @domain if +detail exists
932R<@> $+ + $* < @ $+ . > $: < $(virtuser @ $3 $@ $1 $@ $2 $: @ $) > $1 + $2 < @ $3 . >
933dnl without +detail (or no match)
934R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
935R<@> $+ $: $1
936R<!> $+ $: $1
937R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
938R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
938R< $+ > $+ < @ $+ > $: $>Recurse $1',
939`dnl')
939ifdef(`_NO_VIRTUSER_RECURSION_',
940`R< $+ > $+ < @ $+ > $: $>ParseLocal $>Parse0 $>canonify $1',
941`R< $+ > $+ < @ $+ > $: $>Recurse $1')
942dnl', `dnl')
940
941# short circuit local delivery so forwarded email works
942ifdef(`_MAILER_usenet_', `dnl
943R$+ . USENET < @ $=w . > $#usenet $@ usenet $: $1 handle usenet specially', `dnl')
944
945
946ifdef(`_STICKY_LOCAL_DOMAIN_',
947`R$+ < @ $=w . > $: < $H > $1 < @ $2 . > first try hub

--- 60 unchanged lines hidden (view full) ---

1008undivert(1)', `dnl')
1009
1010# pass names that still have a host to a smarthost (if defined)
1011R$* < @ $* > $* $: $>MailerToTriple < $S > $1 < @ $2 > $3 glue on smarthost name
1012
1013# deal with other remote names
1014ifdef(`_MAILER_smtp_',
1015`R$* < @$* > $* $#_SMTP_ $@ $2 $: $1 < @ $2 > $3 user@host.domain',
943
944# short circuit local delivery so forwarded email works
945ifdef(`_MAILER_usenet_', `dnl
946R$+ . USENET < @ $=w . > $#usenet $@ usenet $: $1 handle usenet specially', `dnl')
947
948
949ifdef(`_STICKY_LOCAL_DOMAIN_',
950`R$+ < @ $=w . > $: < $H > $1 < @ $2 . > first try hub

--- 60 unchanged lines hidden (view full) ---

1011undivert(1)', `dnl')
1012
1013# pass names that still have a host to a smarthost (if defined)
1014R$* < @ $* > $* $: $>MailerToTriple < $S > $1 < @ $2 > $3 glue on smarthost name
1015
1016# deal with other remote names
1017ifdef(`_MAILER_smtp_',
1018`R$* < @$* > $* $#_SMTP_ $@ $2 $: $1 < @ $2 > $3 user@host.domain',
1016`R$* < @$* > $* $#error $@ 5.1.2 $: "501 Unrecognized host name " $2')
1019`R$* < @$* > $* $#error $@ 5.1.2 $: "CODE553 Unrecognized host name " $2')
1017
1018# handle locally delivered names
1019R$=L $#_LOCAL_ $: @ $1 special local names
1020R$+ $#_LOCAL_ $: $1 regular local names
1021
1022###########################################################################
1023### Ruleset 5 -- special rewriting after aliases have been expanded ###
1024###########################################################################

--- 492 unchanged lines hidden (view full) ---

1517dnl workspace: < ? $&{client_name} > <user@localhost|host>
1518dnl or: <@> <address>
1519dnl or: <?> <address> (thanks to u in ${daemon_flags})
1520R<@> $* $: $1 no localhost as domain
1521dnl workspace: < ? $&{client_name} > <user@localhost|host>
1522dnl or: <address>
1523dnl or: <?> <address> (thanks to u in ${daemon_flags})
1524R<? $=w> $* $: $2 local client: ok
1020
1021# handle locally delivered names
1022R$=L $#_LOCAL_ $: @ $1 special local names
1023R$+ $#_LOCAL_ $: $1 regular local names
1024
1025###########################################################################
1026### Ruleset 5 -- special rewriting after aliases have been expanded ###
1027###########################################################################

--- 492 unchanged lines hidden (view full) ---

1520dnl workspace: < ? $&{client_name} > <user@localhost|host>
1521dnl or: <@> <address>
1522dnl or: <?> <address> (thanks to u in ${daemon_flags})
1523R<@> $* $: $1 no localhost as domain
1524dnl workspace: < ? $&{client_name} > <user@localhost|host>
1525dnl or: <address>
1526dnl or: <?> <address> (thanks to u in ${daemon_flags})
1527R<? $=w> $* $: $2 local client: ok
1525R<? $+> <$+> $#error $@ 5.5.4 $: "501 Real domain name required for sender address"
1528R<? $+> <$+> $#error $@ 5.5.4 $: "CODE553 Real domain name required for sender address"
1526dnl remove <?> (happens only if ${client_name} == "" or u in ${daemon_flags})
1527R<?> $* $: $1')
1528dnl workspace: address (or <address>)
1529R$* $: <?> $>CanonAddr $1 canonify sender address and mark it
1530dnl workspace: <?> CanonicalAddress (i.e. address in canonical form localpart<@host>)
1531dnl there is nothing behind the <@host> so no trailing $* needed
1532R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
1533# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)

--- 33 unchanged lines hidden (view full) ---

1567dnl prepend daemon_flags
1568R<?> $* $: $&{daemon_flags} $| <?> $1
1569dnl accept unqualified sender: change mark to avoid test
1570R$* u $* $| <?> $* $: <OK> $3
1571dnl remove daemon_flags
1572R$* $| $* $: $2
1573R<?> $* $: < ? $&{client_name} > $1
1574R<?> $* $@ <OK> ...local unqualed ok
1529dnl remove <?> (happens only if ${client_name} == "" or u in ${daemon_flags})
1530R<?> $* $: $1')
1531dnl workspace: address (or <address>)
1532R$* $: <?> $>CanonAddr $1 canonify sender address and mark it
1533dnl workspace: <?> CanonicalAddress (i.e. address in canonical form localpart<@host>)
1534dnl there is nothing behind the <@host> so no trailing $* needed
1535R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
1536# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)

--- 33 unchanged lines hidden (view full) ---

1570dnl prepend daemon_flags
1571R<?> $* $: $&{daemon_flags} $| <?> $1
1572dnl accept unqualified sender: change mark to avoid test
1573R$* u $* $| <?> $* $: <OK> $3
1574dnl remove daemon_flags
1575R$* $| $* $: $2
1576R<?> $* $: < ? $&{client_name} > $1
1577R<?> $* $@ <OK> ...local unqualed ok
1575R<? $+> $* $#error $@ 5.5.4 $: "501 Domain name required for sender address " $&f
1578R<? $+> $* $#error $@ 5.5.4 $: "CODE553 Domain name required for sender address " $&f
1576 ...remote is not')
1577# check results
1578R<?> $* $: @ $1 mark address: nothing known about it
1579R<OK> $* $@ <OK>
1580R<TEMP> $* $#error $@ 4.1.8 $: "451 Domain of sender address " $&f " does not resolve"
1579 ...remote is not')
1580# check results
1581R<?> $* $: @ $1 mark address: nothing known about it
1582R<OK> $* $@ <OK>
1583R<TEMP> $* $#error $@ 4.1.8 $: "451 Domain of sender address " $&f " does not resolve"
1581R<PERM> $* $#error $@ 5.1.8 $: "501 Domain of sender address " $&f " does not exist"
1584R<PERM> $* $#error $@ 5.1.8 $: "CODE553 Domain of sender address " $&f " does not exist"
1582ifdef(`_ACCESS_TABLE_', `dnl
1583R<$={Accept}> $* $# $1
1584R<DISCARD> $* $#discard $: discard
1585R<REJECT> $* $#error ifdef(`confREJECT_MSG', `$: "confREJECT_MSG"', `$@ 5.7.1 $: "550 Access denied"')
1586dnl error tag
1587R<ERROR:$-.$-.$-:$+> $* $#error $@ $1.$2.$3 $: $4
1588R<ERROR:$+> $* $#error $: $1
1589dnl generic error from access map

--- 516 unchanged lines hidden ---
1585ifdef(`_ACCESS_TABLE_', `dnl
1586R<$={Accept}> $* $# $1
1587R<DISCARD> $* $#discard $: discard
1588R<REJECT> $* $#error ifdef(`confREJECT_MSG', `$: "confREJECT_MSG"', `$@ 5.7.1 $: "550 Access denied"')
1589dnl error tag
1590R<ERROR:$-.$-.$-:$+> $* $#error $@ $1.$2.$3 $: $4
1591R<ERROR:$+> $* $#error $: $1
1592dnl generic error from access map

--- 516 unchanged lines hidden ---