3 # Copyright (c) 1983 Eric P. Allman
6 # Copyright (c) 1983 Regents of the University of California.
7 # All rights reserved. The Berkeley software License Agreement
8 # specifies the terms and conditions for redistribution.
10 # @(#)uucpproto.mc 1.2 (Berkeley) 1/24/89
11 # @(#)proto.mc 1.20 (Berkeley) 1/25/89
13 # built by phil on Wed Jan 25 11:48:03 PST 1989
14 # in /usr/src/local/nettables/sendmail.cf/cf on monet.Berkeley.EDU
16 ############################################################
17 ############################################################
19 ##### SENDMAIL CONFIGURATION FILE
21 ############################################################
22 ############################################################
29 # file containing our internet aliases
30 Fw/usr/lib/sendmail.cw
33 DUYOUR_UUCP_HOSTNAME_HERE
34 CUYOUR_UUCP_ALIASES_HERE
36 # local UUCP connections
44 #############################
45 ### Setup Information ###
46 #############################
49 ######################
51 ######################
64 # my official hostname
73 # Internal ("fake") domains that we use in rewriting
79 ######################
81 ######################
86 ######################
88 ######################
94 # delimiter (operator) characters
96 # format of a total name
99 De$j Sendmail $v/$Z ready at $b
105 # location of alias file
107 # wait up to ten minutes for alias file rebuild
109 # substitution for space (blank) characters
111 # (don't) connect to "expensive" mailers
113 # default delivery mode (deliver in background)
115 # temporary file mode
119 # location of help file
120 OH/usr/lib/sendmail.hf
123 # default network name
125 # default messages to old style
129 # read timeout -- violates protocols
132 OS/usr/lib/sendmail.st
133 # queue up everything before starting transmission
135 # default timeout interval
137 # time zone names (V6 only)
143 # load average at which we just queue messages
145 # load average at which we refuse connections
148 ###########################
149 # Message precedences #
150 ###########################
153 Pspecial-delivery=100
157 #####################
159 #####################
165 #########################
166 # Format of headers #
167 #########################
169 H?P?Return-Path: <$g>
170 HReceived: $?sfrom $s $.by $j ($v/$Z)
179 # H?l?Received-Date: $b
180 H?M?Resent-Message-Id: <$t.$i@$j>
181 H?M?Message-Id: <$t.$i@$j>
185 ###########################
186 ### Rewriting Rules ###
187 ###########################
190 ################################
191 # Sender Field Pre-rewriting #
192 ################################
194 #R$*<$*>$* $1$2$3 defocus
196 ###################################
197 # Recipient Field Pre-rewriting #
198 ###################################
200 #R$*<$*>$* $1$2$3 defocus
204 #################################
205 # Final Output Post-rewriting #
206 #################################
209 R@ $@ handle <> error addr
211 # resolve numeric addresses to name if possible
212 R$*<@[$+]>$* $:$1<@$[[$2]$]>$3 lookup numeric internet addr
214 # externalize local domain info
215 R$*<$+>$* $1$2$3 defocus
216 R@$+:@$+:$+ @$1,@$2:$3 <route-addr> canonical
218 # UUCP must always be presented in old form
219 R$+@$-.UUCP $2!$1 u@h.UUCP => h!u
221 # delete duplicate local names
222 R$+%$=w@$=w $1@$w u%host@host => u@host
223 R$+%$=w@$=w.$D $1@$w u%host@host => u@host
226 ###########################
227 # Name Canonicalization #
228 ###########################
231 # handle "from:<>" special case
232 R$*<>$* $@@ turn into magic token
234 # basic textual canonicalization -- note RFC733 heuristic here
235 R$*<$*<$*<$+>$*>$*>$* $4 3-level <> nesting
236 R$*<$*<$+>$*>$* $3 2-level <> nesting
237 R$*<$+>$* $2 basic RFC821/822 parsing
239 # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
240 R@$+,$+ @$1:$2 change all "," to ":"
242 # localize and dispose of route-based addresses
243 R@$+:$+ $@$>6<@$1>:$2 handle <route-addr>
245 # more miscellaneous cleanup
246 R$+ $:$>8$1 host dependent cleanup
247 R$+:$*;@$+ $@$1:$2;@$3 list syntax
248 R$+:$*; $@$1:$2; list syntax
249 R$+@$+ $:$1<@$2> focus on domain
250 R$+<$+@$+> $1$2<@$3> move gaze right
251 R$+<@$+> $@$>6$1<@$2> already canonical
253 # convert old-style addresses to a domain-based address
254 R$+^$+ $1!$2 convert ^ to !
255 R$-!$+ $@$>6$2<@$1.UUCP> resolve uucp names
256 R$+.$-!$+ $@$>6$3<@$1.$2> domain uucps
257 R$+!$+ $@$>6$2<@$1.UUCP> uucp subdomains
258 R$+%$+ $:$>9$1%$2 user%host
259 R$+<@$+> $@$>6$1<@$2> already canonical
260 R$-.$+ $@$>6$2<@$1> host.user
263 #################################
264 # special local conversions #
265 #################################
268 R$*<@$=w>$* $:$1<@$w>$3 get into u@$w form
269 R$*<@$=w.$D>$* $:$1<@$w>$3
270 R$*<@$=U.UUCP>$* $:$1<@$w>$3
272 ################################
273 # Change rightmost % to @. #
274 ################################
277 R$*%$* $1@$2 First make them all @'s.
278 R$*@$*@$* $1%$2@$3 Undo all but the last.
279 R$*@$* $@$1<@$2> Put back the brackets.
288 ############################################################
289 ############################################################
291 ##### Local and Program Mailer specification
293 ############################################################
294 ############################################################
296 Mlocal, P=/bin/mail, F=rlsDFMmn, S=10, R=20, A=mail -d $u
297 Mprog, P=/bin/sh, F=lsDFMe, S=10, R=20, A=sh -c $u
300 R@ $n errors to mailer-daemon
304 ############################################################
305 ############################################################
307 ##### Internet SMTP Mailer specification
309 ##### Messages processed by this specification are assumed to leave
310 ##### the local domain -- hence, they must be canonical according to
311 ##### RFC822 etc. This means that machines not registered with
312 ##### the NIC must be hidden behind our Internet relay.
314 ############################################################
315 ############################################################
317 Mtcp, P=[IPC], F=mDFMueXLC, S=14, R=24, A=IPC $h, E=\r\n
321 # pass <route-addr>'s through
322 R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
324 # map colons to dots everywhere
325 R$*:$* $1.$2 map colons to dots
327 # output local host in user@host.domain syntax
328 R$- $1<@$w> user w/o host
329 R$+<@$=w> $:$1<@$w> this host
330 R$+<@$-> $:$1<@$[$2$]> canonicalize into dom
331 R$+<@$-> $:$1<@$2.$D> if nameserver fails
332 R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok
333 R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway
335 # if not local, and not a "fake" domain, ask the nameserver
336 R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
337 R$+<@[$+]> $@$1<@[$2]> already ok
339 # output internal ("fake") domains as "user%host@relay"
343 R$+<@$+.UUCP> $@$2!$1<@$w> user@host.UUCP
349 R$*<$*>$* $1$2$3 defocus
350 R$* $:$>3$1 now canonical form
352 # pass <route-addr>'s through
353 R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
355 # map colons to dots everywhere.....
356 R$*:$* $1.$2 map colons to dots
358 # output local host in user@host.domain syntax
359 R$- $1<@$w> user w/o host
360 R$+<@$=w> $:$1<@$w> this host
361 R$+<@$-> $:$1<@$[$2$]> canonicalize into dom
362 R$+<@$-> $:$1<@$2.$D> if nameserver fails
363 R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok
364 R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway
366 # if not local, and not a "fake" domain, ask the nameserver
367 R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
368 R$+<@[$+]> $@$1<@[$2]> already ok
370 # Hide fake domains behind relays
374 R$+<@$+.UUCP> $@$2!$1 user@host.UUCP
378 ############################################################
379 ############################################################
381 ##### UUCP Mailer specification
383 ############################################################
384 ############################################################
387 Muucp, P=/usr/bin/uux, F=DFMhuU, S=13, R=23, M=100000,
388 A=uux - -r -z -a$f -gC $h!rmail ($u)
391 R$+ $:$>5$1 convert to old style
392 R$*<@$=w>$* $1<@$w>$2 resolve abbreviations
393 R$*<@$->$* $1<@$2.$D>$3 resolve abbreviations
394 R$+<@$+> $2!$1 uucpize (no @'s in addr)
395 R$w!$+ $1 strip local name
396 R$+ $:$U!$1 stick on our host name
397 R$=U!$-%$- $:$1!$2@$3.$D ucbvax!user@host.domain
400 R$+ $:$>5$1 convert to old style
401 R$*<@$=w>$* $1<@$w>$2 resolve abbreviations
402 R$*<@$->$* $1<@$2.$D>$3 resolve abbreviations
403 R$+<@$w> $U!$1 a!b@here -> here!a!b
404 R$=U!$+ $2 here!a!b -> a!b
405 # sanity ... should not happen.
406 R$=U.$D!$+ $2 strip local name.domain
409 ############################################################
410 ############################################################
412 ##### Provide Backward Compatibility
414 ############################################################
415 ############################################################
417 #####################################################
418 # General code to convert back to old style names #
419 #####################################################
422 R$+<@$w> $1 strip host
423 R$+<@$-.UUCP> $2!$1 u@host.UUCP => host!u
427 #####################
429 #####################
432 ############################################################
433 ############################################################
435 ##### RULESET ZERO PREAMBLE
437 ##### The beginning of ruleset zero is constant through all
438 ##### configurations.
440 ############################################################
441 ############################################################
445 # first make canonical
446 R$*<$*>$* $1$2$3 defocus
447 R$+ $:$>3$1 make canonical
449 # handle special cases
450 R$*<@[$+]>$* $:$1<@$[[$2]$]>$3 numeric internet addr
451 R$*<@[$+]>$* $#tcp$@[$2]$:$1@[$2]$3 numeric internet spec
454 R@ $#error$:Invalid address handle <> form
456 # canonicalize using the nameserver if not internal domain
457 R$*<@$*.$~I>$* $:$1<@$[$2.$3$]>$4
458 R$*<@$->$* $:$1<@$[$2$]>$3
459 R$*<@$->$* $:$1<@$2.$D>$3 if nameserver fails
461 # now delete the local info
462 R<@$w>:$* $@$>0$1 @here:... -> ...
463 R$*<@$w> $@$>0$1 ...@here -> ...
465 ##################################
466 # End of ruleset zero preamble #
467 ##################################
470 ###############################################
471 ### Machine dependent part of Rule Zero ###
472 ###############################################
476 # resolve local UUCP connections
477 R<@$=V.UUCP>:$+ $#uucp$@$1$:$2 @host.UUCP:...
478 R$+<@$=V.UUCP> $#uucp$@$2$:$1 user@host.UUCP
483 # remaining names must be local
484 R$+ $#local$:$1 everything else