xref: /original-bsd/usr.sbin/sendmail/cf/m4/proto.m4 (revision fac0c393)
1divert(-1)
2#
3# Copyright (c) 1983 Eric P. Allman
4# Copyright (c) 1988, 1993
5#	The Regents of the University of California.  All rights reserved.
6#
7# %sccs.include.redist.sh%
8#
9divert(0)
10
11VERSIONID(`@(#)proto.m4	8.62 (Berkeley) 01/24/95')
12
13MAILER(local)dnl
14
15# level 6 config file format
16V6
17ifdef(`confSMTP_MAILER',, `define(`confSMTP_MAILER', `smtp')')dnl
18ifdef(`confLOCAL_MAILER',, `define(`confLOCAL_MAILER', `local')')dnl
19ifdef(`confRELAY_MAILER',,
20	`define(`confRELAY_MAILER',
21		`ifdef(`_MAILER_smtp_', `relay',
22			`ifdef(`_MAILER_uucp', `suucp', `unknown')')')')dnl
23define(`_SMTP_', `confSMTP_MAILER')dnl		for readability only
24define(`_LOCAL_', `confLOCAL_MAILER')dnl	for readability only
25define(`_RELAY_', `confRELAY_MAILER')dnl	for readability only
26
27##################
28#   local info   #
29##################
30
31Cwlocalhost
32ifdef(`USE_CW_FILE',
33`# file containing names of hosts for which we receive email
34Fw`'confCW_FILE',
35	`dnl')
36ifdef(`confDOMAIN_NAME', `
37# my official domain name
38Dj`'confDOMAIN_NAME',
39	`dnl')
40
41ifdef(`_NULL_CLIENT_ONLY_',
42`include(../m4/nullrelay.m4)m4exit',
43	`dnl')
44
45CP.
46
47ifdef(`UUCP_RELAY',
48`# UUCP relay host
49DY`'UUCP_RELAY
50CPUUCP
51
52')dnl
53ifdef(`BITNET_RELAY',
54`#  BITNET relay host
55DB`'BITNET_RELAY
56CPBITNET
57
58')dnl
59ifdef(`FAX_RELAY',
60`# FAX relay host
61DF`'FAX_RELAY
62CPFAX
63
64')dnl
65# "Smart" relay host (may be null)
66DS`'ifdef(`SMART_HOST', SMART_HOST)
67
68ifdef(`LUSER_RELAY',
69`# place to which unknown users should be forwarded
70Kuser user -m -a<>
71DL`'LUSER_RELAY
72', `dnl')
73
74ifdef(`MAILER_TABLE',
75`# Mailer table (overriding domains)
76Kmailertable MAILER_TABLE
77
78')dnl
79ifdef(`DOMAIN_TABLE',
80`# Domain table (adding domains)
81Kdomaintable DOMAIN_TABLE
82
83')dnl
84# who I send unqualified names to (null means deliver locally)
85DR`'ifdef(`LOCAL_RELAY', LOCAL_RELAY)
86
87# who gets all local email traffic ($R has precedence for unqualified names)
88DH`'ifdef(`MAIL_HUB', MAIL_HUB)
89
90# who I masquerade as (null for no masquerading)
91DM`'ifdef(`MASQUERADE_NAME', MASQUERADE_NAME)
92
93# class L: names that should be delivered locally, even if we have a relay
94# class E: names that should be exposed as from this host, even if we masquerade
95# class D: dotted names, e.g., root.machinename
96#CL root
97CE root
98undivert(5)dnl
99ifdef(`__DOTTED_USER_LIST__',
100	`__DOTTED_USER_LIST__',
101	`#CD postmaster')
102
103# operators that cannot be in local usernames (i.e., network indicators)
104CO @ % ifdef(`_NO_UUCP_', `', `!')
105
106# a class with just dot (for identifying canonical names)
107C..
108
109# dequoting map
110Kdequote dequote
111
112undivert(6)dnl
113
114######################
115#   Special macros   #
116######################
117
118# SMTP initial login message
119De`'confSMTP_LOGIN_MSG
120
121# UNIX initial From header format
122Dl`'confFROM_LINE
123
124# my name for error messages
125Dn`'confMAILER_NAME
126
127# delimiter (operator) characters
128Do`'confOPERATORS
129
130# format of a total name
131Dq`'ifdef(`confFROM_HEADER', confFROM_HEADER, `$?x$x <$g>$|$g$.')
132include(`../m4/version.m4')
133
134###############
135#   Options   #
136###############
137
138# strip message body to 7 bits on input?
139O7`'confSEVEN_BIT_INPUT
140
141# 8-bit data handling
142O8`'confEIGHT_BIT_HANDLING
143
144# wait (in minutes) for alias file rebuild
145Oa`'confALIAS_WAIT
146
147# location of alias file
148OA`'ifdef(`ALIAS_FILE', `ALIAS_FILE', /etc/aliases)
149
150# minimum number of free blocks on filesystem
151Ob`'confMIN_FREE_BLOCKS
152
153# substitution for space (blank) characters
154OB`'confBLANK_SUB
155
156# avoid connecting to "expensive" mailers on initial submission?
157Oc`'confCON_EXPENSIVE
158
159# checkpoint queue runs after every N successful deliveries
160OC`'confCHECKPOINT_INTERVAL
161
162# default delivery mode
163Od`'confDELIVERY_MODE
164
165# automatically rebuild the alias database?
166OD`'confAUTO_REBUILD
167
168# error message header/file
169ifdef(`confERROR_MESSAGE',
170	OE`'confERROR_MESSAGE,
171	#OE/etc/sendmail.oE)
172
173# error mode
174ifdef(`confERROR_MODE',
175	Oe`'confERROR_MODE,
176	#Oep)
177
178# save Unix-style "From_" lines at top of header?
179Of`'confSAVE_FROM_LINES
180
181# temporary file mode
182OF`'confTEMP_FILE_MODE
183
184# match recipients against GECOS field?
185OG`'confMATCH_GECOS
186
187# default GID
188Og`'confDEF_GROUP_ID
189
190# maximum hop count
191Oh`'confMAX_HOP
192
193# location of help file
194OH`'ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf)
195
196# ignore dots as terminators in incoming messages?
197Oi`'confIGNORE_DOTS
198
199# Insist that the BIND name server be running to resolve names
200ifdef(`confBIND_OPTS',
201	OI`'confBIND_OPTS,
202	#OI)
203
204# deliver MIME-encapsulated error messages?
205Oj`'confMIME_FORMAT_ERRORS
206
207# Forward file search path
208ifdef(`confFORWARD_PATH',
209	OJ`'confFORWARD_PATH,
210	#OJ/var/forward/$u:$z/.forward.$w:$z/.forward)
211
212# open connection cache size
213Ok`'confMCI_CACHE_SIZE
214
215# open connection cache timeout
216OK`'confMCI_CACHE_TIMEOUT
217
218# use Errors-To: header?
219Ol`'confUSE_ERRORS_TO
220
221# log level
222OL`'confLOG_LEVEL
223
224# send to me too, even in an alias expansion?
225Om`'confME_TOO
226
227# verify RHS in newaliases?
228On`'confCHECK_ALIASES
229
230# default messages to old style headers if no special punctuation?
231Oo`'confOLD_STYLE_HEADERS
232
233# SMTP daemon options
234ifdef(`confDAEMON_OPTIONS',
235	OO`'confDAEMON_OPTIONS,
236	#OOPort=esmtp)
237
238# privacy flags
239Op`'confPRIVACY_FLAGS
240
241# who (if anyone) should get extra copies of error messages
242ifdef(`confCOPY_ERRORS_TO',
243	OP`'confCOPY_ERRORS_TO,
244	#OPPostmaster)
245
246# slope of queue-only function
247ifdef(`confQUEUE_FACTOR',
248	Oq`'confQUEUE_FACTOR,
249	#Oq600000)
250
251# queue directory
252OQ`'ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue)
253
254# read timeout -- now OK per RFC 1123 section 5.3.2
255ifdef(`confREAD_TIMEOUT',
256	Or`'confREAD_TIMEOUT,
257	#Ordatablock=10m)
258
259# should we not prune routes in route-addr syntax addresses?
260OR`'confDONT_PRUNE_ROUTES
261
262# queue up everything before forking?
263Os`'confSAFE_QUEUE
264
265# status file
266OS`'ifdef(`STATUS_FILE', STATUS_FILE, /etc/sendmail.st)
267
268# default message timeout interval
269OT`'confMESSAGE_TIMEOUT
270
271# time zone handling:
272#  if undefined, use system default
273#  if defined but null, use TZ envariable passed in
274#  if defined and non-null, use that info
275ifelse(confTIME_ZONE, `USE_SYSTEM', `#Ot',
276	confTIME_ZONE, `USE_TZ', `Ot',
277	`Ot`'confTIME_ZONE')
278
279# default UID
280Ou`'confDEF_USER_ID
281
282# list of locations of user database file (null means no lookup)
283OU`'ifdef(`confUSERDB_SPEC', `confUSERDB_SPEC')
284
285# fallback MX host
286ifdef(`confFALLBACK_MX',
287	OV`'confFALLBACK_MX,
288	#OVfall.back.host.net)
289
290# if we are the best MX host for a site, try it directly instead of config err
291Ow`'confTRY_NULL_MX_LIST
292
293# load average at which we just queue messages
294Ox`'confQUEUE_LA
295
296# load average at which we refuse connections
297OX`'confREFUSE_LA
298
299# work recipient factor
300ifdef(`confWORK_RECIPIENT_FACTOR',
301	Oy`'confWORK_RECIPIENT_FACTOR,
302	#Oy30000)
303
304# deliver each queued job in a separate process?
305OY`'confSEPARATE_PROC
306
307# work class factor
308ifdef(`confWORK_CLASS_FACTOR',
309	Oz`'confWORK_CLASS_FACTOR,
310	#Oz1800)
311
312# work time factor
313ifdef(`confWORK_TIME_FACTOR',
314	OZ`'confWORK_TIME_FACTOR,
315	#OZ90000)
316
317# do our SMTP peers choke on multi-line greeting messages?
318O BrokenSmtpPeers=confBROKEN_SMTP_PEERS
319
320# shall we sort the queue by hostname first?
321O QueueSortOrder=confQUEUE_SORT_ORDER
322
323###########################
324#   Message precedences   #
325###########################
326
327Pfirst-class=0
328Pspecial-delivery=100
329Plist=-30
330Pbulk=-60
331Pjunk=-100
332
333#####################
334#   Trusted users   #
335#####################
336
337Troot
338Tdaemon
339Tuucp
340
341#########################
342#   Format of headers   #
343#########################
344
345H?P?Return-Path: $g
346HReceived: confRECEIVED_HEADER
347H?D?Resent-Date: $a
348H?D?Date: $a
349H?F?Resent-From: $q
350H?F?From: $q
351H?x?Full-Name: $x
352HSubject:
353# HPosted-Date: $a
354# H?l?Received-Date: $b
355H?M?Resent-Message-Id: <$t.$i@$j>
356H?M?Message-Id: <$t.$i@$j>
357#
358######################################################################
359######################################################################
360#####
361#####			REWRITING RULES
362#####
363######################################################################
364######################################################################
365
366undivert(9)dnl
367
368###########################################
369###  Rulset 3 -- Name Canonicalization  ###
370###########################################
371S3
372
373# handle null input (translate to <@> special case)
374R$@			$@ <@>
375
376# basic textual canonicalization -- note RFC733 heuristic here
377R$*<$*>$*<$*>$*		$2$3<$4>$5			strip multiple <> <>
378R$*<$*<$+>$*>$*		<$3>$5				2-level <> nesting
379R$*<>$*			$@ <@>				MAIL FROM:<> case
380R$*<$+>$*		$2				basic RFC821/822 parsing
381
382# handle list:; syntax as special case
383R$*:;$*			$@ $1 :; <@>
384
385# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
386R@ $+ , $+		@ $1 : $2			change all "," to ":"
387
388# localize and dispose of route-based addresses
389R@ $+ : $+		$@ $>96 < @$1 > : $2		handle <route-addr>
390
391# find focus for list syntax
392R $+ : $* ; @ $+	$@ $>96 $1 : $2 ; < @ $3 >	list syntax
393R $+ : $* ;		$@ $1 : $2;			list syntax
394
395# find focus for @ syntax addresses
396R$+ @ $+		$: $1 < @ $2 >			focus on domain
397R$+ < $+ @ $+ >		$1 $2 < @ $3 >			move gaze right
398R$+ < @ $+ >		$@ $>96 $1 < @ $2 >		already canonical
399
400# do some sanity checking
401R$* < @ $* : $* > $*	$1 < @ $2 $3 > $4		nix colons in addrs
402
403ifdef(`_NO_UUCP_', `dnl',
404`# convert old-style addresses to a domain-based address
405R$- ! $+		$@ $>96 $2 < @ $1 .UUCP >	resolve uucp names
406R$+ . $- ! $+		$@ $>96 $3 < @ $1 . $2 >		domain uucps
407R$+ ! $+		$@ $>96 $2 < @ $1 .UUCP >	uucp subdomains')
408
409# if we have % signs, take the rightmost one
410R$* % $*		$1 @ $2				First make them all @s.
411R$* @ $* @ $*		$1 % $2 @ $3			Undo all but the last.
412R$* @ $*		$@ $>96 $1 < @ $2 >		Insert < > and finish
413
414# else we must be a local name
415
416
417################################################
418###  Ruleset 96 -- bottom half of ruleset 3  ###
419################################################
420
421#  At this point, everything should be in a "local_part<@domain>extra" format.
422S96
423
424# handle special cases for local names
425R$* < @ localhost > $*		$: $1 < @ $j . > $2		no domain at all
426R$* < @ localhost . $m > $*	$: $1 < @ $j . > $2		local domain
427ifdef(`_NO_UUCP_', `dnl',
428`R$* < @ localhost . UUCP > $*	$: $1 < @ $j . > $2		.UUCP domain')
429R$* < @ [ $+ ] > $*		$: $1 < @@ [ $2 ] > $3		mark [a.b.c.d]
430R$* < @@ $=w > $*		$: $1 < @ $j . > $3		self-literal
431R$* < @@ $+ > $*		$@ $1 < @ $2 > $3		canon IP addr
432ifdef(`DOMAIN_TABLE', `
433# look up domains in the domain table
434R$* < @ $+ > $*			$: $1 < @ $(domaintable $2 $) > $3',
435`dnl')
436undivert(2)dnl
437
438ifdef(`_NO_UUCP_', `dnl',
439`ifdef(`UUCP_RELAY',
440`# pass UUCP addresses straight through
441R$* < @ $+ . UUCP > $*		$@ $1 < @ $2 . UUCP . > $3',
442`# if really UUCP, handle it immediately
443ifdef(`_CLASS_U_',
444`R$* < @ $=U . UUCP > $*	$@ $1 < @ $2 . UUCP . > $3', `dnl')
445ifdef(`_CLASS_V_',
446`R$* < @ $=V . UUCP > $*	$@ $1 < @ $2 . UUCP . > $3', `dnl')
447ifdef(`_CLASS_W_',
448`R$* < @ $=W . UUCP > $*	$@ $1 < @ $2 . UUCP . > $3', `dnl')
449ifdef(`_CLASS_X_',
450`R$* < @ $=X . UUCP > $*	$@ $1 < @ $2 . UUCP . > $3', `dnl')
451ifdef(`_CLASS_Y_',
452`R$* < @ $=Y . UUCP > $*	$@ $1 < @ $2 . UUCP . > $3', `dnl')
453
454# try UUCP traffic as a local address
455R$* < @ $+ . UUCP > $*		$: $1 < @ $[ $2 $] . UUCP . > $3
456R$* < @ $+ . . UUCP . > $*		$@ $1 < @ $2 . > $3')
457')
458ifdef(`_NO_CANONIFY_', `dnl',
459`# pass to name server to make hostname canonical
460R$* < @ $* $~P > $*		$: $1 < @ $[ $2 $3 $] > $4')
461
462# local host aliases and pseudo-domains are always canonical
463R$* < @ $=w > $*		$: $1 < @ $2 . > $3
464R$* < @ $* $=P > $*		$: $1 < @ $2 $3 . > $4
465R$* < @ $* . . > $*		$1 < @ $2 . > $3
466
467# if this is the local hostname, make sure we treat is as canonical
468R$* < @ $j > $*			$: $1 < @ $j . > $2
469
470
471##################################################
472###  Ruleset 4 -- Final Output Post-rewriting  ###
473##################################################
474S4
475
476R$*<@>			$@ $1				handle <> and list:;
477
478# strip trailing dot off possibly canonical name
479R$* < @ $+ . > $*	$1 < @ $2 > $3
480
481# externalize local domain info
482R$* < $+ > $*		$1 $2 $3			defocus
483R@ $+ : @ $+ : $+	@ $1 , @ $2 : $3		<route-addr> canonical
484R@ $*			$@ @ $1				... and exit
485
486ifdef(`_NO_UUCP_', `dnl',
487`# UUCP must always be presented in old form
488R$+ @ $- . UUCP		$2!$1				u@h.UUCP => h!u')
489
490# delete duplicate local names
491R$+ % $=w @ $=w		$1 @ $j				u%host@host => u@host
492
493
494
495##############################################################
496###   Ruleset 97 -- recanonicalize and call ruleset zero   ###
497###		   (used for recursive calls)		   ###
498##############################################################
499
500S`'97
501R$*			$: $>3 $1
502R$*			$@ $>0 $1
503
504
505######################################
506###   Ruleset 0 -- Parse Address   ###
507######################################
508
509S0
510
511R<@>			$#_LOCAL_ $: <@>		special case error msgs
512R$* : $* ;		$#error $@ USAGE $: "list:; syntax illegal for recipient addresses"
513R<@ $+>			$#error $@ USAGE $: "user address required"
514R$* <$* : $* > $*	$#error $@ USAGE $: "colon illegal in host name part"
515R$* < @ . > $*		$#error $@ USAGE $: "invalid host name"
516
517ifdef(`_MAILER_smtp_',
518`# handle numeric address spec
519R$* < @ [ $+ ] > $*	$: $>98 $1 < @ [ $2 ] > $3	numeric internet spec
520R$* < @ [ $+ ] > $*	$#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3	still numeric: send',
521	`dnl')
522
523# now delete the local info -- note $=O to find characters that cause forwarding
524R$* < @ > $*		$@ $>97 $1		user@ => user
525R< @ $=w . > : $*	$@ $>97 $2		@here:... -> ...
526R$* $=O $* < @ $=w . >	$@ $>97 $1 $2 $3		...@here -> ...
527
528# handle local hacks
529R$*			$: $>98 $1
530
531# short circuit local delivery so forwarded email works
532ifdef(`_STICKY_LOCAL_DOMAIN_',
533`R$+ < @ $=w . >		$: < $H > $1 < @ $2 . >		first try hub
534R< $+ > $+ < $+ >	$#_LOCAL_ $: $2			yep ....
535R< > $=D . $+ < $+ >	$#_LOCAL_ $: $1 . $2		dotted name?
536R< > $+ + $* < $+ >	$#_LOCAL_ $: $1 + $2		plussed name?
537R< > $+ < $+ >		$#_LOCAL_ $: @ $1			nope, local address',
538`R$=L < @ $=w . >		$#_LOCAL_ $: @ $1			special local names
539R$+ < @ $=w . >		$#_LOCAL_ $: $1			regular local name')
540ifdef(`MAILER_TABLE',
541`
542# not local -- try mailer table lookup
543R$* <@ $+ > $*		$: < $2 > $1 < @ $2 > $3	extract host name
544R< $+ . > $*		$: < $1 > $2			strip trailing dot
545R< $+ > $*		$: < $(mailertable $1 $) > $2	lookup
546R< $- : $+ > $*		$# $1 $@ $2 $: $3		check -- resolved?
547R< $+ > $*		$: $>90 <$1> $2			try domain',
548`dnl')
549undivert(4)dnl
550
551ifdef(`_NO_UUCP_', `dnl',
552`# resolve remotely connected UUCP links (if any)
553ifdef(`_CLASS_V_',
554`R$* < @ $=V . UUCP . > $*		$: $>95 < $V > $1 <@$2.UUCP.> $3',
555	`dnl')
556ifdef(`_CLASS_W_',
557`R$* < @ $=W . UUCP . > $*		$: $>95 < $W > $1 <@$2.UUCP.> $3',
558	`dnl')
559ifdef(`_CLASS_X_',
560`R$* < @ $=X . UUCP . > $*		$: $>95 < $X > $1 <@$2.UUCP.> $3',
561	`dnl')')
562
563# resolve fake top level domains by forwarding to other hosts
564ifdef(`BITNET_RELAY',
565`R$*<@$+.BITNET.>$*	$: $>95 < $B > $1 <@$2.BITNET.> $3	user@host.BITNET',
566	`dnl')
567ifdef(`_MAILER_pop_',
568`R$+ < @ POP. >		$#pop $: $1			user@POP',
569	`dnl')
570ifdef(`_MAILER_fax_',
571`R$+ < @ $+ .FAX. >	$#fax $@ $2 $: $1		user@host.FAX',
572`ifdef(`FAX_RELAY',
573`R$*<@$+.FAX.>$*		$: $>95 < $F > $1 <@$2.FAX.> $3	user@host.FAX',
574	`dnl')')
575
576ifdef(`UUCP_RELAY',
577`# forward non-local UUCP traffic to our UUCP relay
578R$*<@$*.UUCP.>$*		$: $>95 < $Y > $1 <@$2.UUCP.> $3	uucp mail',
579`ifdef(`_MAILER_uucp_',
580`# forward other UUCP traffic straight to UUCP
581R$* < @ $+ .UUCP. > $*		$#uucp $@ $2 $: $1 < @ $2 .UUCP. > $3	user@host.UUCP',
582	`dnl')')
583ifdef(`_MAILER_usenet_', `
584# addresses sent to net.group.USENET will get forwarded to a newsgroup
585R$+ . USENET		$#usenet $: $1',
586	`dnl')
587
588ifdef(`_LOCAL_RULES_',
589`# figure out what should stay in our local mail system
590undivert(1)', `dnl')
591
592# pass names that still have a host to a smarthost (if defined)
593R$* < @ $* > $*		$: $>95 < $S > $1 < @ $2 > $3	glue on smarthost name
594
595# deal with other remote names
596ifdef(`_MAILER_smtp_',
597`R$* < @$* > $*		$#_SMTP_ $@ $2 $: $1 < @ $2 > $3		user@host.domain',
598`R$* < @$* > $*		$#error $@NOHOST $: Unrecognized host name $2')
599
600# if this is quoted, strip the quotes and try again
601R$+			$: $(dequote $1 $)		strip quotes
602R$+ $=O $+		$@ $>97 $1 $2 $3			try again
603
604# handle locally delivered names
605R$=L			$#_LOCAL_ $: @ $1			special local names
606R$+			$#_LOCAL_ $: $1			regular local names
607
608###########################################################################
609###   Ruleset 5 -- special rewriting after aliases have been expanded   ###
610###########################################################################
611
612S5
613
614# if we have a "special dotted user", convert it back to the base name
615R$=D . *		$#_LOCAL_ $: $1
616R$=D . $+		$#_LOCAL_ $: $1 . *
617
618# prepend an empty "forward host" on the front
619R$+			$: <> $1
620
621ifdef(`LUSER_RELAY',
622`# send unrecognized local users to a relay host
623R< > $+ + $*		$: < $L . > $( user $1 $) + $2
624R< > $+			$: < $L . > $( user $1 $)	look up user
625R< $* > $+ <> $*	$: < > $2 $3			found; strip $L
626R< $* . > $+		$: < $1 > $2			strip extra dot')
627
628# handle plussed local names
629R< > $+ + $*		$#_LOCAL_ $@ $2 $: $1
630
631# see if we have a relay or a hub
632R< > $+			$: < $R > $1			try relay
633R< > $+			$: < $H > $1			try hub
634R< > $+			$@ $1				nope, give up
635R< $- : $+ > $+		$: $>95 < $1 : $2 > $3 < @ $2 >
636R< $+ > $+		$@ $>95 < $1 > $2 < @ $1 >
637ifdef(`MAILER_TABLE',
638`
639
640###################################################################
641###  Ruleset 90 -- try domain part of mailertable entry 	###
642###################################################################
643
644S90
645R$* <$- . $+ > $*	$: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4
646R$* <$- : $+ > $*	$# $2 $@ $3 $: $4		check -- resolved?
647R$* < . $+ > $*		$@ $>90 $1 . <$2> $3		no -- strip & try again
648R$* < $* > $*		$: < $(mailertable . $@ $1$2 $) > $3	try "."
649R<$- : $+ > $*		$# $1 $@ $2 $: $3		"." found?
650R< $* > $*		$@ $2				no mailertable match',
651`dnl')
652
653###################################################################
654###  Ruleset 95 -- canonify mailer:host syntax to triple	###
655###################################################################
656
657S95
658R< > $*			$@ $1				strip off null relay
659R< $- : $+ > $*		$# $1 $@ $2 $: $3		try qualified mailer
660R< $=w > $*		$@ $2				delete local host
661R< $+ > $*		$#_RELAY_ $@ $1 $: $2		use unqualified mailer
662
663###################################################################
664###  Ruleset 98 -- local part of ruleset zero (can be null)	###
665###################################################################
666
667S98
668undivert(3)dnl
669#
670######################################################################
671######################################################################
672#####
673`#####			MAILER DEFINITIONS'
674#####
675######################################################################
676######################################################################
677undivert(7)dnl
678