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(`@(#)nullrelay.m4 8.2 (Berkeley) 08/21/93') 12 13# 14# This configuration applies only to relay-only hosts. They send 15# all mail to a hub without consideration of the address syntax 16# or semantics, except for adding the hub qualification to the 17# addresses. 18# 19# This is based on a prototype done by Bryan Costales of ICSI. 20# 21 22# hub host (to which all mail is sent) 23DH`'ifdef(`MAIL_HUB', MAIL_HUB, 24 ifdef(`LOCAL_RELAY', LOCAL_RELAY, 25 ifdef(`SMART_HOST', SMART_HOST))) 26 27# route-addr separators 28C: : , 29 30undivert(6)dnl 31 32###################### 33# Special macros # 34###################### 35 36# SMTP initial login message 37De`'confSMTP_LOGIN_MSG 38 39# UNIX initial From header format 40Dl`'confFROM_LINE 41 42# my name for error messages 43Dn`'confMAILER_NAME 44 45# delimiter (operator) characters 46Do`'confOPERATORS 47 48# format of a total name 49Dq<$g> 50include(`../m4/version.m4') 51 52############### 53# Options # 54############### 55 56# strip message body to 7 bits on input? 57O7`'confSEVEN_BIT_INPUT 58 59# no aliases here 60 61# substitution for space (blank) characters 62OB`'confBLANK_SUB 63 64# default delivery mode 65Od`'confDELIVERY_MODE 66 67# error message header/file 68ifdef(`confERROR_MESSAGE', 69 OE`'confERROR_MESSAGE, 70 #OE/etc/sendmail.oE) 71 72# error mode 73ifdef(`confERROR_MODE', 74 Oe`'confERROR_MODE, 75 #Oep) 76 77# save Unix-style "From_" lines at top of header? 78Of`'confSAVE_FROM_LINES 79 80# temporary file mode 81OF`'confTEMP_FILE_MODE 82 83# default GID 84Og`'confDEF_GROUP_ID 85 86# maximum hop count 87Oh`'confMAX_HOP 88 89# location of help file 90OH`'ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf) 91 92# ignore dots as terminators in incoming messages? 93Oi`'confIGNORE_DOTS 94 95# Insist that the BIND name server be running to resolve names 96ifdef(`confBIND_OPTS', 97 OI`'confBIND_OPTS, 98 #OI) 99 100# deliver MIME-encapsulated error messages? 101Oj`'confMIME_FORMAT_ERRORS 102 103# open connection cache size 104Ok`'confMCI_CACHE_SIZE 105 106# open connection cache timeout 107OK`'confMCI_CACHE_TIMEOUT 108 109# use Errors-To: header? 110Ol`'confUSE_ERRORS_TO 111 112# log level 113OL`'confLOG_LEVEL 114 115# send to me too, even in an alias expansion? 116Om`'confME_TOO 117 118# default messages to old style headers if no special punctuation? 119Oo`'confOLD_STYLE_HEADERS 120 121# SMTP daemon options 122ifdef(`confDAEMON_OPTIONS', 123 OO`'confDAEMON_OPTIONS, 124 #OOPort=esmtp) 125 126# privacy flags 127Op`'confPRIVACY_FLAGS 128 129# who (if anyone) should get extra copies of error messages 130ifdef(`confCOPY_ERRORS_TO', 131 OP`'confCOPY_ERRORS_TO, 132 #OPPostmaster) 133 134# slope of queue-only function 135ifdef(`confQUEUE_FACTOR', 136 Oq`'confQUEUE_FACTOR, 137 #Oq600000) 138 139# queue directory 140OQ`'ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue) 141 142# read timeout -- now OK per RFC 1123 section 5.3.2 143ifdef(`confREAD_TIMEOUT', 144 Or`'confREAD_TIMEOUT, 145 #Ordatablock=10m) 146 147# queue up everything before forking? 148Os`'confSAFE_QUEUE 149 150# status file 151OS`'ifdef(`STATUS_FILE', STATUS_FILE, /etc/sendmail.st) 152 153# default message timeout interval 154OT`'confMESSAGE_TIMEOUT 155 156# time zone handling: 157# if undefined, use system default 158# if defined but null, use TZ envariable passed in 159# if defined and non-null, use that info 160ifelse(confTIME_ZONE, `USE_SYSTEM', `#Ot', 161 confTIME_ZONE, `USE_TZ', `', 162 `Ot`'confTIME_ZONE') 163 164# default UID 165Ou`'confDEF_USER_ID 166 167# deliver each queued job in a separate process? 168OY`'confSEPARATE_PROC 169 170# work class factor 171ifdef(`confWORK_CLASS_FACTOR', 172 Oz`'confWORK_CLASS_FACTOR, 173 #Oz1800) 174 175# work time factor 176ifdef(`confWORK_TIME_FACTOR', 177 OZ`'confWORK_TIME_FACTOR, 178 #OZ90000) 179 180########################### 181# Message precedences # 182########################### 183 184Pfirst-class=0 185Pspecial-delivery=100 186Plist=-30 187Pbulk=-60 188Pjunk=-100 189 190##################### 191# Trusted users # 192##################### 193 194Troot 195Tdaemon 196Tuucp 197 198######################### 199# Format of headers # 200######################### 201 202H?P?Return-Path: $g 203HReceived: $?sfrom $s $.$?_($_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b 204H?D?Resent-Date: $a 205H?D?Date: $a 206H?F?Resent-From: $q 207H?F?From: $q 208H?x?Full-Name: $x 209HSubject: 210# HPosted-Date: $a 211# H?l?Received-Date: $b 212H?M?Resent-Message-Id: <$t.$i@$j> 213H?M?Message-Id: <$t.$i@$j> 214# 215###################################################################### 216###################################################################### 217##### 218##### REWRITING RULES 219##### 220###################################################################### 221###################################################################### 222 223########################################### 224### Rulset 3 -- Name Canonicalization ### 225########################################### 226S3 227 228# handle null input and list syntax (translate to <@> special case) 229R$@ $@ <@> 230R$*:;$* $@ $1 :; <@> 231 232# basic textual canonicalization -- note RFC733 heuristic here 233R$*<$*>$*<$*>$* $2$3<$4>$5 strip multiple <> <> 234R$*<$*<$+>$*>$* <$3>$5 2-level <> nesting 235R$*<>$* $@ <@> MAIL FROM:<> case 236R$*<$+>$* $2 basic RFC821/822 parsing 237 238# eliminate local host if present 239R@ $=w $=: $+ $@ @ $H $2 $3 @thishost ... 240R@ $+ $@ $1 @somewhere ... 241 242R$+ @ $=w $@ $1 @ $H ...@thishost 243R$+ @ $+ $@ $1 @ $2 ...@somewhere 244 245R$=w ! $+ $@ $2 @ $H thishost!... 246R$+ ! $+ $@ $1 ! $2 @ $H somewhere ! ... 247 248R$+ % $=w $@ $1 @ $H ...%thishost 249R$+ % $+ $@ $1 @ $2 ...%somewhere 250 251R$+ $@ $1 @ $H unadorned user 252 253 254###################################### 255### Ruleset 0 -- Parse Address ### 256###################################### 257 258S0 259 260R$*:;<@> $#error $@ USAGE $: "list:; syntax illegal for recipient addresses" 261 262# pass everything else to a relay host 263R$* $#_RELAY_ $@ $H $: $1 264 265# 266###################################################################### 267###################################################################### 268##### 269`##### MAILER DEFINITIONS' 270##### 271###################################################################### 272###################################################################### 273undivert(7)dnl 274