Sendmail Masquerading

After install sendmail .. follow the below procedure to simply avoid your emails to get spammed.

Also avoid email address to shown as root@example.domain.com with masquerading.

This feature allows multiple hosts to send mail from the same domain name.

Configure sendmail.mc file.

# vim/etc/mail/sendmail.mc

and at the bottom of the file you will find :

dnl # Masquerading options
FEATURE(`always_add_domain’)dnl
MASQUERADE_AS(`example.domain.com‘)dnl
FEATURE(`allmasquerade’)dnl
FEATURE(`masquerade_envelope’)dnl

All you have to do is to change

MASQUERADE_AS(`example.domain.com‘)dnl

to

MASQUERADE_AS(`domain.com‘)dnl

Restart sendmail service

#/etc/init.d/sendmail restart

Done!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s