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
14VERSIONID(`@(#)smtp.m4	6.3 (Berkeley) 02/21/93')
15
16Msmtp,		P=[IPC], F=mDFMueXLC, S=11, R=21, E=\r\n,
17		A=IPC $h
18
19S11
20
21# do sender/recipient common rewriting
22R$+			$: $>19 $1
23
24# if already @ qualified, we are done
25R$* < @ $* > $*		$@ $1 < @ $2 > $3		already qualified
26
27# don't qualify list:; syntax
28R$* :;			$@ $1 :;
29
30# unqualified names (e.g., "eric") "come from" $M
31R$=E			$: $1 < @ $j>			show exposed names
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
43# don't qualify list:; syntax
44R$* :;			$@ $1 :;
45
46# unqualified names (e.g., "eric") are qualified by local host
47R$+			$: $1 < @ $j >
48
49S19
50
51# pass <route-addr>s through
52R< @ $+ > $*		$@ < @ $1 > $2			resolve <route-addr>
53
54# output fake domains as user%fake@relay
55ifdef(`BITNET_RELAY',
56`R$+ <@ $+ . BITNET >	$: $1 % $2 .BITNET < @ $B >	user@host.BITNET',
57	`dnl')
58ifdef(`CSNET_RELAY',
59`R$+ <@ $+ . CSNET >	$: $1 % $2 .CSNET < @ $C >	user@host.CSNET',
60	`dnl')
61R$+ <@ $+ . UUCP >	$: $2 ! $1 < @ $j >		user@host.UUCP
62