proto.m4 (77349) | proto.m4 (80785) |
---|---|
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.41 2001/05/23 21:32:16 ca Exp $') | 16VERSIONID(`$Id: proto.m4,v 8.446.2.5.2.44 2001/07/31 22:25:49 gshapiro 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 --- 131 unchanged lines hidden (view full) --- 156# possible access_db RHS for spam friends/haters 157C{SpamTag}SPAMFRIEND SPAMHATER')')', 158`dnl') 159 160ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_',`dnl',`dnl 161# Resolve map (to check if a host exists in check_mail) 162Kresolve host -a<OK> -T<TEMP>') 163 | 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 --- 131 unchanged lines hidden (view full) --- 156# possible access_db RHS for spam friends/haters 157C{SpamTag}SPAMFRIEND SPAMHATER')')', 158`dnl') 159 160ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_',`dnl',`dnl 161# Resolve map (to check if a host exists in check_mail) 162Kresolve host -a<OK> -T<TEMP>') 163 |
164ifdef(`_FFR_5_', `# macro storage map 165Kmacro macro') | 164ifdef(`_NEED_MACRO_MAP_', `dnl 165ifdef(`_MACRO_MAP_', `', `# macro storage map 166define(`_MACRO_MAP_', `1')dnl 167Kmacro macro')', `dnl') |
166 167ifdef(`confCR_FILE', `dnl 168# Hosts for which relaying is permitted ($=R) 169FR`'confCR_FILE', 170`dnl') 171 172define(`TLS_SRV_TAG', `TLS_Srv')dnl 173define(`TLS_CLT_TAG', `TLS_Clt')dnl --- 452 unchanged lines hidden (view full) --- 626R$@ $@ <@> 627 628# strip group: syntax (not inside angle brackets!) and trailing semicolon 629R$* $: $1 <@> mark addresses 630R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr> 631R@ $* <@> $: @ $1 unmark @host:... 632R$* :: $* <@> $: $1 :: $2 unmark node::addr 633R:`include': $* <@> $: :`include': $1 unmark :`include':... | 168 169ifdef(`confCR_FILE', `dnl 170# Hosts for which relaying is permitted ($=R) 171FR`'confCR_FILE', 172`dnl') 173 174define(`TLS_SRV_TAG', `TLS_Srv')dnl 175define(`TLS_CLT_TAG', `TLS_Clt')dnl --- 452 unchanged lines hidden (view full) --- 628R$@ $@ <@> 629 630# strip group: syntax (not inside angle brackets!) and trailing semicolon 631R$* $: $1 <@> mark addresses 632R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr> 633R@ $* <@> $: @ $1 unmark @host:... 634R$* :: $* <@> $: $1 :: $2 unmark node::addr 635R:`include': $* <@> $: :`include': $1 unmark :`include':... |
634R$* [ IPv6 $- ] <@> $: $1 [ IPv6 $2 ] unmark IPv6 addr | 636R$* [ IPv6 : $+ ] <@> $: $1 [ IPv6 : $2 ] unmark IPv6 addr |
635R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon 636R$* : $* <@> $: $2 strip colon if marked 637R$* <@> $: $1 unmark 638R$* ; $1 strip trailing semi 639R$* < $+ :; > $* $@ $2 :; <@> catch <list:;> 640R$* < $* ; > $1 < $2 > bogus bracketed semi 641 642# null input now results from list:; syntax --- 59 unchanged lines hidden (view full) --- 702 703# handle special cases for local names 704R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all 705R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain 706ifdef(`_NO_UUCP_', `dnl', 707`R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain') 708 709# check for IPv6 domain literal (save quoted form) | 637R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon 638R$* : $* <@> $: $2 strip colon if marked 639R$* <@> $: $1 unmark 640R$* ; $1 strip trailing semi 641R$* < $+ :; > $* $@ $2 :; <@> catch <list:;> 642R$* < $* ; > $1 < $2 > bogus bracketed semi 643 644# null input now results from list:; syntax --- 59 unchanged lines hidden (view full) --- 704 705# handle special cases for local names 706R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all 707R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain 708ifdef(`_NO_UUCP_', `dnl', 709`R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain') 710 711# check for IPv6 domain literal (save quoted form) |
710R$* < @ [ IPv6 $- ] > $* $: $2 $| $1 < @@ [ $(dequote $2 $) ] > $3 mark IPv6 addr 711R$- $| $* < @@ $=w > $* $: $2 < @ $j . > $4 self-literal 712R$- $| $* < @@ [ $+ ] > $* $@ $2 < @ [ IPv6 $1 ] > $4 canon IP addr | 712R$* < @ [ IPv6 : $+ ] > $* $: $2 $| $1 < @@ [ $(dequote $2 $) ] > $3 mark IPv6 addr 713R$+ $| $* < @@ $=w > $* $: $2 < @ $j . > $4 self-literal 714R$+ $| $* < @@ [ $+ ] > $* $@ $2 < @ [ IPv6 : $1 ] > $4 canon IP addr |
713 714# check for IPv4 domain literal 715R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d] 716R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal 717R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr 718 719ifdef(`_DOMAIN_TABLE_', `dnl 720# look up domains in the domain table --- 181 unchanged lines hidden (view full) --- 902R$+ < @ $={LDAPRoute} . > $: $>LDAPExpand <$1 < @ $2 . >> <$1 @ $2>', 903`dnl') 904 905ifdef(`_MAILER_smtp_', 906`# handle numeric address spec 907dnl there is no check whether this is really an IP number 908R$* < @ [ $+ ] > $* $: $>ParseLocal $1 < @ [ $2 ] > $3 numeric internet spec 909R$* < @ [ $+ ] > $* $1 < @ [ $2 ] : $S > $3 Add smart host to path | 715 716# check for IPv4 domain literal 717R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d] 718R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal 719R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr 720 721ifdef(`_DOMAIN_TABLE_', `dnl 722# look up domains in the domain table --- 181 unchanged lines hidden (view full) --- 904R$+ < @ $={LDAPRoute} . > $: $>LDAPExpand <$1 < @ $2 . >> <$1 @ $2>', 905`dnl') 906 907ifdef(`_MAILER_smtp_', 908`# handle numeric address spec 909dnl there is no check whether this is really an IP number 910R$* < @ [ $+ ] > $* $: $>ParseLocal $1 < @ [ $2 ] > $3 numeric internet spec 911R$* < @ [ $+ ] > $* $1 < @ [ $2 ] : $S > $3 Add smart host to path |
910R$* < @ [ IPv6 $- ] : > $* 911 $#_SMTP_ $@ [ $(dequote $2 $) ] $: $1 < @ [IPv6 $2 ] > $3 no smarthost: send | 912R$* < @ [ IPv6 : $+ ] : > $* 913 $#_SMTP_ $@ [ $(dequote $2 $) ] $: $1 < @ [IPv6 : $2 ] > $3 no smarthost: send |
912R$* < @ [ $+ ] : > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send 913R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer 914R$* < @ [ $+ ] : $+ > $* $#_SMTP_ $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer', 915 `dnl') 916 917ifdef(`_VIRTUSER_TABLE_', `dnl 918# handle virtual users 919R$+ $: <!> $1 Mark for lookup --- 11 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 | 914R$* < @ [ $+ ] : > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send 915R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer 916R$* < @ [ $+ ] : $+ > $* $#_SMTP_ $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer', 917 `dnl') 918 919ifdef(`_VIRTUSER_TABLE_', `dnl 920# handle virtual users 921R$+ $: <!> $1 Mark for lookup --- 11 unchanged lines hidden (view full) --- 933dnl @domain if +detail exists 934R<@> $+ + $* < @ $+ . > $: < $(virtuser @ $3 $@ $1 $@ $2 $: @ $) > $1 + $2 < @ $3 . > 935dnl without +detail (or no match) 936R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . > 937R<@> $+ $: $1 938R<!> $+ $: $1 939R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 940R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 |
941dnl this is not a documented option 942dnl it performs no looping at all for virtusertable |
|
939ifdef(`_NO_VIRTUSER_RECURSION_', 940`R< $+ > $+ < @ $+ > $: $>ParseLocal $>Parse0 $>canonify $1', 941`R< $+ > $+ < @ $+ > $: $>Recurse $1') 942dnl', `dnl') 943 944# short circuit local delivery so forwarded email works 945ifdef(`_MAILER_usenet_', `dnl 946R$+ . USENET < @ $=w . > $#usenet $@ usenet $: $1 handle usenet specially', `dnl') --- 152 unchanged lines hidden (view full) --- 1099### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ### 1100dnl input: in general: <[mailer:]host> lp<@domain>rest 1101dnl <> address -> address 1102dnl <error:d.s.n:text> -> error 1103dnl <error:text> -> error 1104dnl <mailer:user@host> lp<@domain>rest -> mailer host user 1105dnl <mailer:host> address -> mailer host address 1106dnl <localdomain> address -> address | 943ifdef(`_NO_VIRTUSER_RECURSION_', 944`R< $+ > $+ < @ $+ > $: $>ParseLocal $>Parse0 $>canonify $1', 945`R< $+ > $+ < @ $+ > $: $>Recurse $1') 946dnl', `dnl') 947 948# short circuit local delivery so forwarded email works 949ifdef(`_MAILER_usenet_', `dnl 950R$+ . USENET < @ $=w . > $#usenet $@ usenet $: $1 handle usenet specially', `dnl') --- 152 unchanged lines hidden (view full) --- 1103### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ### 1104dnl input: in general: <[mailer:]host> lp<@domain>rest 1105dnl <> address -> address 1106dnl <error:d.s.n:text> -> error 1107dnl <error:text> -> error 1108dnl <mailer:user@host> lp<@domain>rest -> mailer host user 1109dnl <mailer:host> address -> mailer host address 1110dnl <localdomain> address -> address |
1107dnl <[IPv6 number]> address -> relay number address | 1111dnl <[IPv6:number]> address -> relay number address |
1108dnl <host> address -> relay host address 1109################################################################### 1110 1111SMailerToTriple=95 1112R< > $* $@ $1 strip off null relay 1113R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 1114R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 1115R< local : $* > $* $>CanonLocal < $1 > $2 1116R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user 1117R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer 1118R< $=w > $* $@ $2 delete local host | 1112dnl <host> address -> relay host address 1113################################################################### 1114 1115SMailerToTriple=95 1116R< > $* $@ $1 strip off null relay 1117R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 1118R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 1119R< local : $* > $* $>CanonLocal < $1 > $2 1120R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user 1121R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer 1122R< $=w > $* $@ $2 delete local host |
1119R< [ IPv6 $+ ] > $* $#_RELAY_ $@ $(dequote $1 $) $: $2 use unqualified mailer | 1123R< [ IPv6 : $+ ] > $* $#_RELAY_ $@ $(dequote $1 $) $: $2 use unqualified mailer |
1120R< $+ > $* $#_RELAY_ $@ $1 $: $2 use unqualified mailer 1121 1122################################################################### 1123### Ruleset CanonLocal -- canonify local: syntax ### 1124dnl input: <user> address 1125dnl <x> <@host> : rest -> Recurse rest 1126dnl <x> p1 $=O p2 <@host> -> Recurse p1 $=O p2 1127dnl <> user <@host> rest -> local user@host user --- 147 unchanged lines hidden (view full) --- 1275### + does lookup with and without tag 1276dnl returns: <default> <passthru> 1277dnl <result> <passthru> 1278###################################################################### 1279 1280SLookUpDomain 1281dnl remove IPv6 mark and dequote address 1282dnl it is a bit ugly because it is checked on each "iteration" | 1124R< $+ > $* $#_RELAY_ $@ $1 $: $2 use unqualified mailer 1125 1126################################################################### 1127### Ruleset CanonLocal -- canonify local: syntax ### 1128dnl input: <user> address 1129dnl <x> <@host> : rest -> Recurse rest 1130dnl <x> p1 $=O p2 <@host> -> Recurse p1 $=O p2 1131dnl <> user <@host> rest -> local user@host user --- 147 unchanged lines hidden (view full) --- 1279### + does lookup with and without tag 1280dnl returns: <default> <passthru> 1281dnl <result> <passthru> 1282###################################################################### 1283 1284SLookUpDomain 1285dnl remove IPv6 mark and dequote address 1286dnl it is a bit ugly because it is checked on each "iteration" |
1283R<[IPv6 $-]> <$+> <$*> <$*> $: <[$(dequote $1 $)]> <$2> <$3> <$4> | 1287R<[IPv6 : $+]> <$+> <$*> <$*> $: <[$(dequote $1 $)]> <$2> <$3> <$4> |
1284dnl workspace <key> <default> <passthru> <mark> 1285dnl lookup with tag (in front, no delimiter here) 1286R<$*> <$+> <$*> <$- $-> $: < $(access $5`'_TAG_DELIM_`'$1 $: ? $) > <$1> <$2> <$3> <$4 $5> 1287dnl workspace <result-of-lookup|?> <key> <default> <passthru> <mark> 1288ifdef(`_FFR_LOOKUPDOTDOMAIN', `dnl omit first component: lookup .rest 1289R<?> <$+.$+> <$+> <$*> <$- $-> $: < $(access $5`'_TAG_DELIM_`'.$2 $: ? $) > <$1.$2> <$3> <$4> <$5 $6>', `dnl') 1290dnl lookup without tag? 1291R<?> <$+> <$+> <$*> <+ $*> $: < $(access $1 $: ? $) > <$1> <$2> <$3> <+ $4> --- 817 unchanged lines hidden --- | 1288dnl workspace <key> <default> <passthru> <mark> 1289dnl lookup with tag (in front, no delimiter here) 1290R<$*> <$+> <$*> <$- $-> $: < $(access $5`'_TAG_DELIM_`'$1 $: ? $) > <$1> <$2> <$3> <$4 $5> 1291dnl workspace <result-of-lookup|?> <key> <default> <passthru> <mark> 1292ifdef(`_FFR_LOOKUPDOTDOMAIN', `dnl omit first component: lookup .rest 1293R<?> <$+.$+> <$+> <$*> <$- $-> $: < $(access $5`'_TAG_DELIM_`'.$2 $: ? $) > <$1.$2> <$3> <$4> <$5 $6>', `dnl') 1294dnl lookup without tag? 1295R<?> <$+> <$+> <$*> <+ $*> $: < $(access $1 $: ? $) > <$1> <$2> <$3> <+ $4> --- 817 unchanged lines hidden --- |