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# 967469Sericifdef(`SMTP_MAILER_FLAGS',, `define(`SMTP_MAILER_FLAGS', `')') 1051225SericPOPDIVERT 1151225Seric##################################### 1251225Seric### SMTP Mailer specification ### 1351225Seric##################################### 1451225Seric 15*67606SericVERSIONID(`@(#)smtp.m4 8.17 (Berkeley) 08/07/94') 1651225Seric 1764748SericMsmtp, P=[IPC], F=CONCAT(mDFMuX, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), E=\r\n, 1867469Seric L=990, ifdef(`SMTP_MAILER_MAX', `M=SMTP_MAILER_MAX, ')A=IPC $h 1964748SericMesmtp, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), E=\r\n, 2067469Seric L=990, ifdef(`SMTP_MAILER_MAX', `M=SMTP_MAILER_MAX, ')A=IPC $h 2165196SericMrelay, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=61, E=\r\n, 2267469Seric L=2040, A=IPC $h 2351225Seric 2464748Seric# 2564748Seric# envelope sender and masquerading recipient rewriting 2664748Seric# 2751225SericS11 2864803SericR$+ $: $>51 $1 sender/recipient common 2964748SericR$* :; <@> $@ $1 :; list:; special case 3065196SericR$* $@ $>61 $1 qualify unqual'ed names 3151225Seric 3264748Seric 3364748Seric# 3464748Seric# header recipient rewriting if not masquerading recipients 3564748Seric# 3664748SericS21 3764748Seric 3851686Seric# do sender/recipient common rewriting 3964803SericR$+ $: $>51 $1 4051686Seric 4164748Seric# unqualified names (e.g., "eric") are qualified by local host 4258117SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 4364748SericR$+ $: $1 < @ $j > add local domain 4451686Seric 4554018Seric 4664748Seric# 4764748Seric# header sender and masquerading recipient rewriting 4864748Seric# 4964748SericS31 5064803SericR$+ $: $>51 $1 sender/recipient common 5164748SericR$* :; <@> $@ $1 :; list:; special case 5251686Seric 5364748Seric# do special header rewriting 5464748SericR$* <@> $* $@ $1 <@> $2 pass null host through 5564748SericR< @ $* > $* $@ < @ $1 > $2 pass route-addr through 5664748SericR$=E < @ $=w . > $@ $1 < @ $2 > exposed user as is 5766084SericR$* < @ $=w . > $: $1 < @ $2 @ $M > masquerade as domain 5866084SericR$* < @ $+ @ > $@ $1 < @ $2 > in case $M undefined 5966084SericR$* < @ $+ @ $+ > $@ $1 < @ $3 > $M is defined -- use it 6065196SericR$* $@ $>61 $1 qualify unqual'ed names 6151686Seric 6251686Seric 6364748Seric# 6465217Seric# convert pseudo-domain addresses to real domain addresses 6564748Seric# 6664803SericS51 6751686Seric 6851225Seric# pass <route-addr>s through 6951245SericR< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr> 7051225Seric 7151225Seric# output fake domains as user%fake@relay 7251225Sericifdef(`BITNET_RELAY', 7365175Seric`R$+ <@ $+ .BITNET. > $: $1 % $2 .BITNET < @ $B > user@host.BITNET 7465183SericR$+.BITNET <@ $+:$+ > $: $1 .BITNET < @ $3 > strip mailer: part', 7551225Seric `dnl') 7665217Sericifdef(`_NO_UUCP_', `dnl', ` 7765217Seric# do UUCP heuristics; note that these are shared with UUCP mailers 7865217SericR$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form 7965217SericR$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form 8064748Seric 8165217Seric# leave these in .UUCP form to avoid further tampering 8265217SericR< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. > 8365217SericR< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 > 8465217SericR< $&h ! > $+ $@ $1 < @ $&h .UUCP. > 85*67606SericR< $+ ! > $+ $: $1 ! $2 < @ $j > 8665217SericR$+ < @ $+ : $+ > $: $1 < @ $3 > strip mailer: part') 8764748Seric 8865217Seric 8964748Seric# 9064748Seric# common sender and masquerading recipient rewriting 9164748Seric# 9264803SericS61 9364803Seric 9465196SericR$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified 9564748SericR$=E $@ $1 < @ $j> show exposed names 9664748SericR$+ $: $1 < @ $M > user w/o host 9764748SericR$+ <@> $: $1 < @ $j > in case $M undefined 98