Exim 4.x SMTP Mail Transfer Agent for Linux and Unix - Setup Guide

Important Points

  • These instructions will guide you through configuring Exim to use AuthSMTP as an authenticated remote SMTP transport for all your non-local outbound email.
  • First you need to make sure the address(es) you will be sending from have been authorised for your account in our Control Panel.
  • These instructions assume your server is already configured with Exim, email can be received and you have external network access on one of the following ports - 23, 25, 26, 2525
  • Backup your Exim configuration files before making any changes.
  • These instructions are only for the Exim Mail Transfer Agent, they are based on Exim version 4.63 installed on a Linux platform but will loosely apply to many other versions and platforms providing:
    • It is version 4.x or greater
    • Support for CRAM-MD5 or DIGEST-MD5 is compiled / installed
  • For other email programs please see How To Setup AuthSMTP or contact us.
IMPORTANT: This is only intended as a basic guide to setting up AuthSMTP and assumes prior knowledge of Linux / Unix system administration, we CANNOT provide support on general usage of the operating system or on implementing more complex configurations - for additional support with the MTA please use the software vendors support channels.

Instructions

  • Login to your server on a command line as 'root' via SSH etc
  • Move to your Exim configuration directory (typically /etc/exim)
cd /etc/exim
  • Backup your configuration files:
mkdir /EXIM_BACKUP

>cp /etc/exim/* /EXIM_BACKUP
  • Open your Exim configuration file (typically /etc/exim/exim.conf) using'vi' or an alternative file editor and do the following.
  • Scroll down to the 'ROUTERS CONFIGURATION' section and comment out the following block:
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
  • ..using the '#' symbol...
#dnslookup:
#driver = dnslookup
#domains = ! +local_domains
#transport = remote_smtp
#ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
#no_more
  • Add the following block of text below that:
send_to_smart_host:
driver = manualroute
domains = !+local_domains
transport = remote_smtp
route_list = * mail.authsmtp.com
  • Scroll down the file to the 'TRANSPORTS CONFIGURATION' section, you should have a block already that reads:
remote_smtp:
driver = smtp
  • If it isn't already there add it in.
  • Add the following line below 'driver = smtp':
hosts_require_auth = mail.authsmtp.com
  • This next step is optional - the default SMTP port is 25 but some ISPs block this port so if you wish to use one of the alternative ports(23, 26, 2525) please add the following line beneath the previous using the one ofthe alternative ports:
port = 2525
  • If you DO wish to send your messages using TLS/SSL you will need to add the following line:
hosts_require_tls = mail.authsmtp.com
  • If you DO NOT wish to send your messages using TLS/SSL you will need to add the following line:
hosts_avoid_tls = mail.authsmtp.com
  • Scroll down the file to the 'AUTHENTICATION CONFIGURATION' section and add the following block replacing 'username' and 'password' with your AuthSMTP username and password::
fixed_cram:
driver = cram_md5
public_name = CRAM-MD5
client_name = username
client_secret = password
  • If you server does not support CRAM-MD5 add the following block instead of the above replacing 'username' and 'password' with your AuthSMTP username and password:
fixed_plain:
driver = plaintext
public_name = PLAIN
client_send = ^username^password
  • Save and close the file.
  • Once you have made the changes you will need to restart Exim for the changes to take effect:
>/etc/rc.d/init.d/exim restart
  • The setup is now complete, please try sending a test message to ensure everything works okay, for troubleshooting you can:
    • View sent messages and errors logged on your account by logging into the Control Panel .
    • View sent messages and errors in your server log, typicallyExim will log to '/var/log/exim/main.log'