Sendmail Smarthost WITH authorization

By: Eric Schultz


Back Story

How to do it

I am assuming a rather basic sendmail configuration. (Examples are for CentOS 5.1) You basically need: Ok, it's pretty easy so here we go.

1. Ensure that saslauthd is started.

/etc/init.d/saslauthd start
/sbin/chkconfig --level 345 saslauthd on

2. Modify to use the smarthost (and auth)

Change the SMART_HOST and access_db values to:
define(`SMART_HOST', `')
FEATURE(`access_db', `hash -T -o /etc/mail/access.db')

3. Add the auth info to the access db file

Append to /etc/mail/access the line: "U:smmsp" "I:my_username" "P:my_password" "M:LOGIN PLAIN"

4. Recompile the and access.db files

If using centos then just:
cd /etc/mail

5. Re-Start sendmail

/etc/init.d/sendmail restart