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