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*65183SericVERSIONID(`@(#)smtp.m4 8.11 (Berkeley) 12/20/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 2364931SericMrelay, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=0, 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 3251225Seric 3364748Seric# handle unqualified names 3464748SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 3564803SericR$* $@ $>61 $1 3664748Seric 3764748Seric 3864748Seric# 3964748Seric# header recipient rewriting if not masquerading recipients 4064748Seric# 4164748SericS21 4264748Seric 4351686Seric# do sender/recipient common rewriting 4464803SericR$+ $: $>51 $1 4551686Seric 4664748Seric# unqualified names (e.g., "eric") are qualified by local host 4758117SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 4864748SericR$+ $: $1 < @ $j > add local domain 4951686Seric 5054018Seric 5164748Seric# 5264748Seric# header sender and masquerading recipient rewriting 5364748Seric# 5464748SericS31 5564803SericR$+ $: $>51 $1 sender/recipient common 5664748SericR$* :; <@> $@ $1 :; list:; special case 5751686Seric 5864748Seric# do special header rewriting 5964748SericR$* <@> $* $@ $1 <@> $2 pass null host through 6064748SericR< @ $* > $* $@ < @ $1 > $2 pass route-addr through 6164748SericR$=E < @ $=w . > $@ $1 < @ $2 > exposed user as is 6264748SericR$* < @ $=w . > $: $1 < @ $M > masquerade as domain 6364748SericR$* < @ > $: $1 < @ $j > in case $M undefined 6451686Seric 6564748Seric# handle unqualified names 6658117SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 6764803SericR$* $@ $>61 $1 6851686Seric 6954018Seric 7064748Seric# 7164748Seric# common rewriting for all SMTP addresses 7264748Seric# 7364803SericS51 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', 8065175Seric`R$+ <@ $+ .BITNET. > $: $1 % $2 .BITNET < @ $B > user@host.BITNET 81*65183SericR$+.BITNET <@ $+:$+ > $: $1 .BITNET < @ $3 > strip mailer: part', 8251225Seric `dnl') 83*65183Sericifdef(`UUCP_RELAY', 84*65183Seric`R$+ <@ $+ .UUCP. > $: $1 % $2 .UUCP < @ $Y > user@host.UUCP 85*65183SericR$+.UUCP <@ $+:$+ > $: $1 .UUCP < @ $3 > strip mailer: part', 8651225Seric `dnl') 8758297Sericifdef(`_NO_UUCP_', `dnl', 8864973Seric`R$+ <@ $+ .UUCP. > $: $2 ! $1 < @ $j > user@host.UUCP') 8964748Seric 9064748Seric 9164748Seric# 9264748Seric# common sender and masquerading recipient rewriting 9364748Seric# 9464803SericS61 9564803Seric 9664748SericR$=E $@ $1 < @ $j> show exposed names 9764748SericR$+ $: $1 < @ $M > user w/o host 9864748SericR$+ <@> $: $1 < @ $j > in case $M undefined 99