Sendmail Authenticated Smarthost Configuration

Modified on Thu, 29 Sep, 2016 at 10:30 PM

1. Set your authorization informations by putting the following line to /etc/mail/authinfo file:

AuthInfo:outbound.mailhop.org "U:USERNAME" "P:PASSWORD" "M:PLAIN"

 Note: Replace USERNAME and PASSWORD with the mail relay username and PASSWORD.


2. Add following lines to /etc/mail/sendmail.mc (check if apropriate settings doesn't already exists):


define(`SMART_HOST', `outbound.mailhop.org')  

FEATURE(`authinfo')

  

3. Update sendmail.cf and access.db files:   


# cd /etc/mail  

# m4 sendmail.mc >sendmail.cf  

# makemap hash authinfo < authinfo 

   


4. Reload or restart sendmail:  

# /etc/init.d/sendmail restart

For any version of Sendmail



1. Set your authorization informations by adding following line to /etc/mail/access file:

AuthInfo:outbound.mailhop.org "U:USERNAME" "P:PASSWORD" "M:PLAIN"

   Note: Replace USERNAME and PASSWORD with the mail relay username and PASSWORD.


2. Add following lines to /etc/mail/sendmail.mc (check if apropriate settings doesn't already exists):


define(`SMART_HOST', `outbound.mailhop.org')  

FEATURE(`access_db')

  

3. Update sendmail.cf and access.db files:   


# cd /etc/mail  

# m4 sendmail.mc >sendmail.cf  

# makemap hash access <access 

   


4. Reload or restart sendmail:  

# /etc/init.d/sendmail restart

Note: If it does not work, you need to make sure the saslauthd is running on the server. saslauthd is the daemon for sending authentication . You may issue "service saslauthd start" to start the service.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article