151225SericPUSHDIVERT(-1) 251225Seric# 351225Seric# Copyright (c) 1983 Eric P. Allman 462501Sbostic# Copyright (c) 1988, 1993 562501Sbostic# The Regents of the University of California. All rights reserved. 651225Seric# 751225Seric# %sccs.include.redist.sh% 851225Seric# 959766Sericifdef(`SMTP_MAILER_FLAGS',, 1059766Seric `define(`SMTP_MAILER_FLAGS', 1159766Seric `ifdef(`_OLD_SENDMAIL_', `L', `')')') 1251225SericPOPDIVERT 1351225Seric##################################### 1451225Seric### SMTP Mailer specification ### 1551225Seric##################################### 1651225Seric 17*65217SericVERSIONID(`@(#)smtp.m4 8.13 (Berkeley) 12/27/93') 1851225Seric 1964748SericMsmtp, P=[IPC], F=CONCAT(mDFMuX, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), E=\r\n, 2059766Seric ifdef(`_OLD_SENDMAIL_',, `L=990, ')A=IPC $h 2164748SericMesmtp, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), E=\r\n, 2263755Seric ifdef(`_OLD_SENDMAIL_',, `L=990, ')A=IPC $h 2365196SericMrelay, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=61, E=\r\n, 2459766Seric ifdef(`_OLD_SENDMAIL_',, `L=2040, ')A=IPC $h 2551225Seric 2664748Seric# 2764748Seric# envelope sender and masquerading recipient rewriting 2864748Seric# 2951225SericS11 3064803SericR$+ $: $>51 $1 sender/recipient common 3164748SericR$* :; <@> $@ $1 :; list:; special case 3265196SericR$* $@ $>61 $1 qualify unqual'ed names 3351225Seric 3464748Seric 3564748Seric# 3664748Seric# header recipient rewriting if not masquerading recipients 3764748Seric# 3864748SericS21 3964748Seric 4051686Seric# do sender/recipient common rewriting 4164803SericR$+ $: $>51 $1 4251686Seric 4364748Seric# unqualified names (e.g., "eric") are qualified by local host 4458117SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 4564748SericR$+ $: $1 < @ $j > add local domain 4651686Seric 4754018Seric 4864748Seric# 4964748Seric# header sender and masquerading recipient rewriting 5064748Seric# 5164748SericS31 5264803SericR$+ $: $>51 $1 sender/recipient common 5364748SericR$* :; <@> $@ $1 :; list:; special case 5451686Seric 5564748Seric# do special header rewriting 5664748SericR$* <@> $* $@ $1 <@> $2 pass null host through 5764748SericR< @ $* > $* $@ < @ $1 > $2 pass route-addr through 5864748SericR$=E < @ $=w . > $@ $1 < @ $2 > exposed user as is 5964748SericR$* < @ $=w . > $: $1 < @ $M > masquerade as domain 6064748SericR$* < @ > $: $1 < @ $j > in case $M undefined 6165196SericR$* $@ $>61 $1 qualify unqual'ed names 6251686Seric 6351686Seric 6464748Seric# 65*65217Seric# convert pseudo-domain addresses to real domain addresses 6664748Seric# 6764803SericS51 6851686Seric 6951225Seric# pass <route-addr>s through 7051245SericR< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr> 7151225Seric 7251225Seric# output fake domains as user%fake@relay 7351225Sericifdef(`BITNET_RELAY', 7465175Seric`R$+ <@ $+ .BITNET. > $: $1 % $2 .BITNET < @ $B > user@host.BITNET 7565183SericR$+.BITNET <@ $+:$+ > $: $1 .BITNET < @ $3 > strip mailer: part', 7651225Seric `dnl') 77*65217Sericifdef(`_NO_UUCP_', `dnl', ` 78*65217Seric# do UUCP heuristics; note that these are shared with UUCP mailers 79*65217SericR$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form 80*65217SericR$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form 8164748Seric 82*65217Seric# leave these in .UUCP form to avoid further tampering 83*65217SericR< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. > 84*65217SericR< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 > 85*65217SericR< $&h ! > $+ $@ $1 < @ $&h .UUCP. > 86*65217SericR< $+ ! > $+ $: $1 ! $2 < @ $Y > 87*65217SericR$+ < @ > $: $1 < @ $j > in case $Y undefined 88*65217SericR$+ < @ $+ : $+ > $: $1 < @ $3 > strip mailer: part') 8964748Seric 90*65217Seric 9164748Seric# 9264748Seric# common sender and masquerading recipient rewriting 9364748Seric# 9464803SericS61 9564803Seric 9665196SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 9764748SericR$=E $@ $1 < @ $j> show exposed names 9864748SericR$+ $: $1 < @ $M > user w/o host 9964748SericR$+ <@> $: $1 < @ $j > in case $M undefined 100