I Need To Make A Change With My IT Support! Call (225) 706-8414

Specify smarthost per domain for Sendmail

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.

Solution

This is mainly done via Sendmail’s mailertable file.

  1. Log on to the sendmail server as root and change directory to /etc/mail
  2. Edit the mailertable file
  3. 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:
    puryear-it.com esmtp:exchange.puryear-it.local
  4. Save and close the file
  5. 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.
  6. You shouldn’t need to restart sendmail for it to see the changes.

 

Concerned About Cyber Attacks?

CLICK HERE >

Want to Migrate to the Cloud?

CLICK HERE >
Office 365

Ready to Experience Microsoft Office 365?

Want the latest IT news directly in your inbox? Subscribe now!