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*58499SericVERSIONID(`@(#)proto.m4 6.18 (Berkeley) 03/05/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 27957944SericH?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 30151222Seric 30251222Seric########################################### 30351222Seric### Rulset 3 -- Name Canonicalization ### 30451222Seric########################################### 30551260SericS3 30651222Seric 307*58499Seric# handle null input and list syntax (translate to <@> special case) 308*58499SericR$@ $@ <@> 309*58499SericR$*:;$* $@ $1 ;: <@> 31058174Seric 31151222Seric# basic textual canonicalization -- note RFC733 heuristic here 31257012SericR$*<$*>$*<$*>$* <$2>$3$4$5 strip multiple <> <> 31358158SericR$*<$*<$+>$*>$* <$3>$5 2-level <> nesting 314*58499SericR$*<>$* $@ <@> MAIL FROM:<> case 31551222SericR$*<$+>$* $2 basic RFC821/822 parsing 31651222Seric 31751222Seric# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later 31855416SericR@ $+ , $+ @ $1 : $2 change all "," to ":" 31951222Seric 32051222Seric# localize and dispose of route-based addresses 32155416SericR@ $+ : $+ $@ $>6 < @$1 > : $2 handle <route-addr> 32251222Seric 32351222Seric# find focus for list syntax 32455416SericR $+ : $* ; @ $+ $@ $>6 $1 : $2 ; < @ $3 > list syntax 32555416SericR $+ : $* ; $@ $1 : $2; list syntax 32651222Seric 32751222Seric# find focus for @ syntax addresses 32855416SericR$+ @ $+ $: $1 < @ $2 > focus on domain 32955416SericR$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right 33055416SericR$+ < @ $+ > $@ $>6 $1 < @ $2 > already canonical 33151222Seric 33258288Sericifdef(`_NO_UUCP_', `dnl', 33358288Seric`# convert old-style addresses to a domain-based address 33455416SericR$- ! $+ $@ $>6 $2 < @ $1 .UUCP > resolve uucp names 33555416SericR$+ . $- ! $+ $@ $>6 $3 < @ $1 . $2 > domain uucps 33658288SericR$+ ! $+ $@ $>6 $2 < @ $1 .UUCP > uucp subdomains') 33751222Seric 33851222Seric# if we have % signs, take the rightmost one 33955416SericR$* % $* $1 @ $2 First make them all @s. 34055416SericR$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. 34155416SericR$* @ $* $@ $>6 $1 < @ $2 > Insert < > and finish 34251222Seric 34351222Seric# else we must be a local name 34451222Seric 34551222Seric 34651222Seric############################################### 34751222Seric### Ruleset 6 -- bottom half of ruleset 3 ### 34851222Seric############################################### 34951222Seric 35057245Seric# At this point, everything should be in a "local_part<@domain>extra" format. 35151222SericS6 35251222Seric 35351222Seric# handle special cases for local names 35451322SericR$* < @ $=w > $* $: $1 < @ $j . > $3 no domain at all 35555416SericR$* < @ $=w . UUCP > $* $: $1 < @ $j . > $3 .UUCP domain 35651889Sericundivert(2)dnl 35751222Seric 35851274Sericifdef(`UUCP_RELAY', 35951274Seric`# pass UUCP addresses straight through 36055416SericR$* < @ $+ . UUCP > $* $@ $1 < @ $2 . UUCP > $3', 36151274Seric`# if really UUCP, handle it immediately 36251322Sericifdef(`_CLASS_U_', 36355416Seric`R$* < @ $=U . UUCP > $* $@ $1 < @ $2 . UUCP > $3', `dnl') 36451322Sericifdef(`_CLASS_V_', 36555416Seric`R$* < @ $=V . UUCP > $* $@ $1 < @ $2 . UUCP > $3', `dnl') 36651322Sericifdef(`_CLASS_W_', 36755416Seric`R$* < @ $=W . UUCP > $* $@ $1 < @ $2 . UUCP > $3', `dnl') 36851322Sericifdef(`_CLASS_X_', 36955416Seric`R$* < @ $=X . UUCP > $* $@ $1 < @ $2 . UUCP > $3', `dnl') 37051322Sericifdef(`_CLASS_Y_', 37155416Seric`R$* < @ $=Y . UUCP > $* $@ $1 < @ $2 . UUCP > $3', `dnl') 37251267Seric 37351267Seric# try UUCP traffic as a local address 37455416SericR$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP > $3 37551992Sericifdef(`_OLD_SENDMAIL_', 37655416Seric`R$* < @ $+ . $+ . UUCP > $* $@ $1 < @ $2 . $3 . > $4', 37755416Seric`R$* < @ $+ . . UUCP > $* $@ $1 < @ $2 . > $3')') 37851267Seric 37951222Seric# pass to name server to make hostname canonical 38051322SericR$* < @ $* $~. > $* $: $1 < @ $[ $2 $3 $] > $4 38151222Seric 38251889Seric# handle possible alternate names 38351889SericR$* < @ $=w . $m . > $* $: $1 < @ $j . > $3 38451889SericR$* < @ $=w . $m > $* $: $1 < @ $j . > $3 38551889Sericundivert(8)dnl 38651889Seric 38751322Seric# if this is the local hostname, make sure we treat is as canonical 38851322SericR$* < @ $j > $* $: $1 < @ $j . > $2 38951222Seric 39051322Seric 39151222Seric################################################## 39251222Seric### Ruleset 4 -- Final Output Post-rewriting ### 39351222Seric################################################## 39451222SericS4 39551222Seric 396*58499SericR$*<@> $@ $1 handle <> and list:; 39751222Seric 39851222Seric# resolve numeric addresses to name if possible 39951322SericR$* < @ [ $+ ] > $* $: $1 < @ $[ [$2] $] > $3 lookup numeric internet addr 40051222Seric 40151322Seric# strip trailing dot off possibly canonical name 40251322SericR$* < @ $+ . > $* $1 < @ $2 > $3 40351322Seric 40451222Seric# externalize local domain info 40551322SericR$* < $+ > $* $1 $2 $3 defocus 40651322SericR@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical 40751997SericR@ $* $@ @ $1 ... and exit 40851222Seric 40958288Sericifdef(`_NO_UUCP_', `dnl', 41058288Seric`# UUCP must always be presented in old form 41158288SericR$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u') 41251222Seric 41351222Seric# delete duplicate local names 41451322SericR$+ % $=w @ $=w $1 @ $j u%host@host => u@host 41551222Seric 41651222Seric 41751222Seric 41851222Seric############################################################# 41951222Seric### Ruleset 7 -- recanonicalize and call ruleset zero ### 42051222Seric### (used for recursive calls) ### 42151222Seric############################################################# 42251222Seric 42351222SericS7 42451222SericR$* $: $>3 $1 42551222SericR$* $@ $>0 $1 42651222Seric 42751222Seric 42851222Seric###################################### 42951222Seric### Ruleset 0 -- Parse Address ### 43051222Seric###################################### 43151222Seric 43251222SericS0 43351222Seric 43458340SericR<> $#local $: <> special case error msgs 43558340Seric 43655416Sericifdef(`_MAILER_smtp_', 43755416Seric`# handle numeric address spec 43851322SericR$* < @ [ $+ ] > $* $: $1 < @ $[ [$2] $] > $3 numeric internet addr 43955416SericR$* < @ [ $+ ] > $* $#smtp $@ [$2] $: $1 @ [$2] $3 numeric internet spec', 44056785Seric`dnl') 44151222Seric 44251887Seric# now delete the local info -- note $=O to find characters that cause forwarding 44358482SericR$* < @ > $* $@ $>7 $1 user@ => user 44451322SericR< @ $j . > : $* $@ $>7 $1 @here:... -> ... 44551322SericR$* $=O $* < @ $j . > $@ $>7 $1 $2 $3 ...@here -> ... 44651222Seric 44751222Seric# short circuit local delivery so forwarded email works 44857527SericR$+ < @ $j . > $: $1 < @ $j @ $H > first try hub 44951992Sericifdef(`_OLD_SENDMAIL_', 45058070Seric`R$+ < $+ @ $-:$+ > $# $3 $@ $4 $: $1 < $2 > yep .... 45158070SericR$+ < $+ @ $+ > $#smtp $@ $3 $: $1 < $2 > yep .... 45257527SericR$+ < $+ @ > $#local $: $1 nope, local address', 45357527Seric`R$+ < $+ @ $+ > $#local $: $1 yep .... 45457527SericR$+ < $+ @ > $#local $: @ $1 nope, local address') 45551222Sericundivert(3)dnl 45651260Sericundivert(4)dnl 45751260Seric 45855416Seric# resolve remotely connected UUCP links (if any) 45951285Sericifdef(`_CLASS_V_', 46052044Seric`R$* < @ $=V . UUCP > $* $#smtp $@ $V $: <@ $V> : $1 @ $2.UUCP $3', 46152044Seric `dnl') 46251285Sericifdef(`_CLASS_W_', 46352044Seric`R$* < @ $=W . UUCP > $* $#smtp $@ $W $: <@ $W> : $1 @ $2.UUCP $3', 46452044Seric `dnl') 46551285Sericifdef(`_CLASS_X_', 46652044Seric`R$* < @ $=X . UUCP > $* $#smtp $@ $X $: <@ $X> : $1 @ $2.UUCP $3', 46752044Seric `dnl') 46851260Seric 46951222Seric# resolve fake top level domains by forwarding to other hosts 47051222Sericifdef(`BITNET_RELAY', 47152044Seric`R$*<@$+.BITNET>$* $#smtp $@ $B $: $1 <@$2.BITNET> $3 user@host.BITNET', 47251222Seric `dnl') 47351222Sericifdef(`CSNET_RELAY', 47452044Seric`R$*<@$+.CSNET>$* $#smtp $@ $C $: $1 <@$2.CSNET> $3 user@host.CSNET', 47551222Seric `dnl') 47658364Sericifdef(`_MAILER_fax_', 47758364Seric`R$+ < @ $+ .FAX > $#fax $@ $2 $: $1 user@host.FAX', 47858364Seric`ifdef(`FAX_RELAY', 47958364Seric`R$*<@$+.FAX>$* $#smtp $@ $F $: $1 <@$2.FAX> $3 user@host.FAX', 48058364Seric `dnl')') 48151222Seric 48251260Sericifdef(`UUCP_RELAY', 48351260Seric`# forward non-local UUCP traffic to our UUCP relay 48452044SericR$*<@$*.UUCP>$* $#smtp $@ $Y $: <@ $Y> : $1 @ $2.UUCP $3 uucp mail', 48555416Seric`ifdef(`_MAILER_uucp_', 48651260Seric`# forward other UUCP traffic straight to UUCP 48751260SericR< @ $+ .UUCP > : $+ $#uucp $@ $1 $: $1:$2 @host.UUCP:... 48851322SericR$+ < @ $+ .UUCP > $#uucp $@ $2 $: $1 user@host.UUCP', 48951260Seric `dnl')') 49051222Seric 49158070Sericifdef(`_LOCAL_RULES_', 49258070Seric`# figure out what should stay in our local mail system 49358070Sericundivert(1)', 49458070Seric`ifdef(`_MAILER_smtp_', 49555416Seric`# deal with other remote names 49658070SericR$* < @ $* > $* $#smtp $@ $2 $: $1 < @ $2 > $3 user@host.domain')') 49758070Sericifdef(`SMART_HOST', ` 49858070Seric# pass names that still have a host to a smarthost 49958070SericR$* < @ $* > $* $: < $S > $1 < @ $2 > $3 glue on smarthost name 50058070SericR<$-:$+> $* < @$* > $* $# $1 $@ $2 $: $3 < @ $4 > $5 if non-null, use it 50158070SericR<$+> $* < @$* > $* $#suucp $@ $1 $: $2 < @ $3 > $4 if non-null, use it 50258070SericR<> $* < @ $* > $* $1 < @ $2 > $3 else strip off gunk', 50358070Seric`ifdef(`_LOCAL_RULES_', ` 50458070Seric# reject messages that have host names we do not understand 50558070SericR$* < @ $* > $* $#error $@ NOHOST $: Unrecognized host name $2', 50658070Seric`dnl')') 50758084Sericifdef(`_MAILER_USENET_', ` 50858084Seric# addresses sent to net.group.USENET will get forwarded to a newsgroup 50958096SericR$+ . USENET $# usenet $: $1') 51051222Seric 51151992Sericifdef(`_OLD_SENDMAIL_', 51251887Seric`# forward remaining names to local relay, if any 51352041SericR$=L $#local $: $1 special local names 51452041SericR$+ $: $1 < @ $R > append relay 51557527SericR$+ < @ > $: $1 < @ $H > no relay, try hub 51657527SericR$+ < @ > $#local $: $1 no relay or hub: local 51757527SericR$+ < @ $j > $#local $: $1 we are relay/hub: local 51858070SericR$+ < @ $-:$+ > $# $2 $@ $3 $: $1 deliver to relay/hub 51957527SericR$+ < @ $+ > $#smtp $@ $2 $: $1 deliver to relay/hub', 52051992Seric`# handle locally delivered names 52152041SericR$=L $#local $: @ $1 special local names 52252041SericR$+ $#local $: $1 regular local names 52351222Seric 52455416Seric########################################################################### 52555416Seric### Ruleset 5 -- special rewriting after aliases have been expanded ### 52655416Seric### (new sendmail only) ### 52755416Seric########################################################################### 52851222Seric 52951322SericS5 53051322Seric 53155416Sericifdef(`_MAILER_smtp_', 53255416Seric`R$+ $: $1 < @ $R > 53357527SericR$+ < @ > $: $1 < @ $H > no relay, try hub 53457527SericR$+ < @ $j > $@ $1 we are relay/hub: local 53558070SericR$+ < @ $-:$+ > $# $2 $@ $3 $: $1 send to relay or hub 53657527SericR$+ < @ $+ > $#smtp $@ $2 $: $1 send to relay or hub')') 53751222Seric# 53851222Seric###################################################################### 53951222Seric###################################################################### 54051222Seric##### 54156790Seric`##### MAILER DEFINITIONS' 54251222Seric##### 54351222Seric###################################################################### 54451222Seric###################################################################### 54551222Sericundivert(7)dnl 546