Friday, October 2, 2009

Episode 1: Sendmail Masquerading

Aim:

You want to receive mail as root@domain.com and not as root@host.domain.com under Sendmail configuration.

Solution:

Add this entry in sendmail.mc file:

FEATURE(always_add_domain)dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
MASQUERADE_AS(`intinfra.com')dnl
MASQUERADE_DOMAIN(`intinfra.com.')dnl
MASQUERADE_DOMAIN(localhost)dnl
MASQUERADE_DOMAIN(localhost.localdomain)dnl

By default, user "root" will not be masqueraded. To remove this restriction use:

EXPOSED_USER(`root')dnl
command in /etc/mail/sendmail.mc. You can comment this out if you like with a "dnl" at the beginning of the line and running the sendmail start script.

Run m4 command and restart the Sendmail.

Do Remember to add:

DSmailw.intinfra.com

to sendmail.cf file.

No comments:

Post a Comment