white@inf.ethz.ch (RJ White) (10/25/90)
Help!?! I'm baffled. 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. I don't have source. According to the Sun documentation, stolen from the Berkeley documentation, $x gets set : - by a flag to sendmail ( no it isn't ) - from the 'Full-name: ' in the header if it exists ( this works ) - from the comment field in the 'From: ' line ( no it isn't ) - finally from the passwd file ( no it isn't ) Note that the above case that works (Full-name) is when I manually feed it to sendmail. I am trying this on a yellow pages *master*, so even if it doesn't use yellow pages, it should still see it in the passwd file. I also tried the OY option to say 'Dont use yellow pages'. No difference. The Q file that is sent to our server machine (sendmail white@inf.ethz.ch) is: Swhite H?D?date: Thu, 25 Oct 90 03:25:52 +0100 H?F?from: <white> H?x?full-name: H?P?return-path: <white> H?M?message-id: <9010250225.AA22245@orion.inf.ethz.ch> Hreceived: by orion.inf.ethz.ch id AA22245; Thu, 25 Oct 90 03:25:52 +0100 Happarently-to: white@inf.ethz.ch Rwhite@inf.ethz.ch Notice the 'full-name' above. The relevant stuff in my config file is : Dq$?x$x $.<$g> H?F?From: $q H?x?Full-Name: $x ie: $x is not set. No, I'm not accidently doing a Dxsomething or Fx anywhere. Now, this *does* work on another Sun of mine, same software, with a very different config file. However, the differences are basically in ruleset 0. (famous last words). The header declarations are the same. The 'ether' mailer description is the same. All the mailers are. None of that should matter. The amusing thing is, if mail from a system that doesn't set $x goes to my mail server where it does work, it ends up setting the full-name to the NAME environment variable of the sendmail deamon of whoever started it. So all mail from everybody came 'From: RJ White <somebody_else@inf.ethz.ch>' So you have to make sure NAME isn't set when you manually start it. Then, if the originator happens to have an account on that mail server, the full-name gets set to the GCOS field and a 'From: ' is generated. ( The reason mail goes to a mail server and not directly to where its finally destined for using DNS is complicated politicol and technical reasons ) I've tried several things. I tried the 'x' option (mailer wants a 'Full-Name') with the ether mailer. Didn't matter. Anyway, any hints would be greatly appeciated. replies to white@inf.ethz.ch -rj
white@inf.ethz.ch (RJ White) (10/26/90)
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