Sendmail + SASL2 Auth Error

sendmail

My sendmail config is like so:

/usr/lib/sasl2/Sendmail.conf
pwcheck_method:saslauthd

We are running "saslauthd"

root 32102 1 0 81 0 - 1128 fcntl_ 11:37 ? 00:00:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam

When I saslauth with account name "cccc" everything works OK. But when I saslauth with account name "cccc@domain.com" it fails.

/var/log/messages
saslauthd[32103]: do_auth : auth failure: [user=cccc] [service=smtp] [realm=domain.com] [mech=pam] [reason=PAM auth error]

What's the problem?

Best Answer

Your saslauthd is using pam as the backend for authentication.

Mostly on a system the smtp/imap check is just a lookup of you system account.

And there are no system accounts like whatever@domain.com. So pam cannot find such a user and so rejecting authentication.

Take a look in /etc/pam.d/smtp

If you really want using pam, which I would suggest you, you can use a mysql table for your authentication or other fancy things. Take a look at pam-mysql e.g.

Either use a apropriate setup for you pam or use sasldb as a backend for sasalauthd

saslauthd -a sasldb

Then you can use the userland tool saslpasswd2 for setting up your accounts.

Related Topic