2013年1月7日 星期一

Sendmail masquerade outgoing email address

Reference:
http://www.tampabaycomputing.com/blog/sendmail-masquerade-outgoing-email-address

vi /etc/mail/sendmail.mc


MASQUERADE_AS(domain.com)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(domain.com)dnl


Note 1:
If sending email as “root”, it will still use the hostname of the box. If you want root to send out using the new domain name you specified, change:
EXPOSED_USER(`root')dnl
TO
dnl EXPOSED_USER(`root')dnl

Note 2:
If you want to receive mail from other servers, change this.
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
TO
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

To commit changes:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

service sendmail restart

沒有留言:

張貼留言