Log In

Step 1

Login to your server via SSH as ‘root’ user and change to your Sendmail configuration directory, which is normally at /etc/mail.

Please make backup of each configuration file before making changes.

cd /etc/mail

mkdir /SENDMAIL_BACKUP

cp /etc/mail/* /SENDMAIL_BACKUP

Step 2

Edit Sendmail configuration file ‘/etc/mail/sendmail.mc’ using your favorite editor such as ‘vi’ and update the settings as below.

Ports 8025, 587 and 25 can also be used.

If you are getting “Relaying Denied” error messages, enclose the mail server name in square brackets:

define(‘SMART_HOST’, ‘[mail.smtp2go.com]’)dnl

define('SMART_HOST', 'mail.smtp2go.com')dnl

FEATURE('authinfo', 'hash -o /etc/mail/authinfo')dnl

FEATURE('authinfo')dnl
define('RELAY_MAILER_ARGS', 'TCP $h 2525')dnl

Step 3

To add authorization credentials, edit the file ‘/etc/mail/authinfo’ using your editor and add below line.

Replace ‘your_smtp2go_username’ and ‘your_smtp2go_password’ with your actual SMTP2GO Username and Password.

If your server supports CRAM-MD5 or DIGEST-MD5, then you may replace “M:PLAIN” with “M:CRAM-MD5 DIGEST-MD5”.

AuthInfo:mail.smtp2go.com "U:your_smtp2go_username" "P:your_smtp2go_password"
"M:PLAIN"

Step 4

Now save your changes and update your configuration files as below:

cd /etc/mail

makemap hash /etc/mail/authinfo < /etc/mail/authinfo

make -C /etc/mail

Step 5

Finally restart Sendmail service using one of the following commands based on the version you are using:

/etc/init.d/sendmail restart
or
service sendmail restart

Ready for better email delivery?

Try SMTP2GO free for as long as you like:

Try SMTP2GO Free → Paid plans available for over 1,000 emails/month.