[OT] Forcing sendmail to NOT take its domain from DNS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, 2005-11-10 at 21:55, Nick Bryant wrote:
> It seems when sendmail starts up it takes the host name from a gethostname()
> which in turn is derived from a reverse lookup of the machines IP.
> 
> It uses this hostname as the default "From" address in outgoing mails e.g.
> if the hostname was box.foo.bar mails from root would appear as
> root@xxxxxxxxxxx
> 
> In my setup foo.bar is an internal domain which isn't recognized by remote
> MTA's as being a valid domain, understandably.
> 
> So I'd like to change foo.bar to foo.bar.com so the box can send mails.

Just set MASQUERADE_AS in sendmail.mc and restart sendmail 
with 'service sendmail restart' (the init script takes care
of rebuilding sendmail.cf)  If you want root's mail to also
be masq'd, remove the EXPOSED_USER setting.  If you are also
receiving mail, be sure to put all the names to accept as local
in the local-host-names file (also needs a sendmail restart).

-- 
  Les Mikesell
    lesmikesell@xxxxxxxxx



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux