Sendmail 8.x SMTP Mail Transfer Agent for Linux and Unix - Setup Guide

Important Points

  • This instructions will guide you through configuring Sendmail to use AuthSMTP as an authenticated smart host for all your outbound email
  • First you need to make sure the email addresses you will be sending from have been authorised on your account in our Control Panel
  • These instructions assume your server is already configured with Sendmail, email can be received and you have external network access on one of the following ports - 23, 25, 26, 325, 2525
  • Backup your Sendmail configuration files before making any changes.
  • These instructions are only for the Sendmail Mail Transfer Agent, they are based on Sendmail version 8.13 installed on a Linux platform but will loosely apply to many other versions and platforms providing it is recent and has support for Cyrus SASL compiled in - 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.

SOLARIS: The default installation of Sendmail on Solaris 10 / 11 has *not* been built with support for SASL which is required for SMTP authentication. To use Sendmail on Solaris with our service you will need to compile Sendmail from sources and configure support for SASL as part of the build. The alternative is to install an alternative MTA such as Postfix using the packages available from the Postfix website, we have a setup guide for configuring SMTP authentication with Postfix .


  • Login to your server on a command line as 'root' via SSH etc
  • Move to your Sendmail configuration directory (typically /etc/mail)
    >cd /etc/mail
  • Backup your configuration files:
    >cp /etc/mail/* /SENDMAIL_BACKUP
  • Open your Sendmail configuration file (typically /etc/mail/ 'vi' or an alternative file editor and find the line that reads:
    dnl define(`SMART_HOST', `smtp.your.provider')dnl
  • Change this to the following ensuring you remove 'dnl' from the beginning of the line:
    define(`SMART_HOST', `')dnl
  • On the line below that add the following line:
  • 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 below the two previous lines you added.
    define(`RELAY_MAILER_ARGS', `TCP $h 2525')dnl
  • Save and close the file.
  • Now open the file /etc/mail/access using 'vi' or an alternative file editor and add the following line: NO
  • Save and close the file.
  • If you DO wish to use SSL / STARTTLS do not add the above line.
  • To enable SSL on your account you can do so by logging into the Control Panel .
  • Next open the file /etc/mail/authinfo using 'vi' or an alternative file editor and add the following line:"U:acxxxx" "P:xxxx" "M:CRAM-MD5 DIGEST-MD5"
  • 'U:' and 'P:' will need to be changed to use your AuthSMTP username and password accordingly.
  • If you do not have support for CRAM-MD5 or DIGEST-MD5 installed on your server please change "M:CRAM-MD5 DIGEST-MD5" to "M:PLAIN"
  • Save and close the file, run the following commands:
    >makemap hash /etc/mail/authinfo < /etc/mail/authinfo
    >make -C /etc/mail
    >service sendmail restart
  • The setup is now complete, please try sending a test message to ensure everything works okay, for trouble shooting 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, typically Sendmail will log to:
    • Enable verbose logging in Sendmail by entering 'O LogLevel=9' in your file and then restart Sendmail, this will log extra details to your default mail log.

Are you using Sendmail on an Amazon EC2 instance?

Please see - How do I change the hostname and from address on my Amazon EC2 instance when using AuthSMTP?