Subject: Re: daily (& security) mail not delivered
To: William Allen Simpson <wsimpson@greendragon.com>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 06/28/2003 15:35:48
On Sat, 28 Jun 2003, William Allen Simpson wrote:
> OK, let's try it:
> 
> dreamer: {1} echo test | mail root
> dreamer: {2} echo testlocal | mail root@localhost

[...]

> H?F?From: current
> H?M?Message-Id: <200306281236.h5SCabs6013389@dreamer.citi.umich.edu>
> H??To: root@localhost
> .
> 
> No, he's wrong!  The localhost piece IS NOT "replaced with my fully 
> qualified hostname."

You were looking at a file in the queue.  Final delivery had not yet
taken place.  So you can't yet be sure what sendmail will do during
delivery.  My tests suggest that "localhost" in the "To:" line will be
changed to the local machine's hostname some time before or during final
delivery,

> The delivery is attempted to "localhost.citi.umich.edu". 

I think you mean "sendmail's logs and queue files imply that delivery is
attempted to localhost.citi.unich.edu".  I think you'll find that that
name is not really used for delivery.

At least, when I tried adding an /etc/hosts entry for
localhost.${domain} with an IP address other than 127.0.0.1, and sent
mail to "root@localhost", sendmail did not connect to the other IP
address, and eth mail was delivered to root's mailbox on teh local
machine.

--apb (Alan Barrett)