Monday, January 10, 2011

Sendmail masquerade outgoing email address

With the help of masquerading your outgoing email appears from user@cyberciti.biz instead of realunixuser@server01.cyberciti.biz. This will also hide your internal user name or host name from rest of the world.

So this feature rewrites the hostname in the address of outgoing mail. This is also used when you have centralized mail server i.e. mail hub.

Sendmail masquerading configuration

Open your sendmail config file /etc/mail/sendmail.mc:

# vi /etc/mail/sendmail.mc
Append/add/modify the lines as follows:
MASQUERADE_AS(cyberciti.biz)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(cyberciti.biz)dnl

Save and close the file. Replace domain name cyberciti.biz with your actual domain name. Update and restat sendmail server:

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# /etc/init.d/sendmail restart

No comments:

Post a Comment