Not real sure that I completely understand the question --
sendmail does use
/etc/hosts (at least on this machine, sending mail to myself (or any other user)):
Code:
fubar-trona-/home/trona: mailx trona
Subject: A Test Message
This is a test message.
EOT
fubar-trona-/home/trona: mailx
Heirloom mailx version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/trona": 1 message 1 new
>N 1 trona@fubar.lan Sat May 17 10:23 20/688 A Test Message
? t
Message 1:
From trona@fubar.lan Sat May 17 10:23:00 2014
Return-Path: <trona@fubar.lan>
From: trona@fubar.lan
Date: Sat, 17 May 2014 10:23:00 -0400
To: trona@fubar.lan
Subject: A Test Message
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
Status: R
This is a test message.
? d
? q
fubar-trona-/home/trona:
This machine, fubar, is fixed-IP (as are all my machines), all are in every
/etc/hosts and all send mail back and forth to each other without any additional configuration (those are fubar.lan, snafu.lan, pita.lan and dufus.lan).
To the outside world, no, messages bounce because
fubar.lan is not a valid DNS address; inside world, no problem.
I'm not using
sendmail directly, I let
mailx (or
mail) handle that.
That help any?