xref: /csrg-svn/usr.sbin/sendmail/cf/m4/proto.m4 (revision 58158)
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*58158SericVERSIONID(`@(#)proto.m4	6.9 (Berkeley) 02/23/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
2651222SericFw/etc/sendmail.cw', `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
4358070Sericifdef(`SMART_HOST',
4458070Seric`# "Smart" UUCP relay host
4558070SericCONCAT(DS, SMART_HOST)
4651222Seric
4758070Seric')dnl
4851222Seric# who I send unqualified names to (null means deliver locally)
4951222SericCONCAT(DR, ifdef(`LOCAL_RELAY', LOCAL_RELAY))
5051222Seric
5157527Seric# who gets all local email traffic ($R has precedence for unqualified names)
5257527SericCONCAT(DH, ifdef(`MAIL_HUB', MAIL_HUB))
5357527Seric
5458070Seric# my official hostname ($w or $w.$D)
5558070SericCONCAT(Dj$w, ifdef(`NEED_DOMAIN', .$D))
5658070Seric
5758070Seric# who I masquerade as (can be $j)
5858070SericCONCAT(DM, ifdef(`MASQUERADE_NAME', MASQUERADE_NAME, $j))
5958070Seric
6057245Seric# class L: names that should be delivered locally, even if we have a relay
6157245Seric# class E: names that should be exposed as from this host, even if we masquerade
6251279SericCLroot
6357245SericCEroot
6451279Sericundivert(5)dnl
6551279Seric
6651222Seric# operators that cannot be in local usernames (i.e., network indicators)
6751222SericCO @ % !
6851222Seric
6951322Seric# a class with just dot (for identifying canonical names)
7051322SericC..
7151322Seric
7257944Seric
7357944Seric######################
7457944Seric#   Special macros   #
7557944Seric######################
7657944Seric
7757944Seric# SMTP initial login message
7857944SericCONCAT(De, confSMTP_LOGIN_MSG)
7957944Seric
8057944Seric# UNIX initial From header format
8157944SericCONCAT(Dl, confFROM_LINE)
8257944Seric
8357944Seric# my name for error messages
8457944SericCONCAT(Dn, confMAILER_NAME)
8557944Seric
8657944Seric# delimiter (operator) characters
8757944SericCONCAT(Do, confOPERATORS)
8857944Seric
8957944Seric# format of a total name
9057944SericCONCAT(Dq, ifdef(`confFROM_HEADER', confFROM_HEADER,
9157944Seric	ifdef(`_OLD_SENDMAIL_', `$g$?x ($x)$.', `$?x$x <$g>$|$g$.')))
9257944Sericinclude(`../m4/version.m4')
9357944Seric
9457944Seric###############
9557944Seric#   Options   #
9657944Seric###############
9757944Seric
9857944Seric# preserve 8 bits on message body on input?
9957944SericCONCAT(O8, confEIGHT_BIT_INPUT)
10057944Seric
10157944Seric# wait (in minutes) for alias file rebuild
10257944SericCONCAT(Oa, confALIAS_WAIT)
10357944Seric
10457944Seric# location of alias file
10557944SericCONCAT(OA, ifdef(`ALIAS_FILE', ALIAS_FILE, /etc/aliases))
10657944Seric
10758084Seric# minimum number of free blocks on filesystem
10858084SericCONCAT(Ob, confMIN_FREE_BLOCKS)
10958084Seric
11057944Seric# substitution for space (blank) characters
11157944SericCONCAT(OB, confBLANK_SUB)
11257944Seric
11357944Seric# connect to "expensive" mailers on initial submission?
11457944SericCONCAT(Oc, confCON_EXPENSIVE)
11557944Seric
11657944Seric# checkpoint queue runs after every N successful deliveries
11757944SericCONCAT(OC, confCHECKPOINT_INTERVAL)
11857944Seric
11957944Seric# default delivery mode
12057944SericCONCAT(Od, confDELIVERY_MODE)
12157944Seric
12257944Seric# automatically rebuild the alias database?
12357944SericCONCAT(OD, confAUTO_REBUILD)
12457944Seric
12557944Seric# error message header/file */
12657944Sericifdef(`confERROR_MESSAGE',
12757944Seric	concat(OE, confERROR_MESSAGE),
12857944Seric	#OE/etc/sendmail.oE)
12957944Seric
13057944Seric# error mode
13157944Sericifdef(`confERROR_MODE',
13257944Seric	concat(Oe, confERROR_MODE),
13357944Seric	#Oep)
13457944Seric
13557944Seric# save Unix-style "From_" lines at top of header?
13657944SericCONCAT(Of, confSAVE_FROM_LINES)
13757944Seric
13857944Seric# temporary file mode
13957944SericCONCAT(OF, confTEMP_FILE_MODE)
14057944Seric
14157944Seric# match recipients against GECOS field?
14257944SericCONCAT(OG, confMATCH_GECOS)
14357944Seric
14457944Seric# default GID
14557944SericCONCAT(Og, confDEF_GROUP_ID)
14657944Seric
14757944Seric# maximum hop count
14857944SericCONCAT(Oh, confMAX_HOP)
14957944Seric
15057944Seric# location of help file
15157944SericCONCAT(OH, ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf))
15257944Seric
15357944Seric# ignore dots as terminators in incoming messages?
15457944SericCONCAT(Oi, confIGNORE_DOTS)
15557944Seric
15657944Seric# Insist that the BIND name server be running to resolve names
15757944Sericifdef(`confBIND_OPTS',
15857944Seric	CONCAT(OI, confBIND_OPTS),
15957944Seric	#OI)
16057944Seric
16157944Seric# Forward file search path
16257944Sericifdef(`confFORWARD_PATH',
16357944Seric	CONCAT(OJ, confFORWARD_PATH),
16457944Seric	#OJ/var/forward/$u:$z/.forward.$w:$z/.forward)
16557944Seric
16657944Seric# open connection cache size
16757944SericCONCAT(Ok, confMCI_CACHE_SIZE)
16857944Seric
16957944Seric# open connection cache timeout
17057944SericCONCAT(OK, confMCI_CACHE_TIMEOUT)
17157944Seric
17257944Seric# log level
17357944SericCONCAT(OL, confLOG_LEVEL)
17457944Seric
17557944Seric# send to me too, even in an alias expansion?
17657944SericCONCAT(Om, confME_TOO)
17757944Seric
17857944Seric# verify RHS in newaliases?
17957944SericCONCAT(On, confCHECK_ALIASES)
18057944Seric
18157944Seric# default messages to old style headers if no special punctuation?
18257944SericCONCAT(Oo, confOLD_STYLE_HEADERS)
18357944Seric
18458084Seric# privacy flags
18558084SericCONCAT(Op, confPRIVACY_FLAGS)
18658084Seric
18757944Seric# who (if anyone) should get extra copies of error messages
18857944Sericifdef(`confCOPY_ERRORS_TO',
18957944Seric	CONCAT(OP, confCOPY_ERRORS_TO),
19057944Seric	#OPPostmaster)
19157944Seric
19257944Seric# slope of queue-only function
19357944Sericifdef(`confQUEUE_FACTOR',
19457944Seric	CONCAT(Oq, confQUEUE_FACTOR),
19557944Seric	#Oq600000)
19657944Seric
19757944Seric# queue directory
19857944SericCONCAT(OQ, ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue))
19957944Seric
20057944Seric# read timeout -- now OK per RFC 1123 section 5.3.2
20158119Sericifdef(`confREAD_TIMEOUT',
20258119Seric	CONCAT(Or, confREAD_TIMEOUT),
20358119Seric	#Ordatablock=10m)
20457944SericCONCAT(Or, confREAD_TIMEOUT)
20557944Seric
20657944Seric# queue up everything before forking?
20757944SericCONCAT(Os, confSAFE_QUEUE)
20857944Seric
20957944Seric# status file
21057944SericCONCAT(OS, ifdef(`STATUS_FILE', STATUS_FILE, /etc/sendmail.st))
21157944Seric
21257944Seric# default message timeout interval
21357944SericCONCAT(OT, confMESSAGE_TIMEOUT)
21457944Seric
21557944Seric# time zone handling:
21657944Seric#  if undefined, use system default
21757944Seric#  if defined but null, use TZ envariable passed in
21857944Seric#  if defined and non-null, use that info
21957944Sericifelse(confTIME_ZONE, `USE_SYSTEM', `#Ot',
22057944Seric	confTIME_ZONE, `USE_TZ', `',
22157944Seric	`CONCAT(Ot, confTIME_ZONE)')
22257944Seric
22357944Seric# default UID
22457944SericCONCAT(Ou, confDEF_USER_ID)
22557944Seric
22651887Seric# list of locations of user database file (null means no lookup)
22757944SericCONCAT(OU, ifdef(`USERDB_SPEC', `USERDB_SPEC'))
22851222Seric
22957944Seric# load average at which we just queue messages
23057944SericCONCAT(Ox, confQUEUE_LA)
23157944Seric
23257944Seric# load average at which we refuse connections
23357944SericCONCAT(OX, confREFUSE_LA)
23457944Seric
23557944Seric# work recipient factor
23657944Sericifdef(`confWORK_RECIPIENT_FACTOR',
23757944Seric	CONCAT(Oy, confWORK_RECIPIENT_FACTOR),
23857944Seric	#Oy30000)
23957944Seric
24057944Seric# deliver each queued job in a separate process?
24157944SericCONCAT(OY, confSEPARATE_PROC)
24257944Seric
24357944Seric# work class factor
24457944Sericifdef(`confWORK_CLASS_FACTOR',
24557944Seric	CONCAT(Oz, confWORK_CLASS_FACTOR),
24657944Seric	#Oz1800)
24757944Seric
24857944Seric# work time factor
24957944Sericifdef(`confWORK_TIME_FACTOR',
25057944Seric	CONCAT(OZ, confWORK_TIME_FACTOR),
25157944Seric	#OZ90000)
25257944Seric
25357944Seric###########################
25457944Seric#   Message precedences   #
25557944Seric###########################
25657944Seric
25757944SericPfirst-class=0
25857944SericPspecial-delivery=100
25958070SericPlist=-30
26057944SericPbulk=-60
26157944SericPjunk=-100
26257944Seric
26357944Seric#####################
26457944Seric#   Trusted users   #
26557944Seric#####################
26657944Seric
26757944SericTroot
26857944SericTdaemon
26957944SericTuucp
27057944Seric
27157944Seric#########################
27257944Seric#   Format of headers   #
27357944Seric#########################
27457944Seric
27557944SericH?P?Return-Path: <$?<$<$|$g$.>
27657944SericHReceived: $?sfrom $s $.by $j ($v/$Z) id $i; $b
27757944SericH?D?Resent-Date: $a
27857944SericH?D?Date: $a
27957944SericH?F?Resent-From: $q
28057944SericH?F?From: $q
28157944SericH?x?Full-Name: $x
28257944SericHSubject:
28357944Seric# HPosted-Date: $a
28457944Seric# H?l?Received-Date: $b
28557944SericH?M?Resent-Message-Id: <$t.$i@$j>
28657944SericH?M?Message-Id: <$t.$i@$j>
28756786Sericundivert(6)dnl
28851222Seric#
28951222Seric######################################################################
29051222Seric######################################################################
29151222Seric#####
29251222Seric#####			REWRITING RULES
29351222Seric#####
29451222Seric######################################################################
29551222Seric######################################################################
29651222Seric
29751222Seric
29851222Seric###########################################
29951222Seric###  Rulset 3 -- Name Canonicalization  ###
30051222Seric###########################################
30151260SericS3
30251222Seric
30351222Seric# basic textual canonicalization -- note RFC733 heuristic here
30457012SericR$*<$*>$*<$*>$*		<$2>$3$4$5			strip multiple <> <>
305*58158SericR$*<$*<$+>$*>$*		<$3>$5				2-level <> nesting
306*58158SericR$*<>$*			$@ $<@>				MAIL FROM:<> case
30751222SericR$*<$+>$*		$2				basic RFC821/822 parsing
30851222Seric
30951222Seric# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
31055416SericR@ $+ , $+		@ $1 : $2			change all "," to ":"
31151222Seric
31251222Seric# localize and dispose of route-based addresses
31355416SericR@ $+ : $+		$@ $>6 < @$1 > : $2		handle <route-addr>
31451222Seric
31551222Seric# find focus for list syntax
31655416SericR $+ : $* ; @ $+	$@ $>6 $1 : $2 ; < @ $3 >	list syntax
31755416SericR $+ : $* ;		$@ $1 : $2;			list syntax
31851222Seric
31951222Seric# find focus for @ syntax addresses
32055416SericR$+ @ $+		$: $1 < @ $2 >			focus on domain
32155416SericR$+ < $+ @ $+ >		$1 $2 < @ $3 >			move gaze right
32255416SericR$+ < @ $+ >		$@ $>6 $1 < @ $2 >		already canonical
32351222Seric
32451222Seric# convert old-style addresses to a domain-based address
32555416SericR$- ! $+		$@ $>6 $2 < @ $1 .UUCP >	resolve uucp names
32655416SericR$+ . $- ! $+		$@ $>6 $3 < @ $1 . $2 >		domain uucps
32755416SericR$+ ! $+		$@ $>6 $2 < @ $1 .UUCP >	uucp subdomains
32851222Seric
32951222Seric# if we have % signs, take the rightmost one
33055416SericR$* % $*		$1 @ $2				First make them all @s.
33155416SericR$* @ $* @ $*		$1 % $2 @ $3			Undo all but the last.
33255416SericR$* @ $*		$@ $>6 $1 < @ $2 >		Insert < > and finish
33351222Seric
33451222Seric# else we must be a local name
33551222Seric
33651222Seric
33751222Seric###############################################
33851222Seric###  Ruleset 6 -- bottom half of ruleset 3  ###
33951222Seric###############################################
34051222Seric
34157245Seric#  At this point, everything should be in a "local_part<@domain>extra" format.
34251222SericS6
34351222Seric
34451222Seric# handle special cases for local names
34551322SericR$* < @ $=w > $*		$: $1 < @ $j . > $3		no domain at all
34655416SericR$* < @ $=w . UUCP > $*		$: $1 < @ $j . > $3		.UUCP domain
34751889Sericundivert(2)dnl
34851222Seric
34951274Sericifdef(`UUCP_RELAY',
35051274Seric`# pass UUCP addresses straight through
35155416SericR$* < @ $+ . UUCP > $*		$@ $1 < @ $2 . UUCP > $3',
35251274Seric`# if really UUCP, handle it immediately
35351322Sericifdef(`_CLASS_U_',
35455416Seric`R$* < @ $=U . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
35551322Sericifdef(`_CLASS_V_',
35655416Seric`R$* < @ $=V . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
35751322Sericifdef(`_CLASS_W_',
35855416Seric`R$* < @ $=W . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
35951322Sericifdef(`_CLASS_X_',
36055416Seric`R$* < @ $=X . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
36151322Sericifdef(`_CLASS_Y_',
36255416Seric`R$* < @ $=Y . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
36351267Seric
36451267Seric# try UUCP traffic as a local address
36555416SericR$* < @ $+ . UUCP > $*		$: $1 < @ $[ $2 $] . UUCP > $3
36651992Sericifdef(`_OLD_SENDMAIL_',
36755416Seric`R$* < @ $+ . $+ . UUCP > $*		$@ $1 < @ $2 . $3 . > $4',
36855416Seric`R$* < @ $+ . . UUCP > $*		$@ $1 < @ $2 . > $3')')
36951267Seric
37051222Seric# pass to name server to make hostname canonical
37151322SericR$* < @ $* $~. > $*		$: $1 < @ $[ $2 $3 $] > $4
37251222Seric
37351889Seric# handle possible alternate names
37451889SericR$* < @ $=w . $m . > $*		$: $1 < @ $j . > $3
37551889SericR$* < @ $=w . $m > $*		$: $1 < @ $j . > $3
37651889Sericundivert(8)dnl
37751889Seric
37851322Seric# if this is the local hostname, make sure we treat is as canonical
37951322SericR$* < @ $j > $*			$: $1 < @ $j . > $2
38051222Seric
38151322Seric
38251222Seric##################################################
38351222Seric###  Ruleset 4 -- Final Output Post-rewriting  ###
38451222Seric##################################################
38551222SericS4
38651222Seric
38758119SericR<@>			$@				handle <> error addr
38851222Seric
38951222Seric# resolve numeric addresses to name if possible
39051322SericR$* < @ [ $+ ] > $*	$: $1 < @ $[ [$2] $] > $3	lookup numeric internet addr
39151222Seric
39251322Seric# strip trailing dot off possibly canonical name
39351322SericR$* < @ $+ . > $*	$1 < @ $2 > $3
39451322Seric
39551222Seric# externalize local domain info
39651322SericR$* < $+ > $*		$1 $2 $3			defocus
39751322SericR@ $+ : @ $+ : $+	@ $1 , @ $2 : $3		<route-addr> canonical
39851997SericR@ $*			$@ @ $1				... and exit
39951222Seric
40051222Seric# UUCP must always be presented in old form
40151322SericR$+ @ $- . UUCP		$2!$1				u@h.UUCP => h!u
40251222Seric
40351222Seric# delete duplicate local names
40451322SericR$+ % $=w @ $=w		$1 @ $j				u%host@host => u@host
40551222Seric
40651222Seric
40751222Seric
40851222Seric#############################################################
40951222Seric###   Ruleset 7 -- recanonicalize and call ruleset zero   ###
41051222Seric###		   (used for recursive calls)		  ###
41151222Seric#############################################################
41251222Seric
41351222SericS7
41451222SericR$*			$: $>3 $1
41551222SericR$*			$@ $>0 $1
41651222Seric
41751222Seric
41851222Seric######################################
41951222Seric###   Ruleset 0 -- Parse Address   ###
42051222Seric######################################
42151222Seric
42251222SericS0
42351222Seric
42455416Sericifdef(`_MAILER_smtp_',
42555416Seric`# handle numeric address spec
42651322SericR$* < @ [ $+ ] > $*	$: $1 < @ $[ [$2] $] > $3	numeric internet addr
42755416SericR$* < @ [ $+ ] > $*	$#smtp $@ [$2] $: $1 @ [$2] $3	numeric internet spec',
42856785Seric`dnl')
42951222Seric
43051887Seric# now delete the local info -- note $=O to find characters that cause forwarding
43151322SericR< @ $j . > : $*	$@ $>7 $1			@here:... -> ...
43251322SericR$* $=O $* < @ $j . >	$@ $>7 $1 $2 $3			...@here -> ...
43351222Seric
43451222Seric# short circuit local delivery so forwarded email works
43557527SericR$+ < @ $j . >		$: $1 < @ $j @ $H >		first try hub
43651992Sericifdef(`_OLD_SENDMAIL_',
43758070Seric`R$+ < $+ @ $-:$+ >	$# $3 $@ $4 $: $1 < $2 >	yep ....
43858070SericR$+ < $+ @ $+ >		$#smtp $@ $3 $: $1 < $2 >	yep ....
43957527SericR$+ < $+ @ >		$#local $: $1			nope, local address',
44057527Seric`R$+ < $+ @ $+ >		$#local $: $1			yep ....
44157527SericR$+ < $+ @ >		$#local $: @ $1			nope, local address')
44251222Sericundivert(3)dnl
44351260Sericundivert(4)dnl
44451260Seric
44555416Seric# resolve remotely connected UUCP links (if any)
44651285Sericifdef(`_CLASS_V_',
44752044Seric`R$* < @ $=V . UUCP > $*		$#smtp $@ $V $: <@ $V> : $1 @ $2.UUCP $3',
44852044Seric	`dnl')
44951285Sericifdef(`_CLASS_W_',
45052044Seric`R$* < @ $=W . UUCP > $*		$#smtp $@ $W $: <@ $W> : $1 @ $2.UUCP $3',
45152044Seric	`dnl')
45251285Sericifdef(`_CLASS_X_',
45352044Seric`R$* < @ $=X . UUCP > $*		$#smtp $@ $X $: <@ $X> : $1 @ $2.UUCP $3',
45452044Seric	`dnl')
45551260Seric
45651222Seric# resolve fake top level domains by forwarding to other hosts
45751222Sericifdef(`BITNET_RELAY',
45852044Seric`R$*<@$+.BITNET>$*	$#smtp $@ $B $: $1 <@$2.BITNET> $3	user@host.BITNET',
45951222Seric	`dnl')
46051222Sericifdef(`CSNET_RELAY',
46152044Seric`R$*<@$+.CSNET>$*	$#smtp $@ $C $: $1 <@$2.CSNET> $3	user@host.CSNET',
46251222Seric	`dnl')
46351222Seric
46451260Sericifdef(`UUCP_RELAY',
46551260Seric`# forward non-local UUCP traffic to our UUCP relay
46652044SericR$*<@$*.UUCP>$*		$#smtp $@ $Y $: <@ $Y> : $1 @ $2.UUCP $3	uucp mail',
46755416Seric`ifdef(`_MAILER_uucp_',
46851260Seric`# forward other UUCP traffic straight to UUCP
46951260SericR< @ $+ .UUCP > : $+	$#uucp $@ $1 $: $1:$2			@host.UUCP:...
47051322SericR$+ < @ $+ .UUCP >	$#uucp $@ $2 $: $1			user@host.UUCP',
47151260Seric	`dnl')')
47251222Seric
47358070Sericifdef(`_LOCAL_RULES_',
47458070Seric`# figure out what should stay in our local mail system
47558070Sericundivert(1)',
47658070Seric`ifdef(`_MAILER_smtp_',
47755416Seric`# deal with other remote names
47858070SericR$* < @ $* > $*		$#smtp $@ $2 $: $1 < @ $2 > $3		user@host.domain')')
47958070Sericifdef(`SMART_HOST', `
48058070Seric# pass names that still have a host to a smarthost
48158070SericR$* < @ $* > $*		$: < $S > $1 < @ $2 > $3	glue on smarthost name
48258070SericR<$-:$+> $* < @$* > $*	$# $1 $@ $2 $: $3 < @ $4 > $5	if non-null, use it
48358070SericR<$+> $* < @$* > $*	$#suucp $@ $1 $: $2 < @ $3 > $4	if non-null, use it
48458070SericR<> $* < @ $* > $*	$1 < @ $2 > $3			else strip off gunk',
48558070Seric`ifdef(`_LOCAL_RULES_', `
48658070Seric# reject messages that have host names we do not understand
48758070SericR$* < @ $* > $*		$#error $@ NOHOST $: Unrecognized host name $2',
48858070Seric`dnl')')
48958084Sericifdef(`_MAILER_USENET_', `
49058084Seric# addresses sent to net.group.USENET will get forwarded to a newsgroup
49158096SericR$+ . USENET		$# usenet $: $1')
49251222Seric
49351992Sericifdef(`_OLD_SENDMAIL_',
49451887Seric`# forward remaining names to local relay, if any
49552041SericR$=L			$#local $: $1			special local names
49652041SericR$+			$: $1 < @ $R >			append relay
49757527SericR$+ < @ >		$: $1 < @ $H >			no relay, try hub
49857527SericR$+ < @ >		$#local $: $1			no relay or hub: local
49957527SericR$+ < @ $j  >		$#local $: $1			we are relay/hub: local
50058070SericR$+ < @ $-:$+ >		$# $2 $@ $3 $: $1		deliver to relay/hub
50157527SericR$+ < @ $+ >		$#smtp $@ $2 $: $1		deliver to relay/hub',
50251992Seric`# handle locally delivered names
50352041SericR$=L			$#local $: @ $1			special local names
50452041SericR$+			$#local $: $1			regular local names
50551222Seric
50655416Seric###########################################################################
50755416Seric###   Ruleset 5 -- special rewriting after aliases have been expanded   ###
50855416Seric###		   (new sendmail only)					###
50955416Seric###########################################################################
51051222Seric
51151322SericS5
51251322Seric
51355416Sericifdef(`_MAILER_smtp_',
51455416Seric`R$+			$: $1 < @ $R >
51557527SericR$+ < @ >		$: $1 < @ $H >			no relay, try hub
51657527SericR$+ < @ $j >		$@ $1				we are relay/hub: local
51758070SericR$+ < @ $-:$+ >		$# $2 $@ $3 $: $1		send to relay or hub
51857527SericR$+ < @ $+ >		$#smtp $@ $2 $: $1		send to relay or hub')')
51951222Seric#
52051222Seric######################################################################
52151222Seric######################################################################
52251222Seric#####
52356790Seric`#####			MAILER DEFINITIONS'
52451222Seric#####
52551222Seric######################################################################
52651222Seric######################################################################
52751222Sericundivert(7)dnl
528