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*64748SericVERSIONID(`@(#)smtp.m4 8.6 (Berkeley) 10/23/93') 1851225Seric 19*64748SericMsmtp, 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 21*64748SericMesmtp, 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 23*64748SericMrelay, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=19, E=\r\n, 2459766Seric ifdef(`_OLD_SENDMAIL_',, `L=2040, ')A=IPC $h 2551225Seric 26*64748Seric# 27*64748Seric# envelope sender and masquerading recipient rewriting 28*64748Seric# 2951225SericS11 30*64748SericR$+ $: $>19 $1 sender/recipient common 31*64748SericR$* :; <@> $@ $1 :; list:; special case 3251225Seric 33*64748Seric# handle unqualified names 34*64748SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 35*64748SericR$* $@ $>29 $1 36*64748Seric 37*64748Seric 38*64748Seric# 39*64748Seric# header recipient rewriting if not masquerading recipients 40*64748Seric# 41*64748SericS21 42*64748Seric 4351686Seric# do sender/recipient common rewriting 4451686SericR$+ $: $>19 $1 4551686Seric 46*64748Seric# unqualified names (e.g., "eric") are qualified by local host 4758117SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 48*64748SericR$+ $: $1 < @ $j > add local domain 4951686Seric 5054018Seric 51*64748Seric# 52*64748Seric# header sender and masquerading recipient rewriting 53*64748Seric# 54*64748SericS31 55*64748SericR$+ $: $>19 $1 sender/recipient common 56*64748SericR$* :; <@> $@ $1 :; list:; special case 5751686Seric 58*64748Seric# do special header rewriting 59*64748SericR$* <@> $* $@ $1 <@> $2 pass null host through 60*64748SericR< @ $* > $* $@ < @ $1 > $2 pass route-addr through 61*64748SericR$=E < @ $=w . > $@ $1 < @ $2 > exposed user as is 62*64748SericR$* < @ $=w . > $: $1 < @ $M > masquerade as domain 63*64748SericR$* < @ > $: $1 < @ $j > in case $M undefined 6451686Seric 65*64748Seric# handle unqualified names 6658117SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 67*64748SericR$* $@ $>29 $1 6851686Seric 6954018Seric 70*64748Seric# 71*64748Seric# common rewriting for all SMTP addresses 72*64748Seric# 7351686SericS19 7451686Seric 7551225Seric# pass <route-addr>s through 7651245SericR< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr> 7751225Seric 7851225Seric# output fake domains as user%fake@relay 7951225Sericifdef(`BITNET_RELAY', 8064503Seric`R$+ <@ $+ . BITNET > $: $1 % $2 .BITNET < @ $B > user@host.BITNET 8164503SericR$+.BITNET <@ $+:$+ > $: $1 .BITNET < @ $3 > strip mailer: part', 8251225Seric `dnl') 8351225Sericifdef(`CSNET_RELAY', 8464503Seric`R$+ <@ $+ . CSNET > $: $1 % $2 .CSNET < @ $C > user@host.CSNET 8564503SericR$+.CSNET <@ $+:$+ > $: $1 .CSNET < @ $3 > strip mailer: part', 8651225Seric `dnl') 8758297Sericifdef(`_NO_UUCP_', `dnl', 8858297Seric`R$+ <@ $+ . UUCP > $: $2 ! $1 < @ $j > user@host.UUCP') 89*64748Seric 90*64748Seric 91*64748Seric# 92*64748Seric# common sender and masquerading recipient rewriting 93*64748Seric# 94*64748SericS29 95*64748SericR$=E $@ $1 < @ $j> show exposed names 96*64748SericR$+ $: $1 < @ $M > user w/o host 97*64748SericR$+ <@> $: $1 < @ $j > in case $M undefined 98