[CentOS] dumb sendmail question -- how to get outbound messages to use "example.com" instead of hostname?

Mon Jul 2 18:11:46 UTC 2007
Stephen John Smoogen <smooge at gmail.com>

On 7/2/07, Brent L. Bates <blbates at vigyan.com> wrote:
>      On our servers here are some sendmail.mc lines referring to our domain.
>  May be they will help.  These are from our main server:
>
> define(`confDOMAIN_NAME',vigyan.com)dnl
> CLIENT_OPTIONS(`Family=inet,Addr=vigyan.com')dnl
> define(`SMART_HOST',`vigyan.com')dnl
> FEATURE(`smart_host_domain',`vigyan.com ')dnl
>
> These are from our slave servers:
>
> CLIENT_OPTIONS(`Family=inet,Addr=slave.vigyan.com')dnl
> MASQUERADE_AS(vigyan.com)dnl
> MASQUERADE_DOMAIN(vigyan.com)dnl
> FEATURE(`allmasquerade')dnl
> FEATURE(`masquerade_entire_domain')dnl
> FEATURE(`masquerade_envelope')dnl
> define(`SMART_HOST',`slave.vigyan.com')dnl
> FEATURE(`smart_host_domain',`vigyan.com ')dnl
>

Make sure you have sendmail-cf RPM installed also. I normally do the
fixes by hand as in

DATE=$(date -Im)
yum install sendmail-cf
m4 < /etc/mail/sendmail.mc > /etc/mail/sendmail.cf.${DATE}
diff /etc/mail/sendmail.cf /etc/mail/sendmail.cf.${DATE}
cp -b /etc/mail/sendmail.cf.${DATE} /etc/mail/sendmail.cf
service sendmail restart


-- 
Stephen J Smoogen. -- CSIRT/Linux System Administrator
How far that little candle throws his beams! So shines a good deed
in a naughty world. = Shakespeare. "The Merchant of Venice"