handle multiple <> <> in S3
[unix-history] / usr / src / usr.sbin / sendmail / cf / mailer / smtp.m4
CommitLineData
cb6de8af
EA
1PUSHDIVERT(-1)
2#
3# Copyright (c) 1983 Eric P. Allman
4# Copyright (c) 1988 The Regents of the University of California.
5# All rights reserved.
6#
7# %sccs.include.redist.sh%
8#
9POPDIVERT
10#####################################
11### SMTP Mailer specification ###
12#####################################
13
d6f4dcdc 14VERSIONID(`@(#)smtp.m4 2.7 (Berkeley) %G%')
cb6de8af 15
bac417e8 16Msmtp, P=[IPC], F=mDFMueXLC, S=11, R=21, A=IPC $h, E=\r\n
cb6de8af
EA
17
18S11
19
bac417e8
EA
20# do sender/recipient common rewriting
21R$+ $: $>19 $1
22
23# if already @ qualified, we are done
24R$* < @ $+ > $* $@ $1 < @ $2 > $3 already qualified
25
f3723ad3
EA
26# don't qualify list:; syntax
27R$* :; $@ $1 :;
28
bac417e8
EA
29# unqualified names (e.g., "eric") "come from" $M
30R$+ $: $1 < @ $M > user w/o host
31R$+ < @ > $: $1 < @ $j > in case $M undefined
32
33S21
34
35# do sender/recipient common rewriting
36R$+ $: $>19 $1
37
38# if already @ qualified, we are done
39R$* < @ $+ > $* $@ $1 < @ $2 > $3 already qualified
40
f3723ad3
EA
41# don't qualify list:; syntax
42R$* :; $@ $1 :;
43
bac417e8 44# unqualified names (e.g., "eric") are qualified by local host
6d3697d1 45R$+ $: $1 < @ $j >
bac417e8
EA
46
47S19
48
cb6de8af 49# pass <route-addr>s through
0dc1c55a 50R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
cb6de8af
EA
51
52# output fake domains as user%fake@relay
53ifdef(`BITNET_RELAY',
0dc1c55a 54`R$+ <@ $+ . BITNET > $: $1 % $2 .BITNET < @ $B > user@host.BITNET',
cb6de8af
EA
55 `dnl')
56ifdef(`CSNET_RELAY',
0dc1c55a 57`R$+ <@ $+ . CSNET > $: $1 % $2 .CSNET < @ $C > user@host.CSNET',
cb6de8af 58 `dnl')
ef78dce1 59R$+ <@ $+ . UUCP > $: $2 ! $1 < @ $j > user@host.UUCP