Back to Top

Help & Support

Get instant answers 24/7

Top > Outbound Filtering > Routing outbound email from dedicated mail server through SpamHero

Set up Exim to Relay Outbound Messages Through SpamHero

To setup your Exim mail server to relay outbound emails through SpamHero, here are some steps to implement:

Enable the Smart host feature in SpamHero

Before using the outbound system, you must first go to the Outbound > Outbound Settings page in SpamHero and do the following:

  • Check the Enable outbound smart host relay box.
  • Enable Allow username & password credentials (appears after you check the box above).
  • You will be prompted to set a password. Be sure to make a note of this password for use in the steps below.

Update the exim.conf file on your mail server

Before proceeding, make a backup copy of your current exim.conf file.

If you are using cPanel, use the Exim Configuration Manager for this part. Otherwise, locate the exim.conf file and open it in your favorite editor.

Under the ROUTER section, add this block of text:

spamhero_route:
  driver = manualroute
  domains = ! +local_domains
  transport = spamhero_relay
  route_list = * smtp.mxthunder.net

The above should be the first router listed in this section!

Under the TRANSPORT section, add this block of text:

spamhero_relay:
  driver = smtp
  port = 25
  hosts_require_auth = smtp.mxthunder.net
  hosts_require_tls = smtp.mxthunder.net
Under the AUTHENTICATION section, add this block of text, but replace username with your domain name and password with the one you configured in the SpamHero control panel (see above):

spamhero_login:
  driver = plaintext
  public_name = LOGIN
  hide client_send = : username : password

If using cPanel's Exim Configuration Manager (Advanced Editor), the above block of text goes in the section called AUTH.

Restart Exim

Be sure to restart Exim to apply the changes.

Optional steps

  • cPanel users only: Go to Exim Configuration Manager > Basic Editor > Mail and change Smarthost support from default to: smtp.mxthunder.net
     
    Note: This only applies to cPanel.

    Also, routing through SpamHero works with cPanel even without changing this value, but there may be some benefit to enabling it.


     
  • For DKIM to work, there is an additional step required.

    For non-cPanel users, add the following at the bottom of the TRANSPORT section (and adjust the dkim_private_key path to the correct location on your server):

    # DKIM Settings
      dkim_domain = ${lc:$sender_address_domain}
      dkim_selector = default
      dkim_private_key = "/update-this-path/domain_keys/private/${dkim_domain}"
      dkim_canon = relaxed

    For cPanel users, use this (assumes default path for cPanel):

    # DKIM Settings
      dkim_domain = ${lc:$sender_address_domain}
      dkim_selector = default
      dkim_private_key = "/var/cpanel/domain_keys/private/${dkim_domain}"
      dkim_canon = relaxed

    If using cPanel's Exim Configuration Manager (Advanced Editor), this block of text goes in the section called TRANSPORTSTART.
Last updated November 15, 2022