This page contains information on how to configure Sendmail for virtual hosts on UN*X.
Relevant or useful links.
Configuration.
Version Sendmail 8.9.X OS Any UN*X OS (including Linux, Digital UNIX, etc.)Summary.
Accepting incoming VH mail: Sendmail can be configured to accept mail addressed to virtual domain users, and deliver such mail to local recepients.Putting it all together.Rewriting outgoing VH mail: Sendmail also allows rewriting outgoing mail (originating from local users) as if it it were coming from a different domain. This way, sasha@forum.swarthmore.edu can be rewritten as sasha@mathlinks.com.
Here are step-by-step instructions:
CONFIGURING SENDMAIL TO ACCEPT MAIL FOR VIRTUAL DOMAINS/HOSTS
[username]@newdomainname LOCAL_USER (or remote user elsewhere)
where [username] is optional. If USERNAME is omitted, all mail coming to NEWDOMAINNAME will be delivered to the specified person.
makemap hash /etc/virtusertable < /etc/virtusertable
which will create /etc/virtusertable.db database file.
FEATURE(virtusertable)
m4 ../m4/cf.m4 SITE_CONFIG.mc > SITE_CONFIG.cfBack up the current /etc/sendmail.cf and copy your newly created SITE_CONFIG.cf to /etc/sendmail.cf. Then restart sendmail.
CONFIGURING SENDMAIL TO REWRITE OUTGOING MAIL FOR VIRTUAL DOMAINS/HOSTS
FEATURE(masquerade_envelope) FEATURE(genericstable, `hash -o /etc/genericstable') GENERICS_DOMAIN_FILE(`/etc/sendmail.cG')
The first line will ensure that not only the message headers (From:) will be rewritten, but also the message envelope (Return-to:).
sasha sasha@mathlinks.com peter peterthegreat@mathlinks.com