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