SUMMARY: sendmail $x macro

From: Sandi Donno (sandi@cs.uct.ac.za)
Date: Thu Aug 18 1994 - 16:14:04 CDT


Sun-managers,

My original problem:

> I have a problem with the $x macro (full name) in sendmail on all my Sun
> systems - 4.1, 4.1.3, 5.3. Sendmail is supposed to set $x from the full name
> in /etc/passwd if all else fails (i.e. if there is no -F parameter or no
> full name field in an existing From: line), and it is not doing so.

I have received two answers to my query, both of which solved my problem.

: From: Rich Schultz <rich@ccrwest.org>
:
: My experience is with 4.1.3. sendmail only sets $x if the sender address
: resolves (using Rule 0) to the local mailer, that is, the mailer called
: "local". If you forward everything to your mailhost, nothing resolves to the
: local mailer (except errors). One way around this, which I do here, is to let
: things resolve to local, but change the local mailer to look something like the
: ether mailer:
:
: Mlocal, P=[TCP], F=msDFMX, S=11, R=21, A=TCP $h
:
:Then, the final lines of Rule 0 become:
:
: # everything else is a local name -- forward to mailhost
: R$+ $#local $@$R $:$1 local names
:
:In this way, clients forward their mail to the mailhost, but still set $x.
:Note that you also have to change all the lines using the local mailer to
:supply a destination host. For example,
:
: R@ $#local $:$n handle <> form
:
:becomes
:
: R@ $#local $@$R $:$n handle <> form

This worked nicely and fooled the client system to insert the correct From:
field, with full name filled in, but still forward all mail to the mailhost.

: From: Neil Rickert <rickert@cs.niu.edu>
:
: It only does this for local users. A user is only local if email to that
: user would be delivered locally. If it will be delivered over the network
: to your mailhost, the user is not considered local.
:
: > I have now set up the $q macro on the clients to:
: >Dq$g$?x ($x)$.
:
: Define $q on your clients with:
: Dq$?x$x $.<$g>
:
: This will probably allow your mailhost to fill in the full name.

The above did not quite do the trick, but it led me to another solution.
If the Dq macro is empty, i.e.
Dq$?x$x <$g>$.
or
Dq
then no From: field is inserted by the client, so the mailhost inserts it.

Thanks to both of you.

Sandi Donno
sandi@cs.uct.ac.za



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:08 CDT