xref: /csrg-svn/usr.sbin/sendmail/cf/m4/proto.m4 (revision 58679)
151222Sericdivert(-1)
251222Seric#
351222Seric# Copyright (c) 1983 Eric P. Allman
451222Seric# Copyright (c) 1988 The Regents of the University of California.
551222Seric# All rights reserved.
651222Seric#
751222Seric# %sccs.include.redist.sh%
851222Seric#
951222Sericdivert(0)
1051222Seric
11*58679SericVERSIONID(`@(#)proto.m4	6.22 (Berkeley) 03/15/93')
1251222Seric
1351322SericMAILER(local)dnl
1451222Seric
1552646Sericifdef(`_OLD_SENDMAIL_', `dnl',
1658119Seric`# level 4 config file format
1758119SericV4')
1852646Seric
1951222Seric##################
2051222Seric#   local info   #
2151222Seric##################
2251222Seric
2351889SericCwlocalhost
2451887Sericifdef(`USE_CW_FILE',
2551889Seric`# file containing names of hosts for which we receive email
2658406SericCONCAT(`Fw', confCW_FILE)', `dnl')
2751222Seric
2851222Sericifdef(`UUCP_RELAY',
2951222Seric`# UUCP relay host
3051281SericCONCAT(DY, UUCP_RELAY)
3157944Seric
3251222Seric')dnl
3351222Sericifdef(`BITNET_RELAY',
3451222Seric`#  BITNET relay host
3551222SericCONCAT(DB, BITNET_RELAY)
3657944Seric
3751222Seric')dnl
3851222Sericifdef(`CSNET_RELAY',
3951222Seric`# CSNET relay host
4051222SericCONCAT(DC, CSNET_RELAY)
4157944Seric
4251222Seric')dnl
4358364Sericifdef(`FAX_RELAY',
4458364Seric`# FAX relay host
4558364SericCONCAT(DF, FAX_RELAY)
4658364Seric
4758364Seric')dnl
4858070Sericifdef(`SMART_HOST',
4958070Seric`# "Smart" UUCP relay host
5058070SericCONCAT(DS, SMART_HOST)
5151222Seric
5258070Seric')dnl
5351222Seric# who I send unqualified names to (null means deliver locally)
5451222SericCONCAT(DR, ifdef(`LOCAL_RELAY', LOCAL_RELAY))
5551222Seric
5657527Seric# who gets all local email traffic ($R has precedence for unqualified names)
5757527SericCONCAT(DH, ifdef(`MAIL_HUB', MAIL_HUB))
5857527Seric
5958070Seric# my official hostname ($w or $w.$D)
6058070SericCONCAT(Dj$w, ifdef(`NEED_DOMAIN', .$D))
6158070Seric
6258070Seric# who I masquerade as (can be $j)
6358070SericCONCAT(DM, ifdef(`MASQUERADE_NAME', MASQUERADE_NAME, $j))
6458070Seric
6557245Seric# class L: names that should be delivered locally, even if we have a relay
6657245Seric# class E: names that should be exposed as from this host, even if we masquerade
6751279SericCLroot
6857245SericCEroot
6951279Sericundivert(5)dnl
7051279Seric
7151222Seric# operators that cannot be in local usernames (i.e., network indicators)
7258288SericCO @ % ifdef(`_NO_UUCP_', `', `!')
7351222Seric
7451322Seric# a class with just dot (for identifying canonical names)
7551322SericC..
7651322Seric
7757944Seric
7857944Seric######################
7957944Seric#   Special macros   #
8057944Seric######################
8157944Seric
8257944Seric# SMTP initial login message
8357944SericCONCAT(De, confSMTP_LOGIN_MSG)
8457944Seric
8557944Seric# UNIX initial From header format
8657944SericCONCAT(Dl, confFROM_LINE)
8757944Seric
8857944Seric# my name for error messages
8957944SericCONCAT(Dn, confMAILER_NAME)
9057944Seric
9157944Seric# delimiter (operator) characters
9257944SericCONCAT(Do, confOPERATORS)
9357944Seric
9457944Seric# format of a total name
9557944SericCONCAT(Dq, ifdef(`confFROM_HEADER', confFROM_HEADER,
9657944Seric	ifdef(`_OLD_SENDMAIL_', `$g$?x ($x)$.', `$?x$x <$g>$|$g$.')))
9757944Sericinclude(`../m4/version.m4')
9857944Seric
9957944Seric###############
10057944Seric#   Options   #
10157944Seric###############
10257944Seric
10357944Seric# preserve 8 bits on message body on input?
10457944SericCONCAT(O8, confEIGHT_BIT_INPUT)
10557944Seric
10657944Seric# wait (in minutes) for alias file rebuild
10757944SericCONCAT(Oa, confALIAS_WAIT)
10857944Seric
10957944Seric# location of alias file
11057944SericCONCAT(OA, ifdef(`ALIAS_FILE', ALIAS_FILE, /etc/aliases))
11157944Seric
11258084Seric# minimum number of free blocks on filesystem
11358084SericCONCAT(Ob, confMIN_FREE_BLOCKS)
11458084Seric
11557944Seric# substitution for space (blank) characters
11657944SericCONCAT(OB, confBLANK_SUB)
11757944Seric
11857944Seric# connect to "expensive" mailers on initial submission?
11957944SericCONCAT(Oc, confCON_EXPENSIVE)
12057944Seric
12157944Seric# checkpoint queue runs after every N successful deliveries
12257944SericCONCAT(OC, confCHECKPOINT_INTERVAL)
12357944Seric
12457944Seric# default delivery mode
12557944SericCONCAT(Od, confDELIVERY_MODE)
12657944Seric
12757944Seric# automatically rebuild the alias database?
12857944SericCONCAT(OD, confAUTO_REBUILD)
12957944Seric
13057944Seric# error message header/file */
13157944Sericifdef(`confERROR_MESSAGE',
13257944Seric	concat(OE, confERROR_MESSAGE),
13357944Seric	#OE/etc/sendmail.oE)
13457944Seric
13557944Seric# error mode
13657944Sericifdef(`confERROR_MODE',
13757944Seric	concat(Oe, confERROR_MODE),
13857944Seric	#Oep)
13957944Seric
14057944Seric# save Unix-style "From_" lines at top of header?
14157944SericCONCAT(Of, confSAVE_FROM_LINES)
14257944Seric
14357944Seric# temporary file mode
14457944SericCONCAT(OF, confTEMP_FILE_MODE)
14557944Seric
14657944Seric# match recipients against GECOS field?
14757944SericCONCAT(OG, confMATCH_GECOS)
14857944Seric
14957944Seric# default GID
15057944SericCONCAT(Og, confDEF_GROUP_ID)
15157944Seric
15257944Seric# maximum hop count
15357944SericCONCAT(Oh, confMAX_HOP)
15457944Seric
15557944Seric# location of help file
15657944SericCONCAT(OH, ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf))
15757944Seric
15857944Seric# ignore dots as terminators in incoming messages?
15957944SericCONCAT(Oi, confIGNORE_DOTS)
16057944Seric
16157944Seric# Insist that the BIND name server be running to resolve names
16257944Sericifdef(`confBIND_OPTS',
16357944Seric	CONCAT(OI, confBIND_OPTS),
16457944Seric	#OI)
16557944Seric
16657944Seric# Forward file search path
16757944Sericifdef(`confFORWARD_PATH',
16857944Seric	CONCAT(OJ, confFORWARD_PATH),
16957944Seric	#OJ/var/forward/$u:$z/.forward.$w:$z/.forward)
17057944Seric
17157944Seric# open connection cache size
17257944SericCONCAT(Ok, confMCI_CACHE_SIZE)
17357944Seric
17457944Seric# open connection cache timeout
17557944SericCONCAT(OK, confMCI_CACHE_TIMEOUT)
17657944Seric
17757944Seric# log level
17857944SericCONCAT(OL, confLOG_LEVEL)
17957944Seric
18057944Seric# send to me too, even in an alias expansion?
18157944SericCONCAT(Om, confME_TOO)
18257944Seric
18357944Seric# verify RHS in newaliases?
18457944SericCONCAT(On, confCHECK_ALIASES)
18557944Seric
18657944Seric# default messages to old style headers if no special punctuation?
18757944SericCONCAT(Oo, confOLD_STYLE_HEADERS)
18857944Seric
18958084Seric# privacy flags
19058084SericCONCAT(Op, confPRIVACY_FLAGS)
19158084Seric
19257944Seric# who (if anyone) should get extra copies of error messages
19357944Sericifdef(`confCOPY_ERRORS_TO',
19457944Seric	CONCAT(OP, confCOPY_ERRORS_TO),
19557944Seric	#OPPostmaster)
19657944Seric
19757944Seric# slope of queue-only function
19857944Sericifdef(`confQUEUE_FACTOR',
19957944Seric	CONCAT(Oq, confQUEUE_FACTOR),
20057944Seric	#Oq600000)
20157944Seric
20257944Seric# queue directory
20357944SericCONCAT(OQ, ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue))
20457944Seric
20557944Seric# read timeout -- now OK per RFC 1123 section 5.3.2
20658119Sericifdef(`confREAD_TIMEOUT',
20758119Seric	CONCAT(Or, confREAD_TIMEOUT),
20858119Seric	#Ordatablock=10m)
20957944Seric
21057944Seric# queue up everything before forking?
21157944SericCONCAT(Os, confSAFE_QUEUE)
21257944Seric
21357944Seric# status file
21457944SericCONCAT(OS, ifdef(`STATUS_FILE', STATUS_FILE, /etc/sendmail.st))
21557944Seric
21657944Seric# default message timeout interval
21757944SericCONCAT(OT, confMESSAGE_TIMEOUT)
21857944Seric
21957944Seric# time zone handling:
22057944Seric#  if undefined, use system default
22157944Seric#  if defined but null, use TZ envariable passed in
22257944Seric#  if defined and non-null, use that info
22357944Sericifelse(confTIME_ZONE, `USE_SYSTEM', `#Ot',
22457944Seric	confTIME_ZONE, `USE_TZ', `',
22557944Seric	`CONCAT(Ot, confTIME_ZONE)')
22657944Seric
22757944Seric# default UID
22857944SericCONCAT(Ou, confDEF_USER_ID)
22957944Seric
23051887Seric# list of locations of user database file (null means no lookup)
23157944SericCONCAT(OU, ifdef(`USERDB_SPEC', `USERDB_SPEC'))
23251222Seric
23357944Seric# load average at which we just queue messages
23457944SericCONCAT(Ox, confQUEUE_LA)
23557944Seric
23657944Seric# load average at which we refuse connections
23757944SericCONCAT(OX, confREFUSE_LA)
23857944Seric
23957944Seric# work recipient factor
24057944Sericifdef(`confWORK_RECIPIENT_FACTOR',
24157944Seric	CONCAT(Oy, confWORK_RECIPIENT_FACTOR),
24257944Seric	#Oy30000)
24357944Seric
24457944Seric# deliver each queued job in a separate process?
24557944SericCONCAT(OY, confSEPARATE_PROC)
24657944Seric
24757944Seric# work class factor
24857944Sericifdef(`confWORK_CLASS_FACTOR',
24957944Seric	CONCAT(Oz, confWORK_CLASS_FACTOR),
25057944Seric	#Oz1800)
25157944Seric
25257944Seric# work time factor
25357944Sericifdef(`confWORK_TIME_FACTOR',
25457944Seric	CONCAT(OZ, confWORK_TIME_FACTOR),
25557944Seric	#OZ90000)
25657944Seric
25757944Seric###########################
25857944Seric#   Message precedences   #
25957944Seric###########################
26057944Seric
26157944SericPfirst-class=0
26257944SericPspecial-delivery=100
26358070SericPlist=-30
26457944SericPbulk=-60
26557944SericPjunk=-100
26657944Seric
26757944Seric#####################
26857944Seric#   Trusted users   #
26957944Seric#####################
27057944Seric
27157944SericTroot
27257944SericTdaemon
27357944SericTuucp
27457944Seric
27557944Seric#########################
27657944Seric#   Format of headers   #
27757944Seric#########################
27857944Seric
279*58679SericH?P?Return-Path: $g
28057944SericHReceived: $?sfrom $s $.by $j ($v/$Z) id $i; $b
28157944SericH?D?Resent-Date: $a
28257944SericH?D?Date: $a
28357944SericH?F?Resent-From: $q
28457944SericH?F?From: $q
28557944SericH?x?Full-Name: $x
28657944SericHSubject:
28757944Seric# HPosted-Date: $a
28857944Seric# H?l?Received-Date: $b
28957944SericH?M?Resent-Message-Id: <$t.$i@$j>
29057944SericH?M?Message-Id: <$t.$i@$j>
29156786Sericundivert(6)dnl
29251222Seric#
29351222Seric######################################################################
29451222Seric######################################################################
29551222Seric#####
29651222Seric#####			REWRITING RULES
29751222Seric#####
29851222Seric######################################################################
29951222Seric######################################################################
30051222Seric
30158678Sericundivert(9)dnl
30251222Seric
30351222Seric###########################################
30451222Seric###  Rulset 3 -- Name Canonicalization  ###
30551222Seric###########################################
30651260SericS3
30751222Seric
30858499Seric# handle null input and list syntax (translate to <@> special case)
30958499SericR$@			$@ <@>
31058499SericR$*:;$*			$@ $1 ;: <@>
31158174Seric
31251222Seric# basic textual canonicalization -- note RFC733 heuristic here
31357012SericR$*<$*>$*<$*>$*		<$2>$3$4$5			strip multiple <> <>
31458158SericR$*<$*<$+>$*>$*		<$3>$5				2-level <> nesting
31558499SericR$*<>$*			$@ <@>				MAIL FROM:<> case
31651222SericR$*<$+>$*		$2				basic RFC821/822 parsing
31751222Seric
31851222Seric# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
31955416SericR@ $+ , $+		@ $1 : $2			change all "," to ":"
32051222Seric
32151222Seric# localize and dispose of route-based addresses
32255416SericR@ $+ : $+		$@ $>6 < @$1 > : $2		handle <route-addr>
32351222Seric
32451222Seric# find focus for list syntax
32555416SericR $+ : $* ; @ $+	$@ $>6 $1 : $2 ; < @ $3 >	list syntax
32655416SericR $+ : $* ;		$@ $1 : $2;			list syntax
32751222Seric
32851222Seric# find focus for @ syntax addresses
32955416SericR$+ @ $+		$: $1 < @ $2 >			focus on domain
33055416SericR$+ < $+ @ $+ >		$1 $2 < @ $3 >			move gaze right
33155416SericR$+ < @ $+ >		$@ $>6 $1 < @ $2 >		already canonical
33251222Seric
33358288Sericifdef(`_NO_UUCP_', `dnl',
33458288Seric`# convert old-style addresses to a domain-based address
33555416SericR$- ! $+		$@ $>6 $2 < @ $1 .UUCP >	resolve uucp names
33655416SericR$+ . $- ! $+		$@ $>6 $3 < @ $1 . $2 >		domain uucps
33758288SericR$+ ! $+		$@ $>6 $2 < @ $1 .UUCP >	uucp subdomains')
33851222Seric
33951222Seric# if we have % signs, take the rightmost one
34055416SericR$* % $*		$1 @ $2				First make them all @s.
34155416SericR$* @ $* @ $*		$1 % $2 @ $3			Undo all but the last.
34255416SericR$* @ $*		$@ $>6 $1 < @ $2 >		Insert < > and finish
34351222Seric
34451222Seric# else we must be a local name
34551222Seric
34651222Seric
34751222Seric###############################################
34851222Seric###  Ruleset 6 -- bottom half of ruleset 3  ###
34951222Seric###############################################
35051222Seric
35157245Seric#  At this point, everything should be in a "local_part<@domain>extra" format.
35251222SericS6
35351222Seric
35451222Seric# handle special cases for local names
35551322SericR$* < @ $=w > $*		$: $1 < @ $j . > $3		no domain at all
35655416SericR$* < @ $=w . UUCP > $*		$: $1 < @ $j . > $3		.UUCP domain
35751889Sericundivert(2)dnl
35851222Seric
35951274Sericifdef(`UUCP_RELAY',
36051274Seric`# pass UUCP addresses straight through
36155416SericR$* < @ $+ . UUCP > $*		$@ $1 < @ $2 . UUCP > $3',
36251274Seric`# if really UUCP, handle it immediately
36351322Sericifdef(`_CLASS_U_',
36455416Seric`R$* < @ $=U . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
36551322Sericifdef(`_CLASS_V_',
36655416Seric`R$* < @ $=V . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
36751322Sericifdef(`_CLASS_W_',
36855416Seric`R$* < @ $=W . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
36951322Sericifdef(`_CLASS_X_',
37055416Seric`R$* < @ $=X . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
37151322Sericifdef(`_CLASS_Y_',
37255416Seric`R$* < @ $=Y . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
37351267Seric
37451267Seric# try UUCP traffic as a local address
37555416SericR$* < @ $+ . UUCP > $*		$: $1 < @ $[ $2 $] . UUCP > $3
37651992Sericifdef(`_OLD_SENDMAIL_',
37755416Seric`R$* < @ $+ . $+ . UUCP > $*		$@ $1 < @ $2 . $3 . > $4',
37855416Seric`R$* < @ $+ . . UUCP > $*		$@ $1 < @ $2 . > $3')')
37951267Seric
38051222Seric# pass to name server to make hostname canonical
38151322SericR$* < @ $* $~. > $*		$: $1 < @ $[ $2 $3 $] > $4
38251222Seric
38351889Seric# handle possible alternate names
38451889SericR$* < @ $=w . $m . > $*		$: $1 < @ $j . > $3
38551889SericR$* < @ $=w . $m > $*		$: $1 < @ $j . > $3
38651889Sericundivert(8)dnl
38751889Seric
38851322Seric# if this is the local hostname, make sure we treat is as canonical
38951322SericR$* < @ $j > $*			$: $1 < @ $j . > $2
39051222Seric
39151322Seric
39251222Seric##################################################
39351222Seric###  Ruleset 4 -- Final Output Post-rewriting  ###
39451222Seric##################################################
39551222SericS4
39651222Seric
39758499SericR$*<@>			$@ $1				handle <> and list:;
39851222Seric
39951222Seric# resolve numeric addresses to name if possible
40051322SericR$* < @ [ $+ ] > $*	$: $1 < @ $[ [$2] $] > $3	lookup numeric internet addr
40151222Seric
40251322Seric# strip trailing dot off possibly canonical name
40351322SericR$* < @ $+ . > $*	$1 < @ $2 > $3
40451322Seric
40551222Seric# externalize local domain info
40651322SericR$* < $+ > $*		$1 $2 $3			defocus
40751322SericR@ $+ : @ $+ : $+	@ $1 , @ $2 : $3		<route-addr> canonical
40851997SericR@ $*			$@ @ $1				... and exit
40951222Seric
41058288Sericifdef(`_NO_UUCP_', `dnl',
41158288Seric`# UUCP must always be presented in old form
41258288SericR$+ @ $- . UUCP		$2!$1				u@h.UUCP => h!u')
41351222Seric
41451222Seric# delete duplicate local names
41551322SericR$+ % $=w @ $=w		$1 @ $j				u%host@host => u@host
41651222Seric
41751222Seric
41851222Seric
41951222Seric#############################################################
42051222Seric###   Ruleset 7 -- recanonicalize and call ruleset zero   ###
42151222Seric###		   (used for recursive calls)		  ###
42251222Seric#############################################################
42351222Seric
42451222SericS7
42551222SericR$*			$: $>3 $1
42651222SericR$*			$@ $>0 $1
42751222Seric
42851222Seric
42951222Seric######################################
43051222Seric###   Ruleset 0 -- Parse Address   ###
43151222Seric######################################
43251222Seric
43351222SericS0
43451222Seric
43558562SericR<@>			$#local $: <>			special case error msgs
43658340Seric
43755416Sericifdef(`_MAILER_smtp_',
43855416Seric`# handle numeric address spec
43951322SericR$* < @ [ $+ ] > $*	$: $1 < @ $[ [$2] $] > $3	numeric internet addr
44055416SericR$* < @ [ $+ ] > $*	$#smtp $@ [$2] $: $1 @ [$2] $3	numeric internet spec',
44156785Seric`dnl')
44251222Seric
44351887Seric# now delete the local info -- note $=O to find characters that cause forwarding
44458482SericR$* < @ > $*		$@ $>7 $1			user@ => user
44551322SericR< @ $j . > : $*	$@ $>7 $1			@here:... -> ...
44651322SericR$* $=O $* < @ $j . >	$@ $>7 $1 $2 $3			...@here -> ...
44751222Seric
44851222Seric# short circuit local delivery so forwarded email works
44958516Sericifdef(`_LOCAL_NOT_STICKY_',
45058516Seric`R$=L < @ $j . >		$#local $: @ $1			special local names
45158516SericR$+ < @ $j . >		$#local $: $1			dispose directly',
45258516Seric`R$+ < @ $j . >		$: $1 < @ $j @ $H >		first try hub
45351992Sericifdef(`_OLD_SENDMAIL_',
45458070Seric`R$+ < $+ @ $-:$+ >	$# $3 $@ $4 $: $1 < $2 >	yep ....
45558070SericR$+ < $+ @ $+ >		$#smtp $@ $3 $: $1 < $2 >	yep ....
45657527SericR$+ < $+ @ >		$#local $: $1			nope, local address',
45757527Seric`R$+ < $+ @ $+ >		$#local $: $1			yep ....
45858516SericR$+ < $+ @ >		$#local $: @ $1			nope, local address')')
45951222Sericundivert(3)dnl
46051260Sericundivert(4)dnl
46151260Seric
46255416Seric# resolve remotely connected UUCP links (if any)
46351285Sericifdef(`_CLASS_V_',
46452044Seric`R$* < @ $=V . UUCP > $*		$#smtp $@ $V $: <@ $V> : $1 @ $2.UUCP $3',
46552044Seric	`dnl')
46651285Sericifdef(`_CLASS_W_',
46752044Seric`R$* < @ $=W . UUCP > $*		$#smtp $@ $W $: <@ $W> : $1 @ $2.UUCP $3',
46852044Seric	`dnl')
46951285Sericifdef(`_CLASS_X_',
47052044Seric`R$* < @ $=X . UUCP > $*		$#smtp $@ $X $: <@ $X> : $1 @ $2.UUCP $3',
47152044Seric	`dnl')
47251260Seric
47351222Seric# resolve fake top level domains by forwarding to other hosts
47451222Sericifdef(`BITNET_RELAY',
47552044Seric`R$*<@$+.BITNET>$*	$#smtp $@ $B $: $1 <@$2.BITNET> $3	user@host.BITNET',
47651222Seric	`dnl')
47751222Sericifdef(`CSNET_RELAY',
47852044Seric`R$*<@$+.CSNET>$*	$#smtp $@ $C $: $1 <@$2.CSNET> $3	user@host.CSNET',
47951222Seric	`dnl')
48058364Sericifdef(`_MAILER_fax_',
48158364Seric`R$+ < @ $+ .FAX >	$#fax $@ $2 $: $1			user@host.FAX',
48258364Seric`ifdef(`FAX_RELAY',
48358364Seric`R$*<@$+.FAX>$*		$#smtp $@ $F $: $1 <@$2.FAX> $3		user@host.FAX',
48458364Seric	`dnl')')
48551222Seric
48651260Sericifdef(`UUCP_RELAY',
48751260Seric`# forward non-local UUCP traffic to our UUCP relay
48852044SericR$*<@$*.UUCP>$*		$#smtp $@ $Y $: <@ $Y> : $1 @ $2.UUCP $3	uucp mail',
48955416Seric`ifdef(`_MAILER_uucp_',
49051260Seric`# forward other UUCP traffic straight to UUCP
49151260SericR< @ $+ .UUCP > : $+	$#uucp $@ $1 $: $1:$2			@host.UUCP:...
49251322SericR$+ < @ $+ .UUCP >	$#uucp $@ $2 $: $1			user@host.UUCP',
49351260Seric	`dnl')')
49451222Seric
49558070Sericifdef(`_LOCAL_RULES_',
49658070Seric`# figure out what should stay in our local mail system
49758070Sericundivert(1)',
49858070Seric`ifdef(`_MAILER_smtp_',
49955416Seric`# deal with other remote names
50058070SericR$* < @ $* > $*		$#smtp $@ $2 $: $1 < @ $2 > $3		user@host.domain')')
50158070Sericifdef(`SMART_HOST', `
50258070Seric# pass names that still have a host to a smarthost
50358070SericR$* < @ $* > $*		$: < $S > $1 < @ $2 > $3	glue on smarthost name
50458070SericR<$-:$+> $* < @$* > $*	$# $1 $@ $2 $: $3 < @ $4 > $5	if non-null, use it
50558070SericR<$+> $* < @$* > $*	$#suucp $@ $1 $: $2 < @ $3 > $4	if non-null, use it
50658070SericR<> $* < @ $* > $*	$1 < @ $2 > $3			else strip off gunk',
50758070Seric`ifdef(`_LOCAL_RULES_', `
50858070Seric# reject messages that have host names we do not understand
50958070SericR$* < @ $* > $*		$#error $@ NOHOST $: Unrecognized host name $2',
51058070Seric`dnl')')
51158084Sericifdef(`_MAILER_USENET_', `
51258084Seric# addresses sent to net.group.USENET will get forwarded to a newsgroup
51358096SericR$+ . USENET		$# usenet $: $1')
51451222Seric
51551992Sericifdef(`_OLD_SENDMAIL_',
51651887Seric`# forward remaining names to local relay, if any
51752041SericR$=L			$#local $: $1			special local names
51852041SericR$+			$: $1 < @ $R >			append relay
51957527SericR$+ < @ >		$: $1 < @ $H >			no relay, try hub
52057527SericR$+ < @ >		$#local $: $1			no relay or hub: local
52157527SericR$+ < @ $j  >		$#local $: $1			we are relay/hub: local
52258070SericR$+ < @ $-:$+ >		$# $2 $@ $3 $: $1		deliver to relay/hub
52357527SericR$+ < @ $+ >		$#smtp $@ $2 $: $1		deliver to relay/hub',
52451992Seric`# handle locally delivered names
52552041SericR$=L			$#local $: @ $1			special local names
52652041SericR$+			$#local $: $1			regular local names
52751222Seric
52855416Seric###########################################################################
52955416Seric###   Ruleset 5 -- special rewriting after aliases have been expanded   ###
53055416Seric###		   (new sendmail only)					###
53155416Seric###########################################################################
53251222Seric
53351322SericS5
53451322Seric
53555416Sericifdef(`_MAILER_smtp_',
53655416Seric`R$+			$: $1 < @ $R >
53757527SericR$+ < @ >		$: $1 < @ $H >			no relay, try hub
53857527SericR$+ < @ $j >		$@ $1				we are relay/hub: local
53958070SericR$+ < @ $-:$+ >		$# $2 $@ $3 $: $1		send to relay or hub
54057527SericR$+ < @ $+ >		$#smtp $@ $2 $: $1		send to relay or hub')')
54151222Seric#
54251222Seric######################################################################
54351222Seric######################################################################
54451222Seric#####
54556790Seric`#####			MAILER DEFINITIONS'
54651222Seric#####
54751222Seric######################################################################
54851222Seric######################################################################
54951222Sericundivert(7)dnl
550