xref: /csrg-svn/usr.sbin/sendmail/cf/m4/proto.m4 (revision 58781)
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*58781SericVERSIONID(`@(#)proto.m4	6.26 (Berkeley) 03/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
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
53*58781Sericifdef(`MAILER_TABLE',
54*58781Seric`# Mailer table (overriding domains)
55*58781SericKmailertable MAILER_TABLE
56*58781Seric
57*58781Seric')dnl
5851222Seric# who I send unqualified names to (null means deliver locally)
5951222SericCONCAT(DR, ifdef(`LOCAL_RELAY', LOCAL_RELAY))
6051222Seric
6157527Seric# who gets all local email traffic ($R has precedence for unqualified names)
6257527SericCONCAT(DH, ifdef(`MAIL_HUB', MAIL_HUB))
6357527Seric
6458070Seric# my official hostname ($w or $w.$D)
6558070SericCONCAT(Dj$w, ifdef(`NEED_DOMAIN', .$D))
6658070Seric
6758070Seric# who I masquerade as (can be $j)
6858070SericCONCAT(DM, ifdef(`MASQUERADE_NAME', MASQUERADE_NAME, $j))
6958070Seric
7057245Seric# class L: names that should be delivered locally, even if we have a relay
7157245Seric# class E: names that should be exposed as from this host, even if we masquerade
7251279SericCLroot
7357245SericCEroot
7451279Sericundivert(5)dnl
7551279Seric
7651222Seric# operators that cannot be in local usernames (i.e., network indicators)
7758288SericCO @ % ifdef(`_NO_UUCP_', `', `!')
7851222Seric
7951322Seric# a class with just dot (for identifying canonical names)
8051322SericC..
8151322Seric
8257944Seric
8357944Seric######################
8457944Seric#   Special macros   #
8557944Seric######################
8657944Seric
8757944Seric# SMTP initial login message
8857944SericCONCAT(De, confSMTP_LOGIN_MSG)
8957944Seric
9057944Seric# UNIX initial From header format
9157944SericCONCAT(Dl, confFROM_LINE)
9257944Seric
9357944Seric# my name for error messages
9457944SericCONCAT(Dn, confMAILER_NAME)
9557944Seric
9657944Seric# delimiter (operator) characters
9757944SericCONCAT(Do, confOPERATORS)
9857944Seric
9957944Seric# format of a total name
10057944SericCONCAT(Dq, ifdef(`confFROM_HEADER', confFROM_HEADER,
10157944Seric	ifdef(`_OLD_SENDMAIL_', `$g$?x ($x)$.', `$?x$x <$g>$|$g$.')))
10257944Sericinclude(`../m4/version.m4')
10357944Seric
10457944Seric###############
10557944Seric#   Options   #
10657944Seric###############
10757944Seric
10857944Seric# preserve 8 bits on message body on input?
10957944SericCONCAT(O8, confEIGHT_BIT_INPUT)
11057944Seric
11157944Seric# wait (in minutes) for alias file rebuild
11257944SericCONCAT(Oa, confALIAS_WAIT)
11357944Seric
11457944Seric# location of alias file
11557944SericCONCAT(OA, ifdef(`ALIAS_FILE', ALIAS_FILE, /etc/aliases))
11657944Seric
11758084Seric# minimum number of free blocks on filesystem
11858084SericCONCAT(Ob, confMIN_FREE_BLOCKS)
11958084Seric
12057944Seric# substitution for space (blank) characters
12157944SericCONCAT(OB, confBLANK_SUB)
12257944Seric
12357944Seric# connect to "expensive" mailers on initial submission?
12457944SericCONCAT(Oc, confCON_EXPENSIVE)
12557944Seric
12657944Seric# checkpoint queue runs after every N successful deliveries
12757944SericCONCAT(OC, confCHECKPOINT_INTERVAL)
12857944Seric
12957944Seric# default delivery mode
13057944SericCONCAT(Od, confDELIVERY_MODE)
13157944Seric
13257944Seric# automatically rebuild the alias database?
13357944SericCONCAT(OD, confAUTO_REBUILD)
13457944Seric
13557944Seric# error message header/file */
13657944Sericifdef(`confERROR_MESSAGE',
13757944Seric	concat(OE, confERROR_MESSAGE),
13857944Seric	#OE/etc/sendmail.oE)
13957944Seric
14057944Seric# error mode
14157944Sericifdef(`confERROR_MODE',
14257944Seric	concat(Oe, confERROR_MODE),
14357944Seric	#Oep)
14457944Seric
14557944Seric# save Unix-style "From_" lines at top of header?
14657944SericCONCAT(Of, confSAVE_FROM_LINES)
14757944Seric
14857944Seric# temporary file mode
14957944SericCONCAT(OF, confTEMP_FILE_MODE)
15057944Seric
15157944Seric# match recipients against GECOS field?
15257944SericCONCAT(OG, confMATCH_GECOS)
15357944Seric
15457944Seric# default GID
15557944SericCONCAT(Og, confDEF_GROUP_ID)
15657944Seric
15757944Seric# maximum hop count
15857944SericCONCAT(Oh, confMAX_HOP)
15957944Seric
16057944Seric# location of help file
16157944SericCONCAT(OH, ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf))
16257944Seric
16357944Seric# ignore dots as terminators in incoming messages?
16457944SericCONCAT(Oi, confIGNORE_DOTS)
16557944Seric
16657944Seric# Insist that the BIND name server be running to resolve names
16757944Sericifdef(`confBIND_OPTS',
16857944Seric	CONCAT(OI, confBIND_OPTS),
16957944Seric	#OI)
17057944Seric
17157944Seric# Forward file search path
17257944Sericifdef(`confFORWARD_PATH',
17357944Seric	CONCAT(OJ, confFORWARD_PATH),
17457944Seric	#OJ/var/forward/$u:$z/.forward.$w:$z/.forward)
17557944Seric
17657944Seric# open connection cache size
17757944SericCONCAT(Ok, confMCI_CACHE_SIZE)
17857944Seric
17957944Seric# open connection cache timeout
18057944SericCONCAT(OK, confMCI_CACHE_TIMEOUT)
18157944Seric
18257944Seric# log level
18357944SericCONCAT(OL, confLOG_LEVEL)
18457944Seric
18557944Seric# send to me too, even in an alias expansion?
18657944SericCONCAT(Om, confME_TOO)
18757944Seric
18857944Seric# verify RHS in newaliases?
18957944SericCONCAT(On, confCHECK_ALIASES)
19057944Seric
19157944Seric# default messages to old style headers if no special punctuation?
19257944SericCONCAT(Oo, confOLD_STYLE_HEADERS)
19357944Seric
19458084Seric# privacy flags
19558084SericCONCAT(Op, confPRIVACY_FLAGS)
19658084Seric
19757944Seric# who (if anyone) should get extra copies of error messages
19857944Sericifdef(`confCOPY_ERRORS_TO',
19957944Seric	CONCAT(OP, confCOPY_ERRORS_TO),
20057944Seric	#OPPostmaster)
20157944Seric
20257944Seric# slope of queue-only function
20357944Sericifdef(`confQUEUE_FACTOR',
20457944Seric	CONCAT(Oq, confQUEUE_FACTOR),
20557944Seric	#Oq600000)
20657944Seric
20757944Seric# queue directory
20857944SericCONCAT(OQ, ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue))
20957944Seric
21057944Seric# read timeout -- now OK per RFC 1123 section 5.3.2
21158119Sericifdef(`confREAD_TIMEOUT',
21258119Seric	CONCAT(Or, confREAD_TIMEOUT),
21358119Seric	#Ordatablock=10m)
21457944Seric
21557944Seric# queue up everything before forking?
21657944SericCONCAT(Os, confSAFE_QUEUE)
21757944Seric
21857944Seric# status file
21957944SericCONCAT(OS, ifdef(`STATUS_FILE', STATUS_FILE, /etc/sendmail.st))
22057944Seric
22157944Seric# default message timeout interval
22257944SericCONCAT(OT, confMESSAGE_TIMEOUT)
22357944Seric
22457944Seric# time zone handling:
22557944Seric#  if undefined, use system default
22657944Seric#  if defined but null, use TZ envariable passed in
22757944Seric#  if defined and non-null, use that info
22857944Sericifelse(confTIME_ZONE, `USE_SYSTEM', `#Ot',
22957944Seric	confTIME_ZONE, `USE_TZ', `',
23057944Seric	`CONCAT(Ot, confTIME_ZONE)')
23157944Seric
23257944Seric# default UID
23357944SericCONCAT(Ou, confDEF_USER_ID)
23457944Seric
23551887Seric# list of locations of user database file (null means no lookup)
23658720SericOU`'ifdef(`confUSERDB_SPEC', `confUSERDB_SPEC')
23751222Seric
23857944Seric# load average at which we just queue messages
23957944SericCONCAT(Ox, confQUEUE_LA)
24057944Seric
24157944Seric# load average at which we refuse connections
24257944SericCONCAT(OX, confREFUSE_LA)
24357944Seric
24457944Seric# work recipient factor
24557944Sericifdef(`confWORK_RECIPIENT_FACTOR',
24657944Seric	CONCAT(Oy, confWORK_RECIPIENT_FACTOR),
24757944Seric	#Oy30000)
24857944Seric
24957944Seric# deliver each queued job in a separate process?
25057944SericCONCAT(OY, confSEPARATE_PROC)
25157944Seric
25257944Seric# work class factor
25357944Sericifdef(`confWORK_CLASS_FACTOR',
25457944Seric	CONCAT(Oz, confWORK_CLASS_FACTOR),
25557944Seric	#Oz1800)
25657944Seric
25757944Seric# work time factor
25857944Sericifdef(`confWORK_TIME_FACTOR',
25957944Seric	CONCAT(OZ, confWORK_TIME_FACTOR),
26057944Seric	#OZ90000)
26157944Seric
26257944Seric###########################
26357944Seric#   Message precedences   #
26457944Seric###########################
26557944Seric
26657944SericPfirst-class=0
26757944SericPspecial-delivery=100
26858070SericPlist=-30
26957944SericPbulk=-60
27057944SericPjunk=-100
27157944Seric
27257944Seric#####################
27357944Seric#   Trusted users   #
27457944Seric#####################
27557944Seric
27657944SericTroot
27757944SericTdaemon
27857944SericTuucp
27957944Seric
28057944Seric#########################
28157944Seric#   Format of headers   #
28257944Seric#########################
28357944Seric
28458679SericH?P?Return-Path: $g
28557944SericHReceived: $?sfrom $s $.by $j ($v/$Z) id $i; $b
28657944SericH?D?Resent-Date: $a
28757944SericH?D?Date: $a
28857944SericH?F?Resent-From: $q
28957944SericH?F?From: $q
29057944SericH?x?Full-Name: $x
29157944SericHSubject:
29257944Seric# HPosted-Date: $a
29357944Seric# H?l?Received-Date: $b
29457944SericH?M?Resent-Message-Id: <$t.$i@$j>
29557944SericH?M?Message-Id: <$t.$i@$j>
29656786Sericundivert(6)dnl
29751222Seric#
29851222Seric######################################################################
29951222Seric######################################################################
30051222Seric#####
30151222Seric#####			REWRITING RULES
30251222Seric#####
30351222Seric######################################################################
30451222Seric######################################################################
30551222Seric
30658678Sericundivert(9)dnl
30751222Seric
30851222Seric###########################################
30951222Seric###  Rulset 3 -- Name Canonicalization  ###
31051222Seric###########################################
31151260SericS3
31251222Seric
31358499Seric# handle null input and list syntax (translate to <@> special case)
31458499SericR$@			$@ <@>
31558707SericR$*:;$*			$@ $1 :; <@>
31658174Seric
31751222Seric# basic textual canonicalization -- note RFC733 heuristic here
31857012SericR$*<$*>$*<$*>$*		<$2>$3$4$5			strip multiple <> <>
31958158SericR$*<$*<$+>$*>$*		<$3>$5				2-level <> nesting
32058499SericR$*<>$*			$@ <@>				MAIL FROM:<> case
32151222SericR$*<$+>$*		$2				basic RFC821/822 parsing
32251222Seric
32351222Seric# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
32455416SericR@ $+ , $+		@ $1 : $2			change all "," to ":"
32551222Seric
32651222Seric# localize and dispose of route-based addresses
32755416SericR@ $+ : $+		$@ $>6 < @$1 > : $2		handle <route-addr>
32851222Seric
32951222Seric# find focus for list syntax
33055416SericR $+ : $* ; @ $+	$@ $>6 $1 : $2 ; < @ $3 >	list syntax
33155416SericR $+ : $* ;		$@ $1 : $2;			list syntax
33251222Seric
33351222Seric# find focus for @ syntax addresses
33455416SericR$+ @ $+		$: $1 < @ $2 >			focus on domain
33555416SericR$+ < $+ @ $+ >		$1 $2 < @ $3 >			move gaze right
33655416SericR$+ < @ $+ >		$@ $>6 $1 < @ $2 >		already canonical
33751222Seric
33858288Sericifdef(`_NO_UUCP_', `dnl',
33958288Seric`# convert old-style addresses to a domain-based address
34055416SericR$- ! $+		$@ $>6 $2 < @ $1 .UUCP >	resolve uucp names
34155416SericR$+ . $- ! $+		$@ $>6 $3 < @ $1 . $2 >		domain uucps
34258288SericR$+ ! $+		$@ $>6 $2 < @ $1 .UUCP >	uucp subdomains')
34351222Seric
34451222Seric# if we have % signs, take the rightmost one
34555416SericR$* % $*		$1 @ $2				First make them all @s.
34655416SericR$* @ $* @ $*		$1 % $2 @ $3			Undo all but the last.
34755416SericR$* @ $*		$@ $>6 $1 < @ $2 >		Insert < > and finish
34851222Seric
34951222Seric# else we must be a local name
35051222Seric
35151222Seric
35251222Seric###############################################
35351222Seric###  Ruleset 6 -- bottom half of ruleset 3  ###
35451222Seric###############################################
35551222Seric
35657245Seric#  At this point, everything should be in a "local_part<@domain>extra" format.
35751222SericS6
35851222Seric
35951222Seric# handle special cases for local names
36051322SericR$* < @ $=w > $*		$: $1 < @ $j . > $3		no domain at all
36155416SericR$* < @ $=w . UUCP > $*		$: $1 < @ $j . > $3		.UUCP domain
36251889Sericundivert(2)dnl
36351222Seric
36451274Sericifdef(`UUCP_RELAY',
36551274Seric`# pass UUCP addresses straight through
36655416SericR$* < @ $+ . UUCP > $*		$@ $1 < @ $2 . UUCP > $3',
36751274Seric`# if really UUCP, handle it immediately
36851322Sericifdef(`_CLASS_U_',
36955416Seric`R$* < @ $=U . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
37051322Sericifdef(`_CLASS_V_',
37155416Seric`R$* < @ $=V . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
37251322Sericifdef(`_CLASS_W_',
37355416Seric`R$* < @ $=W . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
37451322Sericifdef(`_CLASS_X_',
37555416Seric`R$* < @ $=X . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
37651322Sericifdef(`_CLASS_Y_',
37755416Seric`R$* < @ $=Y . UUCP > $*	$@ $1 < @ $2 . UUCP > $3', `dnl')
37851267Seric
37951267Seric# try UUCP traffic as a local address
38055416SericR$* < @ $+ . UUCP > $*		$: $1 < @ $[ $2 $] . UUCP > $3
38151992Sericifdef(`_OLD_SENDMAIL_',
38255416Seric`R$* < @ $+ . $+ . UUCP > $*		$@ $1 < @ $2 . $3 . > $4',
38355416Seric`R$* < @ $+ . . UUCP > $*		$@ $1 < @ $2 . > $3')')
38451267Seric
38551222Seric# pass to name server to make hostname canonical
38651322SericR$* < @ $* $~. > $*		$: $1 < @ $[ $2 $3 $] > $4
38751222Seric
38851889Seric# handle possible alternate names
38951889SericR$* < @ $=w . $m . > $*		$: $1 < @ $j . > $3
39051889SericR$* < @ $=w . $m > $*		$: $1 < @ $j . > $3
39151889Sericundivert(8)dnl
39251889Seric
39351322Seric# if this is the local hostname, make sure we treat is as canonical
39451322SericR$* < @ $j > $*			$: $1 < @ $j . > $2
39551222Seric
39651322Seric
39751222Seric##################################################
39851222Seric###  Ruleset 4 -- Final Output Post-rewriting  ###
39951222Seric##################################################
40051222SericS4
40151222Seric
40258499SericR$*<@>			$@ $1				handle <> and list:;
40351222Seric
40451222Seric# resolve numeric addresses to name if possible
40551322SericR$* < @ [ $+ ] > $*	$: $1 < @ $[ [$2] $] > $3	lookup numeric internet addr
40651222Seric
40751322Seric# strip trailing dot off possibly canonical name
40851322SericR$* < @ $+ . > $*	$1 < @ $2 > $3
40951322Seric
41051222Seric# externalize local domain info
41151322SericR$* < $+ > $*		$1 $2 $3			defocus
41251322SericR@ $+ : @ $+ : $+	@ $1 , @ $2 : $3		<route-addr> canonical
41351997SericR@ $*			$@ @ $1				... and exit
41451222Seric
41558288Sericifdef(`_NO_UUCP_', `dnl',
41658288Seric`# UUCP must always be presented in old form
41758288SericR$+ @ $- . UUCP		$2!$1				u@h.UUCP => h!u')
41851222Seric
41951222Seric# delete duplicate local names
42051322SericR$+ % $=w @ $=w		$1 @ $j				u%host@host => u@host
42151222Seric
42251222Seric
42351222Seric
42451222Seric#############################################################
42551222Seric###   Ruleset 7 -- recanonicalize and call ruleset zero   ###
42651222Seric###		   (used for recursive calls)		  ###
42751222Seric#############################################################
42851222Seric
42951222SericS7
43051222SericR$*			$: $>3 $1
43151222SericR$*			$@ $>0 $1
43251222Seric
43351222Seric
43451222Seric######################################
43551222Seric###   Ruleset 0 -- Parse Address   ###
43651222Seric######################################
43751222Seric
43851222SericS0
43951222Seric
44058562SericR<@>			$#local $: <>			special case error msgs
44158340Seric
44255416Sericifdef(`_MAILER_smtp_',
44355416Seric`# handle numeric address spec
44451322SericR$* < @ [ $+ ] > $*	$: $1 < @ $[ [$2] $] > $3	numeric internet addr
44555416SericR$* < @ [ $+ ] > $*	$#smtp $@ [$2] $: $1 @ [$2] $3	numeric internet spec',
44656785Seric`dnl')
44751222Seric
44851887Seric# now delete the local info -- note $=O to find characters that cause forwarding
44958482SericR$* < @ > $*		$@ $>7 $1			user@ => user
45051322SericR< @ $j . > : $*	$@ $>7 $1			@here:... -> ...
45151322SericR$* $=O $* < @ $j . >	$@ $>7 $1 $2 $3			...@here -> ...
452*58781Sericifdef(`MAILER_TABLE',
453*58781Seric`
454*58781Seric# try mailer table lookup
455*58781SericR$* < @ $+ > $*		$: $1 < @ $(mailertable $2 $) $3
456*58781SericR$* < @ $-:$+ > $*	$# $2 $@ $3 $: $1 < @ $3 > $4	found a match',
457*58781Seric`dnl')
45851222Seric
45951222Seric# short circuit local delivery so forwarded email works
46058516Sericifdef(`_LOCAL_NOT_STICKY_',
46158516Seric`R$=L < @ $j . >		$#local $: @ $1			special local names
46258516SericR$+ < @ $j . >		$#local $: $1			dispose directly',
46358516Seric`R$+ < @ $j . >		$: $1 < @ $j @ $H >		first try hub
46451992Sericifdef(`_OLD_SENDMAIL_',
46558070Seric`R$+ < $+ @ $-:$+ >	$# $3 $@ $4 $: $1 < $2 >	yep ....
46658771SericR$+ < $+ @ $+ >		$#relay $@ $3 $: $1 < $2 >	yep ....
46757527SericR$+ < $+ @ >		$#local $: $1			nope, local address',
46857527Seric`R$+ < $+ @ $+ >		$#local $: $1			yep ....
46958516SericR$+ < $+ @ >		$#local $: @ $1			nope, local address')')
47051222Sericundivert(3)dnl
47151260Sericundivert(4)dnl
47251260Seric
47355416Seric# resolve remotely connected UUCP links (if any)
47451285Sericifdef(`_CLASS_V_',
47552044Seric`R$* < @ $=V . UUCP > $*		$#smtp $@ $V $: <@ $V> : $1 @ $2.UUCP $3',
47652044Seric	`dnl')
47751285Sericifdef(`_CLASS_W_',
47852044Seric`R$* < @ $=W . UUCP > $*		$#smtp $@ $W $: <@ $W> : $1 @ $2.UUCP $3',
47952044Seric	`dnl')
48051285Sericifdef(`_CLASS_X_',
48152044Seric`R$* < @ $=X . UUCP > $*		$#smtp $@ $X $: <@ $X> : $1 @ $2.UUCP $3',
48252044Seric	`dnl')
48351260Seric
48451222Seric# resolve fake top level domains by forwarding to other hosts
48551222Sericifdef(`BITNET_RELAY',
48652044Seric`R$*<@$+.BITNET>$*	$#smtp $@ $B $: $1 <@$2.BITNET> $3	user@host.BITNET',
48751222Seric	`dnl')
48851222Sericifdef(`CSNET_RELAY',
48952044Seric`R$*<@$+.CSNET>$*	$#smtp $@ $C $: $1 <@$2.CSNET> $3	user@host.CSNET',
49051222Seric	`dnl')
49158364Sericifdef(`_MAILER_fax_',
49258364Seric`R$+ < @ $+ .FAX >	$#fax $@ $2 $: $1			user@host.FAX',
49358364Seric`ifdef(`FAX_RELAY',
49458364Seric`R$*<@$+.FAX>$*		$#smtp $@ $F $: $1 <@$2.FAX> $3		user@host.FAX',
49558364Seric	`dnl')')
49651222Seric
49751260Sericifdef(`UUCP_RELAY',
49851260Seric`# forward non-local UUCP traffic to our UUCP relay
49952044SericR$*<@$*.UUCP>$*		$#smtp $@ $Y $: <@ $Y> : $1 @ $2.UUCP $3	uucp mail',
50055416Seric`ifdef(`_MAILER_uucp_',
50151260Seric`# forward other UUCP traffic straight to UUCP
50251260SericR< @ $+ .UUCP > : $+	$#uucp $@ $1 $: $1:$2			@host.UUCP:...
50351322SericR$+ < @ $+ .UUCP >	$#uucp $@ $2 $: $1			user@host.UUCP',
50451260Seric	`dnl')')
50551222Seric
50658070Sericifdef(`_LOCAL_RULES_',
50758070Seric`# figure out what should stay in our local mail system
50858070Sericundivert(1)',
50958070Seric`ifdef(`_MAILER_smtp_',
51055416Seric`# deal with other remote names
51158070SericR$* < @ $* > $*		$#smtp $@ $2 $: $1 < @ $2 > $3		user@host.domain')')
51258070Sericifdef(`SMART_HOST', `
51358070Seric# pass names that still have a host to a smarthost
51458070SericR$* < @ $* > $*		$: < $S > $1 < @ $2 > $3	glue on smarthost name
51558070SericR<$-:$+> $* < @$* > $*	$# $1 $@ $2 $: $3 < @ $4 > $5	if non-null, use it
51658070SericR<$+> $* < @$* > $*	$#suucp $@ $1 $: $2 < @ $3 > $4	if non-null, use it
51758070SericR<> $* < @ $* > $*	$1 < @ $2 > $3			else strip off gunk',
51858070Seric`ifdef(`_LOCAL_RULES_', `
51958070Seric# reject messages that have host names we do not understand
52058070SericR$* < @ $* > $*		$#error $@ NOHOST $: Unrecognized host name $2',
52158070Seric`dnl')')
52258084Sericifdef(`_MAILER_USENET_', `
52358084Seric# addresses sent to net.group.USENET will get forwarded to a newsgroup
52458096SericR$+ . USENET		$# usenet $: $1')
52551222Seric
52651992Sericifdef(`_OLD_SENDMAIL_',
52751887Seric`# forward remaining names to local relay, if any
52852041SericR$=L			$#local $: $1			special local names
52952041SericR$+			$: $1 < @ $R >			append relay
53057527SericR$+ < @ >		$: $1 < @ $H >			no relay, try hub
53157527SericR$+ < @ >		$#local $: $1			no relay or hub: local
53257527SericR$+ < @ $j  >		$#local $: $1			we are relay/hub: local
53358070SericR$+ < @ $-:$+ >		$# $2 $@ $3 $: $1		deliver to relay/hub
53458771SericR$+ < @ $+ >		$#relay $@ $2 $: $1		deliver to relay/hub',
53551992Seric`# handle locally delivered names
53652041SericR$=L			$#local $: @ $1			special local names
53752041SericR$+			$#local $: $1			regular local names
53851222Seric
53955416Seric###########################################################################
54055416Seric###   Ruleset 5 -- special rewriting after aliases have been expanded   ###
54155416Seric###		   (new sendmail only)					###
54255416Seric###########################################################################
54351222Seric
54451322SericS5
54551322Seric
54655416Sericifdef(`_MAILER_smtp_',
54755416Seric`R$+			$: $1 < @ $R >
54857527SericR$+ < @ >		$: $1 < @ $H >			no relay, try hub
54957527SericR$+ < @ $j >		$@ $1				we are relay/hub: local
55058070SericR$+ < @ $-:$+ >		$# $2 $@ $3 $: $1		send to relay or hub
55158771SericR$+ < @ $+ >		$#relay $@ $2 $: $1		send to relay or hub')')
55251222Seric#
55351222Seric######################################################################
55451222Seric######################################################################
55551222Seric#####
55656790Seric`#####			MAILER DEFINITIONS'
55751222Seric#####
55851222Seric######################################################################
55951222Seric######################################################################
56051222Sericundivert(7)dnl
561