Back to Top

Help & Support

Get instant answers 24/7

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:
    (You must be logged in to read this portion of the article)

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

  • Under the TRANSPORT section, add this block of text:
    (You must be logged in to read this portion of the article)
  • 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: Go to Exim Configuration Manager > Basic Editor > Mail and change Smarthost support from default to:
    (You must be logged in to read this portion of the article)
    Note: 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 October 31, 2023