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