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.43 (Berkeley) 02/16/94') 12 13MAILER(local)dnl 14 15ifdef(`_OLD_SENDMAIL_', 16`define(`_SET_95_', 5)dnl 17define(`_SET_96_', 6)dnl 18define(`_SET_97_', 7)dnl 19define(`_SET_98_', 8)dnl 20define(`confDOMAIN_NAME', 21 `ifdef(`NEED_DOMAIN', `$w.$d', `$w')')dnl', 22`# level 5 config file format 23V5 24define(`_SET_95_', 95)dnl 25define(`_SET_96_', 96)dnl 26define(`_SET_97_', 97)dnl 27define(`_SET_98_', 98)dnl') 28ifdef(`confSMTP_MAILER',, `define(`confSMTP_MAILER', `smtp')')dnl 29ifdef(`confLOCAL_MAILER',, `define(`confLOCAL_MAILER', `local')')dnl 30ifdef(`confRELAY_MAILER',, 31 `define(`confRELAY_MAILER', 32 `ifdef(`_MAILER_smtp_', `relay', 33 `ifdef(`_MAILER_uucp', `suucp', `unknown')')')')dnl 34define(`_SMTP_', `confSMTP_MAILER')dnl for readability only 35define(`_LOCAL_', `confLOCAL_MAILER')dnl for readability only 36define(`_RELAY_', `confRELAY_MAILER')dnl for readability only 37 38################## 39# local info # 40################## 41 42Cwlocalhost 43ifdef(`USE_CW_FILE', 44`# file containing names of hosts for which we receive email 45Fw`'confCW_FILE', 46 `dnl') 47ifdef(`confDOMAIN_NAME', ` 48# my official domain name 49Dj`'confDOMAIN_NAME', 50 `dnl') 51 52ifdef(`_NULL_CLIENT_ONLY_', 53`include(../m4/nullrelay.m4)m4exit', 54 `dnl') 55 56CP. 57 58ifdef(`UUCP_RELAY', 59`# UUCP relay host 60DY`'UUCP_RELAY 61CPUUCP 62 63')dnl 64ifdef(`BITNET_RELAY', 65`# BITNET relay host 66DB`'BITNET_RELAY 67CPBITNET 68 69')dnl 70ifdef(`FAX_RELAY', 71`# FAX relay host 72DF`'FAX_RELAY 73CPFAX 74 75')dnl 76# "Smart" relay host (may be null) 77DS`'ifdef(`SMART_HOST', SMART_HOST) 78 79ifdef(`MAILER_TABLE', 80`# Mailer table (overriding domains) 81Kmailertable MAILER_TABLE 82 83')dnl 84ifdef(`DOMAIN_TABLE', 85`# Domain table (adding domains) 86Kdomaintable DOMAIN_TABLE 87 88')dnl 89# who I send unqualified names to (null means deliver locally) 90DR`'ifdef(`LOCAL_RELAY', LOCAL_RELAY) 91 92# who gets all local email traffic ($R has precedence for unqualified names) 93DH`'ifdef(`MAIL_HUB', MAIL_HUB) 94 95# who I masquerade as (null for no masquerading) 96DM`'ifdef(`MASQUERADE_NAME', MASQUERADE_NAME) 97 98# class L: names that should be delivered locally, even if we have a relay 99# class E: names that should be exposed as from this host, even if we masquerade 100#CLroot 101CEroot 102undivert(5)dnl 103 104# operators that cannot be in local usernames (i.e., network indicators) 105CO @ % ifdef(`_NO_UUCP_', `', `!') 106 107# a class with just dot (for identifying canonical names) 108C.. 109 110ifdef(`_OLD_SENDMAIL_', `dnl', 111`# dequoting map 112Kdequote dequote') 113 114undivert(6)dnl 115 116###################### 117# Special macros # 118###################### 119 120# SMTP initial login message 121De`'confSMTP_LOGIN_MSG 122 123# UNIX initial From header format 124Dl`'confFROM_LINE 125 126# my name for error messages 127Dn`'confMAILER_NAME 128 129# delimiter (operator) characters 130Do`'confOPERATORS 131 132# format of a total name 133Dq`'ifdef(`confFROM_HEADER', confFROM_HEADER, 134 ifdef(`_OLD_SENDMAIL_', `$g$?x ($x)$.', `$?x$x <$g>$|$g$.')) 135include(`../m4/version.m4') 136 137############### 138# Options # 139############### 140 141# strip message body to 7 bits on input? 142O7`'confSEVEN_BIT_INPUT 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# queue up everything before forking? 260Os`'confSAFE_QUEUE 261 262# status file 263OS`'ifdef(`STATUS_FILE', STATUS_FILE, /etc/sendmail.st) 264 265# default message timeout interval 266OT`'confMESSAGE_TIMEOUT 267 268# time zone handling: 269# if undefined, use system default 270# if defined but null, use TZ envariable passed in 271# if defined and non-null, use that info 272ifelse(confTIME_ZONE, `USE_SYSTEM', `#Ot', 273 confTIME_ZONE, `USE_TZ', `Ot', 274 `Ot`'confTIME_ZONE') 275 276# default UID 277Ou`'confDEF_USER_ID 278 279# list of locations of user database file (null means no lookup) 280OU`'ifdef(`confUSERDB_SPEC', `confUSERDB_SPEC') 281 282# fallback MX host 283ifdef(`confFALLBACK_MX', 284 OV`'confFALLBACK_MX, 285 #OVfall.back.host.net) 286 287# if we are the best MX host for a site, try it directly instead of config err 288Ow`'confTRY_NULL_MX_LIST 289 290# load average at which we just queue messages 291Ox`'confQUEUE_LA 292 293# load average at which we refuse connections 294OX`'confREFUSE_LA 295 296# work recipient factor 297ifdef(`confWORK_RECIPIENT_FACTOR', 298 Oy`'confWORK_RECIPIENT_FACTOR, 299 #Oy30000) 300 301# deliver each queued job in a separate process? 302OY`'confSEPARATE_PROC 303 304# work class factor 305ifdef(`confWORK_CLASS_FACTOR', 306 Oz`'confWORK_CLASS_FACTOR, 307 #Oz1800) 308 309# work time factor 310ifdef(`confWORK_TIME_FACTOR', 311 OZ`'confWORK_TIME_FACTOR, 312 #OZ90000) 313 314########################### 315# Message precedences # 316########################### 317 318Pfirst-class=0 319Pspecial-delivery=100 320Plist=-30 321Pbulk=-60 322Pjunk=-100 323 324##################### 325# Trusted users # 326##################### 327 328Troot 329Tdaemon 330Tuucp 331 332######################### 333# Format of headers # 334######################### 335 336H?P?Return-Path: $g 337HReceived: $?sfrom $s $.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b 338H?D?Resent-Date: $a 339H?D?Date: $a 340H?F?Resent-From: $q 341H?F?From: $q 342H?x?Full-Name: $x 343HSubject: 344# HPosted-Date: $a 345# H?l?Received-Date: $b 346H?M?Resent-Message-Id: <$t.$i@$j> 347H?M?Message-Id: <$t.$i@$j> 348# 349###################################################################### 350###################################################################### 351##### 352##### REWRITING RULES 353##### 354###################################################################### 355###################################################################### 356 357undivert(9)dnl 358 359########################################### 360### Rulset 3 -- Name Canonicalization ### 361########################################### 362S3 363 364# handle null input (translate to <@> special case) 365R$@ $@ <@> 366 367# basic textual canonicalization -- note RFC733 heuristic here 368R$*<$*>$*<$*>$* $2$3<$4>$5 strip multiple <> <> 369R$*<$*<$+>$*>$* <$3>$5 2-level <> nesting 370R$*<>$* $@ <@> MAIL FROM:<> case 371R$*<$+>$* $2 basic RFC821/822 parsing 372 373# handle list:; syntax as special case 374R$*:;$* $@ $1 :; <@> 375 376# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later 377R@ $+ , $+ @ $1 : $2 change all "," to ":" 378 379# localize and dispose of route-based addresses 380R@ $+ : $+ $@ $>_SET_96_ < @$1 > : $2 handle <route-addr> 381 382# find focus for list syntax 383R $+ : $* ; @ $+ $@ $>_SET_96_ $1 : $2 ; < @ $3 > list syntax 384R $+ : $* ; $@ $1 : $2; list syntax 385 386# find focus for @ syntax addresses 387R$+ @ $+ $: $1 < @ $2 > focus on domain 388R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right 389R$+ < @ $+ > $@ $>_SET_96_ $1 < @ $2 > already canonical 390 391# do some sanity checking 392R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs 393 394ifdef(`_NO_UUCP_', `dnl', 395`# convert old-style addresses to a domain-based address 396R$- ! $+ $@ $>_SET_96_ $2 < @ $1 .UUCP > resolve uucp names 397R$+ . $- ! $+ $@ $>_SET_96_ $3 < @ $1 . $2 > domain uucps 398R$+ ! $+ $@ $>_SET_96_ $2 < @ $1 .UUCP > uucp subdomains') 399 400# if we have % signs, take the rightmost one 401R$* % $* $1 @ $2 First make them all @s. 402R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. 403R$* @ $* $@ $>_SET_96_ $1 < @ $2 > Insert < > and finish 404 405# else we must be a local name 406 407 408################################################ 409### Ruleset _SET_96_ -- bottom half of ruleset 3 ### 410################################################ 411 412# At this point, everything should be in a "local_part<@domain>extra" format. 413S`'_SET_96_ 414 415# handle special cases for local names 416R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all 417R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain 418ifdef(`_NO_UUCP_', `dnl', 419`R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain') 420R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d] 421R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal 422R$* < @@ $+ > $* $: $1 < @ $2 > $3 strip dbl @@ 423ifdef(`DOMAIN_TABLE', ` 424# look up unqualified domains in the domain table 425R$* < @ $- > $* $: $1 < @ $(domaintable $2 $) > $3', 426`dnl') 427undivert(2)dnl 428 429ifdef(`_NO_UUCP_', `dnl', 430`ifdef(`UUCP_RELAY', 431`# pass UUCP addresses straight through 432R$* < @ $+ . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', 433`# if really UUCP, handle it immediately 434ifdef(`_CLASS_U_', 435`R$* < @ $=U . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') 436ifdef(`_CLASS_V_', 437`R$* < @ $=V . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') 438ifdef(`_CLASS_W_', 439`R$* < @ $=W . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') 440ifdef(`_CLASS_X_', 441`R$* < @ $=X . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') 442ifdef(`_CLASS_Y_', 443`R$* < @ $=Y . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') 444 445# try UUCP traffic as a local address 446R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3 447ifdef(`_OLD_SENDMAIL_', 448`R$* < @ $+ . $+ . UUCP . > $* $@ $1 < @ $2 . $3 . > $4', 449`R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3')') 450') 451ifdef(`_NO_CANONIFY_', `dnl', 452`# pass to name server to make hostname canonical 453R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4') 454 455# local host aliases and pseudo-domains are always canonical 456R$* < @ $=w > $* $: $1 < @ $2 . > $3 457R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4 458R$* < @ $* . . > $* $1 < @ $2 . > $3 459 460# if this is the local hostname, make sure we treat is as canonical 461R$* < @ $j > $* $: $1 < @ $j . > $2 462 463 464################################################## 465### Ruleset 4 -- Final Output Post-rewriting ### 466################################################## 467S4 468 469R$*<@> $@ $1 handle <> and list:; 470 471# resolve numeric addresses to name if possible 472R$* < @ [ $+ ] > $* $: $1 < @ $[ [$2] $] > $3 lookup numeric internet addr 473 474# strip trailing dot off possibly canonical name 475R$* < @ $+ . > $* $1 < @ $2 > $3 476 477# externalize local domain info 478R$* < $+ > $* $1 $2 $3 defocus 479R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical 480R@ $* $@ @ $1 ... and exit 481 482ifdef(`_NO_UUCP_', `dnl', 483`# UUCP must always be presented in old form 484R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u') 485 486# delete duplicate local names 487R$+ % $=w @ $=w $1 @ $j u%host@host => u@host 488 489 490 491############################################################## 492### Ruleset _SET_97_ -- recanonicalize and call ruleset zero ### 493### (used for recursive calls) ### 494############################################################## 495 496S`'_SET_97_ 497R$* $: $>3 $1 498R$* $@ $>0 $1 499 500 501###################################### 502### Ruleset 0 -- Parse Address ### 503###################################### 504 505S0 506 507R<@> $#_LOCAL_ $: <> special case error msgs 508R$* : $* ; $#error $@ USAGE $: "list:; syntax illegal for recipient addresses" 509R<@ $+> $#error $@ USAGE $: "user address required" 510 511ifdef(`_MAILER_smtp_', 512`# handle numeric address spec 513ifdef(`_NO_CANONIFY_', `dnl', 514`R$* < @ [ $+ ] > $* $: $1 < @ $[ [$2] $] > $3 numeric internet addr') 515R$* < @ [ $+ ] > $* $: $>_SET_98_ $1 < @ [ $2 ] > $3 numeric internet spec 516R$* < @ [ $+ ] > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 still numeric: send', 517 `dnl') 518 519# now delete the local info -- note $=O to find characters that cause forwarding 520R$* < @ > $* $@ $>_SET_97_ $1 user@ => user 521R< @ $=w . > : $* $@ $>_SET_97_ $2 @here:... -> ... 522R$* $=O $* < @ $=w . > $@ $>_SET_97_ $1 $2 $3 ...@here -> ... 523 524# handle local hacks 525R$* $: $>_SET_98_ $1 526 527# short circuit local delivery so forwarded email works 528ifdef(`_LOCAL_NOT_STICKY_', 529`R$=L < @ $=w . > $#_LOCAL_ $: @ $1 special local names 530R$+ < @ $=w . > $#_LOCAL_ $: $1 dispose directly', 531`R$+ < @ $=w . > $: $1 < @ $2 . @ $H > first try hub 532ifdef(`_OLD_SENDMAIL_', 533`R$+ < $+ @ $-:$+ > $# $3 $@ $4 $: $1 < $2 > yep .... 534R$+ < $+ @ $+ > $#relay $@ $3 $: $1 < $2 > yep .... 535R$+ < $+ @ > $#_LOCAL_ $: $1 nope, local address', 536`R$+ < $+ @ $+ > $#_LOCAL_ $: $1 yep .... 537R$+ < $+ @ > $#_LOCAL_ $: @ $1 nope, local address')') 538ifdef(`MAILER_TABLE', 539` 540# not local -- try mailer table lookup 541R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name 542R< $+ . > $* $: < $1 > $2 strip trailing dot 543R< $+ > $* $: < $(mailertable $1 $) > $2 lookup 544R< $- : $+ > $* $# $1 $@ $2 $: $3 check -- resolved? 545R< $+ > $* $: $>90 <$1> $2 try domain', 546`dnl') 547undivert(4)dnl 548 549ifdef(`_NO_UUCP_', `dnl', 550`# resolve remotely connected UUCP links (if any) 551ifdef(`_CLASS_V_', 552`R$* < @ $=V . UUCP . > $* $: $>_SET_95_ < $V > $1 <@$2.UUCP.> $3', 553 `dnl') 554ifdef(`_CLASS_W_', 555`R$* < @ $=W . UUCP . > $* $: $>_SET_95_ < $W > $1 <@$2.UUCP.> $3', 556 `dnl') 557ifdef(`_CLASS_X_', 558`R$* < @ $=X . UUCP . > $* $: $>_SET_95_ < $X > $1 <@$2.UUCP.> $3', 559 `dnl')') 560 561# resolve fake top level domains by forwarding to other hosts 562ifdef(`BITNET_RELAY', 563`R$*<@$+.BITNET.>$* $: $>_SET_95_ < $B > $1 <@$2.BITNET.> $3 user@host.BITNET', 564 `dnl') 565ifdef(`_MAILER_pop_', 566`R$+ < @ POP. > $#pop $: $1 user@POP', 567 `dnl') 568ifdef(`_MAILER_fax_', 569`R$+ < @ $+ .FAX. > $#fax $@ $2 $: $1 user@host.FAX', 570`ifdef(`FAX_RELAY', 571`R$*<@$+.FAX.>$* $: $>_SET_95_ < $F > $1 <@$2.FAX.> $3 user@host.FAX', 572 `dnl')') 573 574ifdef(`UUCP_RELAY', 575`# forward non-local UUCP traffic to our UUCP relay 576R$*<@$*.UUCP.>$* $: $>_SET_95_ < $Y > $1 <@$2.UUCP.> $3 uucp mail', 577`ifdef(`_MAILER_uucp_', 578`# forward other UUCP traffic straight to UUCP 579R$* < @ $+ .UUCP. > $* $#uucp $@ $2 $: $1 < @ $2 .UUCP. > $3 user@host.UUCP', 580 `dnl')') 581ifdef(`_MAILER_usenet_', ` 582# addresses sent to net.group.USENET will get forwarded to a newsgroup 583R$+ . USENET $#usenet $: $1', 584 `dnl') 585 586ifdef(`_LOCAL_RULES_', 587`# figure out what should stay in our local mail system 588undivert(1)', `dnl') 589 590# pass names that still have a host to a smarthost (if defined) 591R$* < @ $* > $* $: $>_SET_95_ < $S > $1 < @ $2 > $3 glue on smarthost name 592 593# deal with other remote names 594ifdef(`_MAILER_smtp_', 595`R$* < @$* > $* $#_SMTP_ $@ $2 $: $1 < @ $2 > $3 user@host.domain', 596`R$* < @$* > $* $#error $@NOHOST $: Unrecognized host name $2') 597 598ifdef(`_OLD_SENDMAIL_', 599`# forward remaining names to local relay, if any 600R$=L $#_LOCAL_ $: $1 special local names 601R$+ $: $>_SET_95_ < $R > $1 try relay 602R$+ $: $>_SET_95_ < $H > $1 try hub 603R$+ $#_LOCAL_ $: $1 no relay or hub: local', 604 605`# if this is quoted, strip the quotes and try again 606R$+ $: $(dequote $1 $) strip quotes 607R$+ $=O $+ $@ $>_SET_97_ $1 $2 $3 try again 608 609# handle locally delivered names 610R$=L $#_LOCAL_ $: @ $1 special local names 611R$+ $#_LOCAL_ $: $1 regular local names 612 613########################################################################### 614### Ruleset 5 -- special rewriting after aliases have been expanded ### 615### (new sendmail only) ### 616########################################################################### 617 618S5 619 620# see if we have a relay or a hub 621R$+ $: < $R > $1 try relay 622R< > $+ $: < $H > $1 try hub 623R< > $+ $@ $1 nope, give up 624R< $- : $+ > $+ $: $>_SET_95_ < $1 : $2 > $3 < @ $2 > 625R< $+ > $+ $@ $>_SET_95_ < $1 > $2 < @ $1 >') 626ifdef(`MAILER_TABLE', 627` 628 629################################################################### 630### Ruleset 90 -- try domain part of mailertable entry ### 631### (new sendmail only) ### 632################################################################### 633 634S90 635R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4 636R$* <$- : $+ > $* $# $2 $@ $3 $: $4 check -- resolved? 637R$* < . $+ > $* $@ $>90 $1 . <$2> $3 no -- strip & try again 638R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "." 639R<$- : $+ > $* $# $1 $@ $2 $: $3 "." found? 640R< $* > $* $@ $2 no mailertable match', 641`dnl') 642 643################################################################### 644### Ruleset _SET_95_ -- canonify mailer:host syntax to triple ### 645################################################################### 646 647S`'_SET_95_ 648R< > $* $@ $1 strip off null relay 649R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer 650R< $=w > $* $@ $2 delete local host 651R< $+ > $* $#_RELAY_ $@ $1 $: $2 use unqualified mailer 652 653################################################################### 654### Ruleset _SET_98_ -- local part of ruleset zero (can be null) ### 655################################################################### 656 657S`'_SET_98_ 658undivert(3)dnl 659# 660###################################################################### 661###################################################################### 662##### 663`##### MAILER DEFINITIONS' 664##### 665###################################################################### 666###################################################################### 667undivert(7)dnl 668