| 1 | # |
| 2 | # Sendmail |
| 3 | # Copyright (c) 1983 Eric P. Allman |
| 4 | # Berkeley, California |
| 5 | # |
| 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. |
| 9 | # |
| 10 | # @(#)monet.mc 5.1 (Berkeley) 6/10/85 |
| 11 | # |
| 12 | ############################################################ |
| 13 | ############################################################ |
| 14 | ##### |
| 15 | ##### SENDMAIL CONFIGURATION FILE |
| 16 | ##### |
| 17 | ############################################################ |
| 18 | ############################################################ |
| 19 | |
| 20 | |
| 21 | |
| 22 | ############################################################ |
| 23 | ### local info |
| 24 | ############################################################ |
| 25 | |
| 26 | # internet hostname |
| 27 | Cwucbmonet monet |
| 28 | |
| 29 | |
| 30 | ################################################# |
| 31 | # |
| 32 | # General configuration information |
| 33 | # |
| 34 | ################################################# |
| 35 | |
| 36 | ###################### |
| 37 | # General Macros # |
| 38 | ###################### |
| 39 | |
| 40 | # our arpanet gateway |
| 41 | DABerkeley.EDU |
| 42 | CABerkeley UCB ucbc70 c70 UCB-C70 u UCB-VAX ucbvax |
| 43 | |
| 44 | # local domain names |
| 45 | DDBERKELEY.EDU |
| 46 | CDBERKELEY UCB ucbc70 c70 ucb-c70 u UCB-VAX ucbvax |
| 47 | |
| 48 | # major relay host |
| 49 | DRUCBVAX |
| 50 | CRucbvax vax k |
| 51 | |
| 52 | # my official hostname |
| 53 | Dj$w |
| 54 | |
| 55 | # known SMTP/ethernet hosts (this domain only) -- only $R need be complete |
| 56 | |
| 57 | CSucbarmstrong armstrong |
| 58 | CSucbarpa arpa |
| 59 | CSucbbach bach ucbstatvax statvax |
| 60 | CSucbbass bass |
| 61 | CSucbbell bell |
| 62 | CSucbbizet bizet |
| 63 | CSucbbob bob |
| 64 | CSucbbrahms brahms mathstat |
| 65 | CSucbbud bud |
| 66 | CSucbbuddy buddy |
| 67 | CSucbcad cad cad-a |
| 68 | CSucbcalder calder |
| 69 | CSucbcartan cartan |
| 70 | CSucbchip chip |
| 71 | CSucbcogsci cogsci |
| 72 | CSucbcorona corona |
| 73 | CSucbcory cory |
| 74 | CSucbdab dab |
| 75 | CSucbdali dali |
| 76 | CSucbdavinci davinci |
| 77 | CSucbdavis davis |
| 78 | CSucbdean dean |
| 79 | CSucbdeforest deforest |
| 80 | CSucbdegas degas |
| 81 | CSucbdim dim |
| 82 | CSucbdorothy dorothy |
| 83 | CSucbear ear |
| 84 | CSucbeast east beast |
| 85 | CSucbedison edison |
| 86 | CSucbernie ernie |
| 87 | CSucbesvax esvax |
| 88 | CSucbeuler euler |
| 89 | CSucbfranklin franklin |
| 90 | CSucbfranny franny |
| 91 | CSucbheine heine |
| 92 | CSucbholden holden |
| 93 | CSucbhuffman huffman |
| 94 | CSucbic ic ucbic-ec ic-ec cad-b cad-ic |
| 95 | CSucbicw icw ucbicw-ec icw-ec cad-c cad-icw |
| 96 | CSucbimage |
| 97 | CSucbingres ingres |
| 98 | CSucbjan jan |
| 99 | CSucbjason jason |
| 100 | CSucbji ji |
| 101 | CSucbjoule joule |
| 102 | CSucbkepler kepler |
| 103 | CSucbkim kim |
| 104 | CSucbmarconi marconi |
| 105 | CSucbmatisse matisse |
| 106 | CSucbmaxwell maxwell |
| 107 | CSucbmedea medea |
| 108 | CSucbmerlin merlin |
| 109 | CSucbmike mike |
| 110 | CSucbmiro miro |
| 111 | CSucbmolson molson |
| 112 | CSucbmonet monet |
| 113 | CSucbmote mote |
| 114 | CSucbnewton newton |
| 115 | CSucbnyquist nyquist |
| 116 | CSucbokeeffe okeeffe |
| 117 | CSucboz oz |
| 118 | CSucbrenoir renoir |
| 119 | CSucbrob rob |
| 120 | CSucbrobert robert |
| 121 | CSucbseymour seymour |
| 122 | CSucbshadow shadow |
| 123 | CSucbshannon shannon |
| 124 | CSucbsilvia silvia |
| 125 | CSucbtuborg tuborg |
| 126 | CSucbugs bugs ucbbugs ugs |
| 127 | CSucbvangogh vangogh |
| 128 | CSucbvax |
| 129 | CSucbweyl weyl |
| 130 | CSucbzeus zeus |
| 131 | CSucbzooey zooey |
| 132 | CSucbzworykin zworykin |
| 133 | |
| 134 | # known top-level domains |
| 135 | CTLOCAL ARPA EDU GOV COM MIL |
| 136 | CTUUCP BITNET CSNET DEC |
| 137 | |
| 138 | |
| 139 | ############################################################ |
| 140 | # |
| 141 | # General configuration information |
| 142 | # |
| 143 | # This information is basically just "boiler-plate"; it must be |
| 144 | # there, but is essentially constant. |
| 145 | # |
| 146 | # Information in this file should be independent of location -- |
| 147 | # i.e., although there are some policy decisions made, they are |
| 148 | # not specific to Berkeley per se. |
| 149 | # |
| 150 | ############################################################ |
| 151 | |
| 152 | |
| 153 | ###################### |
| 154 | # Version Number # |
| 155 | ###################### |
| 156 | |
| 157 | DZ5.17 |
| 158 | |
| 159 | |
| 160 | ########################## |
| 161 | ### Special macros ### |
| 162 | ########################## |
| 163 | |
| 164 | # my name |
| 165 | DnMAILER-DAEMON |
| 166 | # UNIX header format |
| 167 | DlFrom $g $d |
| 168 | # delimiter (operator) characters |
| 169 | Do.:%@!^=/[] |
| 170 | # format of a total name |
| 171 | Dq$g$?x ($x)$. |
| 172 | # SMTP login message |
| 173 | De$j Sendmail $v/$Z ready at $b |
| 174 | |
| 175 | # forwarding host -- redefine this if you can't talk to the relay directly |
| 176 | DF$R |
| 177 | |
| 178 | ################### |
| 179 | ### Options ### |
| 180 | ################### |
| 181 | |
| 182 | # location of alias file |
| 183 | OA/usr/lib/aliases |
| 184 | # wait up to ten minutes for alias file rebuild |
| 185 | Oa10 |
| 186 | # substitution for space (blank) characters |
| 187 | OB. |
| 188 | # (don't) connect to "expensive" mailers |
| 189 | #Oc |
| 190 | # default delivery mode (deliver in background) |
| 191 | Odbackground |
| 192 | # temporary file mode |
| 193 | OF0600 |
| 194 | # default GID |
| 195 | Og1 |
| 196 | # location of help file |
| 197 | OH/usr/lib/sendmail.hf |
| 198 | # log level |
| 199 | OL9 |
| 200 | # default network name |
| 201 | ONARPA |
| 202 | # default messages to old style |
| 203 | Oo |
| 204 | # queue directory |
| 205 | OQ/usr/spool/mqueue |
| 206 | # read timeout -- violates protocols |
| 207 | Or2h |
| 208 | # status file |
| 209 | OS/usr/lib/sendmail.st |
| 210 | # queue up everything before starting transmission |
| 211 | Os |
| 212 | # default timeout interval |
| 213 | OT3d |
| 214 | # time zone names (V6 only) |
| 215 | OtPST,PDT |
| 216 | # default UID |
| 217 | Ou1 |
| 218 | # wizard's password |
| 219 | OW* |
| 220 | # load average at which we just queue messages |
| 221 | Ox8 |
| 222 | # load average at which we refuse connections |
| 223 | OX12 |
| 224 | |
| 225 | ############################### |
| 226 | ### Message precedences ### |
| 227 | ############################### |
| 228 | |
| 229 | Pfirst-class=0 |
| 230 | Pspecial-delivery=100 |
| 231 | Pbulk=-60 |
| 232 | Pjunk=-100 |
| 233 | |
| 234 | ######################### |
| 235 | ### Trusted users ### |
| 236 | ######################### |
| 237 | |
| 238 | Troot |
| 239 | Tdaemon |
| 240 | Tuucp |
| 241 | Teric |
| 242 | Tnetwork |
| 243 | |
| 244 | ############################# |
| 245 | ### Format of headers ### |
| 246 | ############################# |
| 247 | |
| 248 | H?P?Return-Path: <$g> |
| 249 | HReceived: $?sfrom $s $.by $j ($v/$Z) |
| 250 | id $i; $b |
| 251 | H?D?Resent-Date: $a |
| 252 | H?D?Date: $a |
| 253 | H?F?Resent-From: $q |
| 254 | H?F?From: $q |
| 255 | H?x?Full-Name: $x |
| 256 | HSubject: |
| 257 | # HPosted-Date: $a |
| 258 | # H?l?Received-Date: $b |
| 259 | H?M?Resent-Message-Id: <$t.$i@$j> |
| 260 | H?M?Message-Id: <$t.$i@$j> |
| 261 | |
| 262 | ########################### |
| 263 | ### Rewriting rules ### |
| 264 | ########################### |
| 265 | |
| 266 | |
| 267 | ################################ |
| 268 | # Sender Field Pre-rewriting # |
| 269 | ################################ |
| 270 | S1 |
| 271 | #R$*<$*>$* $1$2$3 defocus |
| 272 | |
| 273 | ################################### |
| 274 | # Recipient Field Pre-rewriting # |
| 275 | ################################### |
| 276 | S2 |
| 277 | #R$*<$*>$* $1$2$3 defocus |
| 278 | |
| 279 | ################################# |
| 280 | # Final Output Post-rewriting # |
| 281 | ################################# |
| 282 | S4 |
| 283 | |
| 284 | R@ $@ handle <> error addr |
| 285 | |
| 286 | # externalize local domain info |
| 287 | R$*<$*LOCAL>$* $1<$2$D>$3 change local info |
| 288 | R$*<$*LOCAL.ARPA>$* $1<$2$D>$3 change local info |
| 289 | R$*<$*.CC>$* $1$2$3 strip .CC |
| 290 | R$*<$+>$* $1$2$3 defocus |
| 291 | R@$+:@$+:$+ @$1,@$2:$3 <route-addr> canonical |
| 292 | |
| 293 | # UUCP must always be presented in old form |
| 294 | R$+@$-.UUCP $2!$1 u@h.UUCP => h!u |
| 295 | |
| 296 | # delete duplicate local names -- mostly for arpaproto.mc |
| 297 | R$+%$=w@$=w $1@$3 u%UCB@UCB => u@UCB |
| 298 | R$+%$=w@$=w.ARPA $1@$3.ARPA u%UCB@UCB => u@UCB |
| 299 | |
| 300 | ########################### |
| 301 | # Name Canonicalization # |
| 302 | ########################### |
| 303 | S3 |
| 304 | |
| 305 | # handle "from:<>" special case |
| 306 | R<> $@@ turn into magic token |
| 307 | |
| 308 | # basic textual canonicalization -- note RFC733 heuristic here |
| 309 | R$*<$*<$*<$+>$*>$*>$* $4 3-level <> nesting |
| 310 | R$*<$*<$+>$*>$* $3 2-level <> nesting |
| 311 | R$*<$+>$* $2 basic RFC821/822 parsing |
| 312 | R$+ at $+ $1@$2 "at" -> "@" for RFC 822 |
| 313 | |
| 314 | # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later |
| 315 | R@$+,$+ @$1:$2 change all "," to ":" |
| 316 | |
| 317 | # localize and dispose of route-based addresses |
| 318 | R@$+:$+ $@$>6<@$1>:$2 handle <route-addr> |
| 319 | |
| 320 | # more miscellaneous cleanup |
| 321 | R$+ $:$>8$1 host dependent cleanup |
| 322 | R$+:$*;@$+ $@$1:$2;@$3 list syntax |
| 323 | R$+:$*; $@$1:$2; list syntax |
| 324 | R$+@$+ $:$1<@$2> focus on domain |
| 325 | R$+<$+@$+> $1$2<@$3> move gaze right |
| 326 | R$+<@$+> $@$>6$1<@$2> already canonical |
| 327 | |
| 328 | # convert old-style addresses to a domain-based address |
| 329 | R$-:$+ $@$>6$2<@$1> host:user |
| 330 | R$+^$+ $1!$2 convert ^ to ! |
| 331 | R$-.$+!$+ $@$>6$3<@$1.$2> host.domain!user |
| 332 | R$-!$+ $@$>6$2<@$1.UUCP> host!user (uucp) |
| 333 | R$+%$+ $@$>6$1<@$2> user%host |
| 334 | R$-=$+ $@$>6$2<@$1.BITNET> host=user (bitnet) |
| 335 | R$-.$+ $@$>6$2<@$1> host.user |
| 336 | |
| 337 | # always include local and tcp mailers (tcp for [w.x.y.z]-style addrs) |
| 338 | |
| 339 | ############################################################ |
| 340 | ############################################################ |
| 341 | ##### |
| 342 | ##### Local and Program Mailer specification |
| 343 | ##### |
| 344 | ############################################################ |
| 345 | ############################################################ |
| 346 | |
| 347 | Mlocal, P=/bin/mail, F=rlsDFMmn, S=10, R=20, A=mail -d $u |
| 348 | Mprog, P=/bin/sh, F=lsDFMe, S=10, R=20, A=sh -c $u |
| 349 | |
| 350 | S10 |
| 351 | R@ $n errors to mailer-daemon |
| 352 | |
| 353 | |
| 354 | ############################################################ |
| 355 | ############################################################ |
| 356 | ##### |
| 357 | ##### Arpanet TCP Mailer specification |
| 358 | ##### |
| 359 | ##### Messages processed by this specification are assumed to leave |
| 360 | ##### the local domain -- hence, they must be canonical according to |
| 361 | ##### RFC822 etc. |
| 362 | ##### |
| 363 | ############################################################ |
| 364 | ############################################################ |
| 365 | |
| 366 | Mtcp, P=[IPC], F=mDFMueXL, S=14, R=14, A=IPC $h, E=\r\n |
| 367 | |
| 368 | S14 |
| 369 | |
| 370 | # pass <route-addr>'s through |
| 371 | R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr> |
| 372 | |
| 373 | # map colons to dots everywhere..... |
| 374 | R$*:$* $1.$2 map colons to dots |
| 375 | |
| 376 | # handle the simple case.... |
| 377 | R$+<@$-.ARPA> $@$1<@$[$2.ARPA$]> user@host.ARPA |
| 378 | |
| 379 | # output local hosts in user@host.Berkeley.EDU syntax |
| 380 | R$+<@LOCAL> $@$1<@$w.$A> local names |
| 381 | R$+<@$+.LOCAL> $@$1<@$2.$A> local hosts |
| 382 | R$+<@$*$=S> $@$1<@$2$3.$A> |
| 383 | R$+<@$*$=Z> $@$1<@$2$3.$A> |
| 384 | R$+<@$+.BITNET> $@$1%$2.BITNET<@$w.$A> user@host.BITNET |
| 385 | R$+<@$+.CSNET> $@$1%$2.CSNET<@CSNET-RELAY.ARPA> user@host.CSNET |
| 386 | R$+<@$+.DEC> $@$1%$2.DEC<@decwrl.ARPA> user@host.DEC |
| 387 | R$+<@$+.UUCP> $@$2!$1<@$w.$A> user@host.UUCP |
| 388 | |
| 389 | # handle other external cases |
| 390 | R$+<@$-> $@$1<@$[$2$]> no .ARPA on simple names |
| 391 | #R$+<@$+.$-.ARPA> $@$1%$2<@$[$3.ARPA$]> approximate something |
| 392 | R$+<@[$+]> $@$1<@[$2]> already ok |
| 393 | R$+<@$+> $@$1<@$[$2$]> set for named |
| 394 | |
| 395 | # convert remaining addresses to old format and externalize appropriately |
| 396 | R$+ $:$>5$1 => old format |
| 397 | R$-:$+ $@$2<@$1.$A> convert berk hosts |
| 398 | #R$+<@$+> $@$1<@$2@$A> pessmize |
| 399 | R$+ $:$1<@$w.$A> tack on our hostname |
| 400 | R$+%$=R<@$=A> $1<@$[$3$]> strip unneeded relay |
| 401 | |
| 402 | |
| 403 | |
| 404 | ####################### |
| 405 | # Rewriting rules # |
| 406 | ####################### |
| 407 | |
| 408 | ##### special local conversions |
| 409 | S6 |
| 410 | R$*<@$*$=D>$* $1<@$2LOCAL>$4 convert local domain |
| 411 | R$*<@$*$=D.ARPA>$* $1<@$2LOCAL>$4 |
| 412 | R$*<@$*$=D.EDU>$* $1<@$2LOCAL>$4 |
| 413 | R$+%$+<@LOCAL> $>9$1%$2 Hack for % syntax. |
| 414 | R$*<@$+.$=T.$=T>$* $1<@$2.$3>$5 make UUCP top level |
| 415 | R$*<@$*$=C.$=T>$* $1<@$2$3>$5 adjust CC hosts (ucbvax) |
| 416 | R$*<@$*$=C>$* $1<@$2$3.CC>$4 tack on .CC temporarily |
| 417 | R$*<@$*$=S.UUCP>$* $1<@$2$3.LOCAL>$4 trap u@etherhost.UUCP |
| 418 | R$*<@ucsfcgl.UUCP>$* $1<@ucsf-cgl.ARPA>$2 ucsfcgl now on Internet |
| 419 | |
| 420 | ################################ |
| 421 | # Change rightmost % to @. |
| 422 | S9 |
| 423 | R$*%$* $1@$2 First make them all @'s |
| 424 | R$*@$*@$* $1%$2@$3 Undo all but the last. |
| 425 | R$*@$* $@$1<@$2> Put back the brackets. |
| 426 | # |
| 427 | ############################### |
| 428 | |
| 429 | |
| 430 | ############################################################ |
| 431 | ############################################################ |
| 432 | ##### |
| 433 | ##### Ethernet Mailer specification |
| 434 | ##### |
| 435 | ##### Messages processed by this configuration are assumed to remain |
| 436 | ##### in the same domain. Hence, they may not necessarily correspond |
| 437 | ##### to RFC822 in all details. |
| 438 | ##### |
| 439 | ############################################################ |
| 440 | ############################################################ |
| 441 | |
| 442 | Mether, P=[IPC], F=mDFMueCX, S=11, R=21, A=IPC $h |
| 443 | |
| 444 | S11 |
| 445 | R$*<@$+>$* $@$1<@$2>$3 already ok |
| 446 | R$+ $@$1<@$w> tack on our hostname |
| 447 | |
| 448 | S21 |
| 449 | |
| 450 | |
| 451 | |
| 452 | ############################################################ |
| 453 | ############################################################ |
| 454 | ##### |
| 455 | ##### BASIC ETHERNET RULES |
| 456 | ##### |
| 457 | ############################################################ |
| 458 | ############################################################ |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | ############################################################ |
| 464 | ############################################################ |
| 465 | ##### |
| 466 | ##### RULESET ZERO PREAMBLE |
| 467 | ##### |
| 468 | ##### The beginning of ruleset zero is constant through all |
| 469 | ##### configurations. |
| 470 | ##### |
| 471 | ############################################################ |
| 472 | ############################################################ |
| 473 | |
| 474 | S0 |
| 475 | |
| 476 | # first make canonical |
| 477 | R$*<$*>$* $1$2$3 defocus |
| 478 | R$+ $:$>3$1 make canonical |
| 479 | |
| 480 | # handle special cases..... |
| 481 | R@ $#local$:$n handle <> form |
| 482 | R$*<@[$+]>$* $#tcp$@[$2]$:$1@[$2]$3 numeric internet spec |
| 483 | |
| 484 | # arrange for local names to be fully qualified |
| 485 | R$*<$*$=S>$* $1<$2$3.LOCAL>$4 user@etherhost |
| 486 | R$*<$*$=Z>$* $1<$2$3.LOCAL>$4 user@berkhost |
| 487 | R$*<$+.ARPA.LOCAL>$* $1<$2.ARPA>$3 because ARPA is a host |
| 488 | |
| 489 | # now delete the local info |
| 490 | R$*<$*$=w.$=T>$* $1<$2>$5 thishost.LOCAL |
| 491 | R$*<$*$=w>$* $1<$2>$4 thishost |
| 492 | R$*<$*.>$* $1<$2>$3 drop trailing dot |
| 493 | R<@>:$* $@$>0$1 retry after route strip |
| 494 | R$*<@> $@$>0$1 strip null trash & retry |
| 495 | |
| 496 | # forward around hosts with communication problems |
| 497 | R$*<@$=F.LOCAL>$* $#ether$@$F$:$1<@$2.LOCAL>$3 reroute message |
| 498 | |
| 499 | ################################## |
| 500 | # End of ruleset zero preamble # |
| 501 | ################################## |
| 502 | |
| 503 | |
| 504 | ################################################ |
| 505 | ### Machine dependent part of ruleset zero ### |
| 506 | ################################################ |
| 507 | |
| 508 | # resolve names that can go via the ethernet |
| 509 | R$*<@$*$=S.LOCAL>$* $#ether$@$3$:$1<@$2$3>$4 user@etherhost |
| 510 | |
| 511 | # other non-local names will be kicked upstairs |
| 512 | R$*<@$+>$* $#ether$@$F$:$1<@$2>$3 user@some.where |
| 513 | |
| 514 | # remaining names must be local |
| 515 | R$+ $#local$:$1 everything else |
| 516 | |