[comp.unix.ultrix] Getting full name from sendmail

ian@airs.com (Ian Lance Taylor) (05/07/91)

This is about sendmail on Ultrix 4.0 on a DECstation 3100.  The
sendmail version seems to be 2.2 Ultrix.  I have no source code.

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.  The final rule in
ruleset 0 looks like this:

R$+			$#tcp$@$R$:$1

I've discovered that if I change this wildcard entry to deliver to
#local, the $x macro does get set correctly.  However, a line like

R$-			$#tcp$@$R:$1

is enough to clobber the $x macro.  Even

R$-			$1<@$D>

clobbers it.

It seems that sendmail checks whether unqualified user names are
delivered locally and uses this to decide whether to set the $x macro
out of /etc/passwd.

So, my questions:

Am I right as to what is going wrong?

Is there any way to get this approach to work correctly?

Should I be doing something else entirely to forward unqualified user
names?

Many thanks in advance.
-- 
Ian Taylor                   ian@airs.com                  uunet!airs!ian
First person to identify this quote wins a free e-mail message:
``Discipline to be effective must be optional.''