-
Edit /etc/mail/sendmail.mc and add the below lines replacing domain.tld with the actual domain name:
dnl # BEGIN: Rewriting Sender addresses for Entire Domain
dnl #
dnl # Process login names through the genericstable
FEATURE(`genericstable' , `hash -o /etc/mail/genericstable.db 9;)dnl
dnl # Interpret the value in G as a domain name
FEATURE(generics_entire_doma in)dnl
dnl # masquerade not just the headers, but the envelope as well
FEATURE(masquerade_envelope) dnl
dnl # Load domain.tld into G
GENERICS_DOMAIN(domain.tld)d nl
dnl #
dnl # END: Rewriting Sender addresses for Entire Domain
web1_user1 user1@domain.tld
web1_user2 user2@domain.tld
web1_user3 user3@domain.tld
# makemap -hash /etc/mail/genericstable < /etc/mail/genericstable
Feature "genericstable" tells sendmail to use the generics table.
Feature "generics_entire_domain" allows to add hosts to genericstable without having to rebuild sendmail.cf.
Feature "masquerade_envelope" applies the rewriting process to the mail envelope as well as to the mail header.
"GENERICS_DOMAIN" defines the domains to which you wish to apply the generics table.
References:
- sandip's blog
- Login or register to post comments