You need to specify the mail server to which a sendmail instance should forward mail for a particular domain. For example, you are using a sendmail server with spamassassin to filter mail before it gets forwarded to your Exchange server. Because, the MX entry for that domain is the sendmail server, it will not know where to forward mail unless you specify the Exchange server as the next hop.
This is mainly done via Sendmail’s mailertable file.
- Log on to the sendmail server as root and change directory to /etc/mail
- Edit the mailertable file
- For each domain that need to forward, enter the domain name, a space, and receiving MTA prefixed with “estmp:”.
For example, to forward mail for the puryear-it.com domain to exchange.puryear-it.local:
- Save and close the file
- Use the makemap program to create a database map of the your mailertable.
# makemap hash mailertable < mailertableThis speeds up sendmail’s lookups when it’s determining how to route messages. makemap will append a .db extension to the resulting file by default.
- You shouldn’t need to restart sendmail for it to see the changes.