Friday, October 2, 2009

Episode 17: How do I masquerade a server's mail address on sendmail with domaintable?

To masquerade a server's domainname from one name to another use the domaintable FEATURE of sendmail.


First, open the file /etc/mail/domaintable for editing. The structure of this file is:







For example:




# vi /etc/mail/domaintable
old.example.com new.example.com


So mail for old.example.com would process as new.example.com


Next, add the following entry to /etc/mail/sendmail.mc file:




FEATURE(domaintable)


Next, remake the sendmail.cf file:


# cd /etc/mail
# make


Then, restart the sendmail service:


# service sendmail restart

No comments:

Post a Comment