Path: utzoo!attcan!uunet!mcsun!cernvax!chx400!ethz!neptune!inf.ethz.ch!white From: white@inf.ethz.ch (RJ White) Newsgroups: comp.mail.sendmail Subject: Re: having problem with Sun sendmail 4.1 Message-ID: <13076@neptune.inf.ethz.ch> Date: 26 Oct 90 07:22:11 GMT References: <12931@neptune.inf.ethz.ch> Sender: news@neptune.inf.ethz.ch Reply-To: white@inf.ethz.ch (RJ White) Organization: Departement Informatik, ETH, Zurich Lines: 84 In article <12931@neptune.inf.ethz.ch> I (RJ White) wrote: I'm using Sun sendmail 4.1 on a Sun 3/260 running SunOS 4.0.3 It seems the $x variable ( full name of sender ) is not being set... Thanks heaps and heaps to rickert@mp.cs.niu.edu jorgnsn@qucis.queensu.ca per@erix.ericsson.se who each pointed out the problem. Basically, my clients are not resolving to the 'local' mailer, but 'ether' ( to send to my mail server ) and so $x is not set. I've included some of the explanations below in case they are of use to others: ------------------------------------ ------------------------------------ What sendmail does on startup, is take the Sender address (the envelope sender that is - the one that shows up on the 'From_' lines and in the syslog records) and runs that address through ruleset 0. (Yes, I know this doesn't seem to make sense). The result of this processing is not used for sending mail. But it does determine whether the user is local. In other words, if ruleset 0 DOES NOT select the LOCAL MAILER for a local user, sendmail will not recognize that user as local, and won't look in /etc/passwd etc to set $x. An additional comment. Sendmail only adds $x to the 'From:' line if it is creating that line. If the 'From:' line is in the mail as received by sendmail, its format as received is retained (except for possible address rewriting). -Neil Rickert ------------------------------------ ------------------------------------ My guess is that the machines which aren't setting the full name are mail clients which NFS mount /usr/spool/mail from a mail server, and deliver "local" mail by an ether connection to the server. Your problem is the method sendmail uses to determine whether or not it can find a full name for an address. It tries pretending that address is a destination and determining what mailer it would use to send it. If the mailer is "local", it looks up the full name. If it is "ether", or anything else other than "local", it figures that the address is for someone on another machine, so there is no point to looking for a full name. I followed the a suggestion from Keith Moore (moore@betelgeuse.cs.utk.edu) to deal with this problem. I left the F flag off the definition of the mailer that mail clients use to deliver to the mail server, so that sendmail on the clients adds no From line to the message. The F flag does exist on the mail server, which does deliver with the local mailer, so it adds the From line, together with a full name. This does produce a slightly odd set of header lines on the delivered message, though, with a Received: line between the From: line and the Date: line. John Jorgensen jorgnsn@qucis.queensu.ca (613) 545 6784 ------------------------------------ ------------------------------------ ... I think it is reasonably accurate to state that *all* versions of sendmail will put a Full-name into a From: line that doesn't have one *only* if two conditions are met: a) The address on the From: line must resolve to the mailer *named* 'local' b) The envelope sender address (aka 'From ' or 'Return-Path:') must match the From: address *exactly* Presumably your clients have sendmail.cf's that resolve everything to the 'ether' (or somesuch) mailer, thus condition a) isn't met on the client. If the Full-name is available on the server (through passwd/map), *and* the address on the From: line resolves to 'local' there, things will work if you use the <$g> form for From: in the clients' .cf (since it will match SMTP's MAIL FROM: format and thereby meet condition b)). However I gather that this is not the case for you (and that you already use the <$g> format), i.e. the Full-name *must* be inserted on the client - to achieve this you have to name the mailer that sends everything to the server 'local' (don't forget to remove the "real" 'local') - yes it is an ugly hack, but it works... --Per Hedeland ------------------------------------ ------------------------------------ again, thanx alot! -rj