Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!samsung!uunet!airs!ian From: ian@airs.com (Ian Lance Taylor) Newsgroups: comp.mail.sendmail Subject: Re: Getting full name from sendmail (help!) Message-ID: <1764@airs.com> Date: 22 May 91 17:10:00 GMT References: <1679@airs.com> Sender: news@airs.com Lines: 45 Earlier, I asked: >I've configured sendmail so that all mail that isn't explicitly >addressed locally gets forwarded to our main mail machine. For >example, my user name is ian and I'm on comton.airs.com. Mail sent to >``ian@comton.airs.com'' will get delivered locally, but mail sent to >``ian'' will get forwarded to another machine which knows where my >actual mailbox is. >My problem is that sendmail is not inserting my full name in the From: >field, because the $x macro is being set to blank. A couple of people asked me to post a summary of responses, so here it is. I got very helpful replies from Neil Rickert and Per Hedeland, for which I thank them profusely. The problem is that sendmail runs the sender address through ruleset zero, and only defines the $x macro from the passwd file if the mailer selected is named ``local'' and if the sender address in the SMTP envelope matches the From: header exactly. I only had to make one change on the client machines to get this to work (and no changes on the server machine). I changed the definition of $q to: Dq$?x$x <$g>$|<$g>$. This causes the From: line to look like ``From: ''. This will then match the SMTP address specified in the ``MAIL FROM'' command. When the address is run through ruleset 0 on the server machine, it will find that is delivered to the mailer ``local'' (so that the aliases get expanded) and it will insert my full name from the passwd file on the server machine. This worked for my situation because I was able to put all our users into the passwd file on the server machine. I was told that sites which can't do this can fix the problem using sendmail 5.65 with the IDA additions (which is available on uunet and probably other places). I took a look at this, but the complexity dissuaded me from attempting it. -- Ian Taylor ian@airs.com uunet!airs!ian First person to identify this quote wins a free e-mail message: ``Nobody believed him, so out of politeness to his listeners he pretended to be joking.''