Path: utzoo!attcan!uunet!snorkelwacker!mit-eddie!bbn.com!papaya.bbn.com!rsalz From: rsalz@bbn.com (Rich Salz) Newsgroups: comp.mail.sendmail Subject: Re: Help with remote-mounted spool directory Message-ID: <2872@litchi.bbn.com> Date: 28 Sep 90 18:07:18 GMT References: <9566@ur-cc.UUCP> Organization: BBN Systems and Technology, Inc. Lines: 185 >forwarding on to a central mailhost. Now, for this new setup, I'm going to >want all local delivery to be done by the server... ### ### SENDMAIL CONFIGURATION FILE ### This is the sendmail.cf for a client who can make a TCP connection to ### a mail relay. No local mail happens here. Sendmail is not run in ### daemon mode, either, just hourly out of cron to pick up anything ### left when the server is not reachable. ### ## HOSTNAME MACROS AND CLASSES ## The name of our corporate domain. DCbbn.com ## The official name of this host (from gethostname(2)). Dj$w ## The relay host where everything gets forwarded to. DRpineapple.bbn.com ## GENERAL CONFIGURATION INFORMATION ## Stuff here is required and reflects some policy decisions. ## SMTP login message. De$j Sendmail $v/$V ready at $b; how did you get here? ## Format of the UNIX from line -- essentially a constant. DlFrom $g $d ## Name to use for returned mail -- essentially a constant. DnMAILER-DAEMON ## Token delimeters -- word separators in the rewrite rules below. Do.:%@![] ## Format of a sender's address; use full name. Dq$x <$g> ## Version of this .cf file. DVrsalz-13-nov-89 ## Location of the alias file. OA/usr/lib/aliases ## Default delivery mode (one of background, foreground, queue). Odbackground ## Permissions for any temporary files we create. OF0644 ## Default group id for mailers to run under. Og1 ## Location of the SMTP help file. OH/dev/null ## Logging level. OL9 ## Send to sender if an alias expansion includes her (a/k/a "me too")? OmT ## Allow headers to be in old style (i.e., spaces delimit names)? OoT ## Where to send important error messages. OPpostmaster ## Location of the queue directory. OQ/usr/spool/mqueue ## Give up on connections after this long a time period. Or2h ## Queue up everything before starting transmission? OsT ## How long message can sit in queue before it's bounced back? OT3d ## Default user id for mailers to run under. Ou1 ## Password to enter wizard/debug mode. OW* ## Message precedences. Pfirst-class=0 Pspecial-delivery=100 Pbulk=-50 Pjunk=-100 ## Trusted users -- these people can fake headers. Troot ## Format of headers. HReceived: $?sfrom $s $.by $j id <$i@$j>; $b HDate: $a HFrom: $q HMessage-Id: <$t.$i@$j> HDResent-Date: $a HFResent-From: $q HMResent-Message-Id: <$t.$i@$j> ## REWRITING RULES ## ## These are the rules used for the following fields: ## From 3 -> 1 -> 4 -> 3 -> 1 -> S -> 4 ## To 3 -> 0 -> 4 ## From: 3 -> 1 -> 5 -> 4 ## To: 3 -> 2 -> R -> 4 ## where S and R stand for the mailer-specific rewrite rules named in ## the mailer definition. ## ## RULESET 0 -- Pick a mailer. S0 R$*<$*>$* $1$2$3 defocus R$+ $:$>3$1 make canonical R$*<@[$+]>$* $#relay$@[$2]$:$1@[$2]$3 numeric internet spec R$*<$*.>$* $1<$2>$3 drop trailing dot R<@>:$* $@$>0$1 retry after route strip R$*<@> $@$>0$1 strip null trash & retry ## Machine dependent part of ruleset 0. ## Here is where we actually find a mailer to invoke. R$* $#relay$@$R$:$1 forward everything ## ## RULESET 1 -- From and From: fields. S1 ## ## RULESET 2 -- To: field. S2 ## ## RULESET 3 -- Basic name canonicalization. S3 # Handle the SMTP "from:<>" as a special case. R<> $@@ turn into magic token # Basic textual canonicalization. R$*<$+>$* $2 basic RFC821/822 parsing R$*<$*>$* $1$2$3 in case recursive # Make sure <@a,@b,@c:u@d> syntax is easy to parse -- undone later. R@$+,$+ @$1:$2 change all "," to ":" # Localize and dispose of domain-based addresses. R@$+:$+ $@$>6<@$1>:$2 handle R$+:$*;@$+ $@$1:$2;@$3 list syntax R$+@$+ $:$1<@$2> focus on domain R$+<$+@$+> $1$2<@$3> move gaze right R$+<@$+> $@$>6$1<@$2> already canonical # Convert old-style addresses to a domain-based address. R$+%$+ $@$>6$1<@$2> u%h R$-!$+ $@$>6$2<@$1.UUCP> resolve uucp names ## ## RULESET 4 -- Final output rewriting. S4 R@ $@ handle <> error addr # Externalize local domain info. R$*<$*LOCAL>$* $1<$2$R>$3 change local info R$*<$+>$* $1$2$3 defocus R@$+:$+:$+ $@@$1,$2:$3 canonical R$+<@$w> $1 remove our name R$+@$-.UUCP $2!$1 u@h.UUCP->h!u ## ## RULESET 5 -- From: field post-processing (just before final). S5 ## ## RULESET 6 -- Canonicalize hostname (called from ruleset 3). S6 R$+<@$+.$+.UUCP> $1<@$2.$3> u@h.d.uucp->u@h.d ## ## RULESET 14 -- All fields for all mailers S14 ## MAILER SPECIFICATIONS ## ## local; an error as we do no mail delivery here Mlocal, P=/usr/lib/sendmail, F=DFILMmsuX, S=14, R=14, A=sendmail $n ## prog; an error as we do no mail delivery here Mprog, P=/usr/lib/sendmail, F=DFILMmsuX, S=14, R=14, A=sendmail $n ## relay; connect to Sendmail on relay host. Mrelay, P=[IPC], F=DFLMmsuX, S=14, R=14, A=IPC $h, E=\r\n -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net. Use a domain-based address or give alternate paths, or you may lose out.