Sendmail Smarthost WITH authorization

By: Eric Schultz

Purpose

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 sendmail.mc to use the smarthost (and auth)

Change the SMART_HOST and access_db values to:
define(`SMART_HOST', `my.smarthost.name.com')
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:
AuthInfo:my.smarthost.name.com "U:smmsp" "I:my_username" "P:my_password" "M:LOGIN PLAIN"

4. Recompile the sendmail.cf and access.db files

If using centos then just:
cd /etc/mail
make

5. Re-Start sendmail

/etc/init.d/sendmail restart

Enjoy

Notes