Commit | Line | Data |
---|---|---|
cb6de8af EA |
1 | PUSHDIVERT(-1) |
2 | # | |
3 | # Copyright (c) 1983 Eric P. Allman | |
bf967ee2 KB |
4 | # Copyright (c) 1988, 1993 |
5 | # The Regents of the University of California. All rights reserved. | |
cb6de8af EA |
6 | # |
7 | # %sccs.include.redist.sh% | |
8 | # | |
c4a37487 EA |
9 | ifdef(`SMTP_MAILER_FLAGS',, |
10 | `define(`SMTP_MAILER_FLAGS', | |
11 | `ifdef(`_OLD_SENDMAIL_', `L', `')')') | |
cb6de8af EA |
12 | POPDIVERT |
13 | ##################################### | |
14 | ### SMTP Mailer specification ### | |
15 | ##################################### | |
16 | ||
e4442014 | 17 | VERSIONID(`@(#)smtp.m4 8.10 (Berkeley) %G%') |
cb6de8af | 18 | |
9fff395d | 19 | Msmtp, P=[IPC], F=CONCAT(mDFMuX, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), E=\r\n, |
c4a37487 | 20 | ifdef(`_OLD_SENDMAIL_',, `L=990, ')A=IPC $h |
9fff395d | 21 | Mesmtp, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), E=\r\n, |
11305300 | 22 | ifdef(`_OLD_SENDMAIL_',, `L=990, ')A=IPC $h |
e548e87e | 23 | Mrelay, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=0, E=\r\n, |
c4a37487 | 24 | ifdef(`_OLD_SENDMAIL_',, `L=2040, ')A=IPC $h |
cb6de8af | 25 | |
9fff395d EA |
26 | # |
27 | # envelope sender and masquerading recipient rewriting | |
28 | # | |
cb6de8af | 29 | S11 |
7c372980 | 30 | R$+ $: $>51 $1 sender/recipient common |
9fff395d | 31 | R$* :; <@> $@ $1 :; list:; special case |
cb6de8af | 32 | |
9fff395d | 33 | # handle unqualified names |
c240e59b | 34 | R$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified |
7c372980 | 35 | R$* $@ $>61 $1 |
bac417e8 | 36 | |
bac417e8 | 37 | |
9fff395d EA |
38 | # |
39 | # header recipient rewriting if not masquerading recipients | |
40 | # | |
41 | S21 | |
bac417e8 EA |
42 | |
43 | # do sender/recipient common rewriting | |
7c372980 | 44 | R$+ $: $>51 $1 |
bac417e8 | 45 | |
9fff395d | 46 | # unqualified names (e.g., "eric") are qualified by local host |
c240e59b | 47 | R$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified |
9fff395d | 48 | R$+ $: $1 < @ $j > add local domain |
bac417e8 | 49 | |
f3723ad3 | 50 | |
9fff395d EA |
51 | # |
52 | # header sender and masquerading recipient rewriting | |
53 | # | |
54 | S31 | |
7c372980 | 55 | R$+ $: $>51 $1 sender/recipient common |
9fff395d EA |
56 | R$* :; <@> $@ $1 :; list:; special case |
57 | ||
58 | # do special header rewriting | |
59 | R$* <@> $* $@ $1 <@> $2 pass null host through | |
60 | R< @ $* > $* $@ < @ $1 > $2 pass route-addr through | |
61 | R$=E < @ $=w . > $@ $1 < @ $2 > exposed user as is | |
62 | R$* < @ $=w . > $: $1 < @ $M > masquerade as domain | |
63 | R$* < @ > $: $1 < @ $j > in case $M undefined | |
64 | ||
65 | # handle unqualified names | |
66 | R$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified | |
7c372980 | 67 | R$* $@ $>61 $1 |
bac417e8 | 68 | |
9fff395d EA |
69 | |
70 | # | |
71 | # common rewriting for all SMTP addresses | |
72 | # | |
7c372980 | 73 | S51 |
bac417e8 | 74 | |
cb6de8af | 75 | # pass <route-addr>s through |
0dc1c55a | 76 | R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr> |
cb6de8af EA |
77 | |
78 | # output fake domains as user%fake@relay | |
79 | ifdef(`BITNET_RELAY', | |
e4442014 EA |
80 | `R$+ <@ $+ .BITNET. > $: $1 % $2 .BITNET < @ $B > user@host.BITNET |
81 | R$+.BITNET. <@ $+:$+ > $: $1 .BITNET < @ $3 > strip mailer: part', | |
cb6de8af EA |
82 | `dnl') |
83 | ifdef(`CSNET_RELAY', | |
e4442014 EA |
84 | `R$+ <@ $+ .CSNET. > $: $1 % $2 .CSNET < @ $C > user@host.CSNET |
85 | R$+.CSNET. <@ $+:$+ > $: $1 .CSNET < @ $3 > strip mailer: part', | |
cb6de8af | 86 | `dnl') |
5598077f | 87 | ifdef(`_NO_UUCP_', `dnl', |
9ee2219d | 88 | `R$+ <@ $+ .UUCP. > $: $2 ! $1 < @ $j > user@host.UUCP') |
9fff395d EA |
89 | |
90 | ||
91 | # | |
92 | # common sender and masquerading recipient rewriting | |
93 | # | |
7c372980 EA |
94 | S61 |
95 | ||
9fff395d EA |
96 | R$=E $@ $1 < @ $j> show exposed names |
97 | R$+ $: $1 < @ $M > user w/o host | |
98 | R$+ <@> $: $1 < @ $j > in case $M undefined |