Path: utzoo!attcan!uunet!mcvax!hp4nl!ruuinf!piet From: piet@ruuinf (Piet van Oostrum) Newsgroups: comp.mail.sendmail Subject: Re: Ruleset 4 Message-ID: <977@ruuinf.UUCP> Date: 13 Jan 89 17:28:08 GMT References: <619@ur-cc.UUCP> Sender: piet@ruuinf.UUCP Reply-To: piet@ruuinf (Piet van Oostrum) Organization: Dept of Computer Science, University of Utrecht, Holland Lines: 77 In-reply-to: msir@uhura.cc.rochester.edu (Mark Sirota) In article <619@ur-cc.UUCP>, msir@uhura (Mark Sirota) writes: `This was posted April 1, 1988: `In message hedrick@athos.rutgers.edu (Charles Hedrick) writes: `> To see how sendmail is going to deliver mail to a given address, a `> reasonable thing to type is `> sendmail -bt `> 0,4 address `> ... `> Finally, here is the exact sequence in which these rules are used. `> For example, the first line means that the destination specified in `> the envelope is processed first by rule 3, then rule 0, then rule 4. `> `> envelope recipient: 3,0,4 [actually rule 4 is applied only to the `> user name portion of what rule 0 returns] `> envelope sender: 3,1,4 `> header recipient: 3,2,xx,4 [xx is the rule number specified in R=] `> header sender: 3,1,xx,4 [xx is the rule number specified in S=] `> `> I have the impression that the sender from the envelope (the `> return-path) may actually get processed twice, once by 3,1,4 and the `> second time by 3,1,xx,4. However I'm not sure about that. ` In article , karl@triceratops (Karl Kleinpaste) writes: ` `Ultimately, an address gets near the end of S3 with the potential for `not having been taken care of by the above sorts of rules. So my S3 `ends like this (after some intervening stuff taking care of a lot of `deeply weird special cases): ` `# Final cleanup: Make sure it's bracketed and @ified. `R$+<$*>$* $@$1<$2>$3 already <>'d; leave be `R$+@$* $@$1<@$[$2$]> already @ified; add <> `R$+ $@$1<@$D> u => u@domain ` `The final line is what makes sure that outbound mail always has the `Right Thing. $D in my case is cis.ohio-state.edu, so it's guaranteed `to leave a reasonable FQDN in the right places. If I weren't hiding `hostnames, I would probably use $w or $w.$D or somesuch. ` We have a problem that's related to this one. What we wanted is adding our domain to local names in To: and Cc: fields. The rule is: R$- $- $@$1.$D.$U First we did that in ruleset 4. It appeared that local mail didn't work anymore. Apparently the user name that is passed to /bin/mail got munged through ruleset 4. We checked that with de debug option :-). So we put the rule in the R rules in the uucp mailer. The next problem was that mail to our uucp connections no longer worked. Mail to uucphost!user got the rmail command as rmail user@cs.ruu.nl (so their user name with our domain name). This even happened for mail passing us. The reason apparently being the same: The $u value is passed through rules 2, R, 4. So we tried to put the rule in S3. No way, it got into a loop (Essentially, it is recognized as local, at the end of rule 0 the local domain is stripped off, and then it goes back to rule 0 and 0). This may be a problem of our (vendor-supplied) sendmail,cf that calls S15 at the end of S0 processing, S15 calls S3 and S0. Every time we try to make a minor change, we get stuck somewhere. Could anybody give us a copy of a simple, but complete configuration file for a site similar to the following: We have a few uucp connections, and a local ethernet (with hosts known from the file etherhosts) Our domain is cs.ruu.nl, hostname is ruuinf. All xxx.cs.ruu.nl goes to the ethernet All yy.ruu.nl goes by uucp to accumv! All unkown stuff goes by uucp to hp4nl! -- Piet van Oostrum, Dept of Computer Science, University of Utrecht Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)