Path: utzoo!attcan!telly!problem!compus!lethe!torsqnt!hybrid!scifi!bywater!uunet!kyle From: kyle@uunet.UU.NET (Kyle Jones) Newsgroups: comp.mail.sendmail Subject: surprises from the `C' mailer flag (was: Re: -bt test option) Keywords: -bt Message-ID: <125390@uunet.UU.NET> Date: 12 Mar 91 23:07:45 GMT References: <187@rand.mel.cocam.oz.au> <2655@sapwdf.UUCP> Organization: UUNET Communications Services, Falls Church, VA Lines: 33 Bill Wohler writes: > the following diagram, from this paper describes the rulesets that > sendmail applies to messages. > > --> 0 -> resolved address > / > / /-> 1 -> S -\ > addr -> D- --> 4 -> msg > \-> 2 -> R -/ > > D - sender domain addition > S - mailer-specific sender rewriting > R - mailer-specific recipient rewriting I discovered recently that this diagram isn't quite right with regard to the addition of the sender domain, at least in sendmail 5.61. If the recipient mailer is sendmail's builtin SMTP mailer, then the user part of the (mailer, host, user) triple of ruleset 0 will have the sender's domain appended, if the sending mailer has the C flag set and the user part doesn't have a domain spec. This means that the RCPT To: SMTP command is sent out with the _sender's_ domain appended to the recipient, instead of the recipient's own domain. The `C' flag is great for fixing up headers lacking a FQDN, but applying it to recipient addresses in the envelope is going more than a little overboard I think. The fix is easy: always resolve to (tcp, domain, user@domain) when sending via SMTP. Older sendmail.cf's already do this, I'm sure. Now I know why. :-/ kyle jones ...!uunet!kyle