add redirect feature
[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
a0f5c935 14VERSIONID(`@(#)smtp.m4 6.2 (Berkeley) %G%')
cb6de8af 15
56c772e6
EA
16Msmtp, P=[IPC], F=mDFMueXLC, S=11, R=21, E=\r\n,
17 A=IPC $h
cb6de8af
EA
18
19S11
20
bac417e8
EA
21# do sender/recipient common rewriting
22R$+ $: $>19 $1
23
24# if already @ qualified, we are done
25R$* < @ $+ > $* $@ $1 < @ $2 > $3 already qualified
26
f3723ad3
EA
27# don't qualify list:; syntax
28R$* :; $@ $1 :;
29
bac417e8 30# unqualified names (e.g., "eric") "come from" $M
250fe7fb 31R$=E $: $1 < @ $j> show exposed names
bac417e8
EA
32R$+ $: $1 < @ $M > user w/o host
33R$+ < @ > $: $1 < @ $j > in case $M undefined
34
35S21
36
37# do sender/recipient common rewriting
38R$+ $: $>19 $1
39
40# if already @ qualified, we are done
41R$* < @ $+ > $* $@ $1 < @ $2 > $3 already qualified
42
f3723ad3
EA
43# don't qualify list:; syntax
44R$* :; $@ $1 :;
45
bac417e8 46# unqualified names (e.g., "eric") are qualified by local host
6d3697d1 47R$+ $: $1 < @ $j >
bac417e8
EA
48
49S19
50
cb6de8af 51# pass <route-addr>s through
0dc1c55a 52R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
cb6de8af
EA
53
54# output fake domains as user%fake@relay
55ifdef(`BITNET_RELAY',
0dc1c55a 56`R$+ <@ $+ . BITNET > $: $1 % $2 .BITNET < @ $B > user@host.BITNET',
cb6de8af
EA
57 `dnl')
58ifdef(`CSNET_RELAY',
0dc1c55a 59`R$+ <@ $+ . CSNET > $: $1 % $2 .CSNET < @ $C > user@host.CSNET',
cb6de8af 60 `dnl')
ef78dce1 61R$+ <@ $+ . UUCP > $: $2 ! $1 < @ $j > user@host.UUCP