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# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions 9# are met: 10# 1. Redistributions of source code must retain the above copyright 11# notice, this list of conditions and the following disclaimer. 12# 2. Redistributions in binary form must reproduce the above copyright 13# notice, this list of conditions and the following disclaimer in the 14# documentation and/or other materials provided with the distribution. 15# 3. All advertising materials mentioning features or use of this software 16# must display the following acknowledgement: 17# This product includes software developed by the University of 18# California, Berkeley and its contributors. 19# 4. Neither the name of the University nor the names of its contributors 20# may be used to endorse or promote products derived from this software 21# without specific prior written permission. 22# 23# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33# SUCH DAMAGE. 34# 35divert(0) 36 37VERSIONID(`@(#)nullrelay.m4 8.5 (Berkeley) 2/1/94') 38 39# 40# This configuration applies only to relay-only hosts. They send 41# all mail to a hub without consideration of the address syntax 42# or semantics, except for adding the hub qualification to the 43# addresses. 44# 45# This is based on a prototype done by Bryan Costales of ICSI. 46# 47 48# hub host (to which all mail is sent) 49DH`'ifdef(`MAIL_HUB', MAIL_HUB, 50 `errprint(`MAIL_HUB not defined for nullclient feature')') 51 52# name from which everyone will appear to come 53DM`'ifdef(`MASQUERADE_NAME', MASQUERADE_NAME, MAIL_HUB) 54 55# route-addr separators 56C: : , 57 58undivert(6)dnl 59 60###################### 61# Special macros # 62###################### 63 64# SMTP initial login message 65De`'confSMTP_LOGIN_MSG 66 67# UNIX initial From header format 68Dl`'confFROM_LINE 69 70# my name for error messages 71Dn`'confMAILER_NAME 72 73# delimiter (operator) characters 74Do`'confOPERATORS 75 76# format of a total name 77Dq<$g> 78include(`../m4/version.m4') 79 80############### 81# Options # 82############### 83 84# strip message body to 7 bits on input? 85O7`'confSEVEN_BIT_INPUT 86 87# no aliases here 88 89# substitution for space (blank) characters 90OB`'confBLANK_SUB 91 92# default delivery mode 93Od`'confDELIVERY_MODE 94 95# error message header/file 96ifdef(`confERROR_MESSAGE', 97 OE`'confERROR_MESSAGE, 98 #OE/etc/sendmail.oE) 99 100# error mode 101ifdef(`confERROR_MODE', 102 Oe`'confERROR_MODE, 103 #Oep) 104 105# save Unix-style "From_" lines at top of header? 106Of`'confSAVE_FROM_LINES 107 108# temporary file mode 109OF`'confTEMP_FILE_MODE 110 111# default GID 112Og`'confDEF_GROUP_ID 113 114# maximum hop count 115Oh`'confMAX_HOP 116 117# location of help file 118OH`'ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf) 119 120# ignore dots as terminators in incoming messages? 121Oi`'confIGNORE_DOTS 122 123# Insist that the BIND name server be running to resolve names 124ifdef(`confBIND_OPTS', 125 OI`'confBIND_OPTS, 126 #OI) 127 128# deliver MIME-encapsulated error messages? 129Oj`'confMIME_FORMAT_ERRORS 130 131# open connection cache size 132Ok`'confMCI_CACHE_SIZE 133 134# open connection cache timeout 135OK`'confMCI_CACHE_TIMEOUT 136 137# use Errors-To: header? 138Ol`'confUSE_ERRORS_TO 139 140# log level 141OL`'confLOG_LEVEL 142 143# send to me too, even in an alias expansion? 144Om`'confME_TOO 145 146# default messages to old style headers if no special punctuation? 147Oo`'confOLD_STYLE_HEADERS 148 149# SMTP daemon options 150ifdef(`confDAEMON_OPTIONS', 151 OO`'confDAEMON_OPTIONS, 152 #OOPort=esmtp) 153 154# privacy flags 155Op`'confPRIVACY_FLAGS 156 157# who (if anyone) should get extra copies of error messages 158ifdef(`confCOPY_ERRORS_TO', 159 OP`'confCOPY_ERRORS_TO, 160 #OPPostmaster) 161 162# slope of queue-only function 163ifdef(`confQUEUE_FACTOR', 164 Oq`'confQUEUE_FACTOR, 165 #Oq600000) 166 167# queue directory 168OQ`'ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue) 169 170# read timeout -- now OK per RFC 1123 section 5.3.2 171ifdef(`confREAD_TIMEOUT', 172 Or`'confREAD_TIMEOUT, 173 #Ordatablock=10m) 174 175# queue up everything before forking? 176Os`'confSAFE_QUEUE 177 178# status file 179OS`'ifdef(`STATUS_FILE', STATUS_FILE, /etc/sendmail.st) 180 181# default message timeout interval 182OT`'confMESSAGE_TIMEOUT 183 184# time zone handling: 185# if undefined, use system default 186# if defined but null, use TZ envariable passed in 187# if defined and non-null, use that info 188ifelse(confTIME_ZONE, `USE_SYSTEM', `#Ot', 189 confTIME_ZONE, `USE_TZ', `Ot', 190 `Ot`'confTIME_ZONE') 191 192# default UID 193Ou`'confDEF_USER_ID 194 195# deliver each queued job in a separate process? 196OY`'confSEPARATE_PROC 197 198# work class factor 199ifdef(`confWORK_CLASS_FACTOR', 200 Oz`'confWORK_CLASS_FACTOR, 201 #Oz1800) 202 203# work time factor 204ifdef(`confWORK_TIME_FACTOR', 205 OZ`'confWORK_TIME_FACTOR, 206 #OZ90000) 207 208########################### 209# Message precedences # 210########################### 211 212Pfirst-class=0 213Pspecial-delivery=100 214Plist=-30 215Pbulk=-60 216Pjunk=-100 217 218##################### 219# Trusted users # 220##################### 221 222Troot 223Tdaemon 224Tuucp 225 226######################### 227# Format of headers # 228######################### 229 230H?P?Return-Path: $g 231HReceived: $?sfrom $s $.$?_($_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b 232H?D?Resent-Date: $a 233H?D?Date: $a 234H?F?Resent-From: $q 235H?F?From: $q 236H?x?Full-Name: $x 237HSubject: 238# HPosted-Date: $a 239# H?l?Received-Date: $b 240H?M?Resent-Message-Id: <$t.$i@$j> 241H?M?Message-Id: <$t.$i@$j> 242# 243###################################################################### 244###################################################################### 245##### 246##### REWRITING RULES 247##### 248###################################################################### 249###################################################################### 250 251########################################### 252### Rulset 3 -- Name Canonicalization ### 253########################################### 254S3 255 256# handle null input and list syntax (translate to <@> special case) 257R$@ $@ <@> 258R$*:;$* $@ $1 :; <@> 259 260# basic textual canonicalization -- note RFC733 heuristic here 261R$*<$*>$*<$*>$* $2$3<$4>$5 strip multiple <> <> 262R$*<$*<$+>$*>$* <$3>$5 2-level <> nesting 263R$*<>$* $@ <@> MAIL FROM:<> case 264R$*<$+>$* $2 basic RFC821/822 parsing 265 266ifdef(`_NO_CANONIFY_', `dnl', 267`# eliminate local host if present 268R@ $=w $=: $+ $@ @ $M $2 $3 @thishost ... 269R@ $+ $@ @ $1 @somewhere ... 270 271R$+ @ $=w $@ $1 @ $M ...@thishost 272R$+ @ $+ $@ $1 @ $2 ...@somewhere 273 274R$=w ! $+ $@ $2 @ $M thishost!... 275R$+ ! $+ $@ $1 ! $2 @ $M somewhere ! ... 276 277R$+ % $=w $@ $1 @ $M ...%thishost 278R$+ % $+ $@ $1 @ $2 ...%somewhere 279 280R$+ $@ $1 @ $M unadorned user') 281 282 283###################################### 284### Ruleset 0 -- Parse Address ### 285###################################### 286 287S0 288 289R$*:;<@> $#error $@ USAGE $: "list:; syntax illegal for recipient addresses" 290 291# pass everything else to a relay host 292R$* $#_RELAY_ $@ $H $: $1 293 294# 295###################################################################### 296###################################################################### 297##### 298`##### MAILER DEFINITIONS' 299##### 300###################################################################### 301###################################################################### 302undivert(7)dnl 303