[comp.bugs.4bsd] Sun sendmail DOES set $w macro to hostname

jw@sics.UUCP (Johan Widen) (06/02/87)

>I recently tried to install a new sendmail.cf file on our Sun 3 work stations.
>The new sendmail.cf uses the $w (hostname) in expansions. 'w' should have
>gethostname() as the default value. The sendmail provided with Sun 3.0 and
>Sun 3.3 appears to set 'w' to the string "w".

I got a letter from Sun stating:

    The $w macro gets assigned the primary host name.
    The difference is that we moved the definition of $w to after the point
    at which the configuration file is read and frozen.  This allows the
    same frozen config file to be shared with NFS among many machines with
    different host names.

Let me first state that yes this is so; the value of the w macro is
correct when sendmail processes mail (I did not believe that when I posted
the original article).

I was fooled by a smaller bug in sendmail: sendmail on Sun when run in test
mode
	sendmail -bt
    or
	sendmail -bt -Cxxx.cf

expands the w macro to the string "w" (if w has not been set explicitly). 
At least it does so with the sendmail.cf files I have tried it on.

My thanks to Sun for a quick response.
-- 
Johan Widen
Swedish Institute of Computer Science
PO Box 1263, S-163 13 SPANGA, SWEDEN
UUCP: {seismo,mcvax,munnari,cernvax,diku,inria,prlb2,penet,ukc,unido}!enea!sics!jw

jw@sics.UUCP (06/04/87)

In article <1311@sics.UUCP> jw@sics.UUCP (Johan Widen) writes:
>I was fooled by a smaller bug in sendmail: sendmail on Sun when run in test
>mode
>	sendmail -bt
>    or
>	sendmail -bt -Cxxx.cf
>
>expands the w macro to the string "w" (if w has not been set explicitly). 

Just to set the record straight:

It has been pointed out to me that sendmail -bt prints

	"^A" "w"
not just
	"w"

This is supposed to be sendmails internal representation of $w (unexpanded).
I still think that this is a bug.
-- 
Johan Widen
Swedish Institute of Computer Science
PO Box 1263, S-163 13 SPANGA, SWEDEN
UUCP: {seismo,mcvax,munnari,cernvax,diku,inria,prlb2,penet,ukc,unido}!enea!sics!jw