1

I'm banging my head over this for past 4 hours, and I cannot crack it! Google turns out allot of issues related to SASL authentication failure: Password verification failed but none helped.

Basically, IMAP works fine, I can login. But smtp with SASL+pam turned out to be a pain!

mail.log says:

SASL authentication failure: Password verification failed

auth.log:

pam_unix(smtp:auth): check pass; user unknown
Jan  4 13:43:30 favoritewords saslauthd[2193]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= 
Jan  4 13:43:32 favoritewords saslauthd[2193]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Jan  4 13:43:32 favoritewords saslauthd[2193]: do_auth         : auth failure: [[email protected]] [service=smtp] [realm=domain.com] [mech=pam] [reason=PAM auth error]

In mysql log I see:

59 Query    select crypt from users where id='[email protected]' and enabled = 1
           59 Query COMMIT
           59 Quit  
           60 Connect   mail@localhost on mail_db
           60 Quit  

/etc/pam.d/smtp looks like this:

auth required pam_mysql.so user=mail passwd=asdasdasd== host=127.0.0.1 db=mail_db table=users usercolumn=id passwdcolumn=crypt crypt=1 verbose=1
account sufficient pam_mysql.so user=mail passwd=asdasdasd== host=127.0.0.1 db=mail_db table=users usercolumn=id passwdcolumn=crypt crypt=1 verbose=1

and /etc/postfix/sasl/smtpd.conf:

pwcheck_method: saslauthd
mech_list: plain login cram-md5 digest-md5
log_level: 7
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: mail
sql_passwd: asdasdasd==
sql_database: mail_db
sql_select: select crypt from users where id='%u@%r' and enabled = 1

NOTE, I think /etc/postfix/sasl/smtpd.conf is used over /etc/pam.d/smtp and this is the problem.

2
  • 1
    "I'm banging my head over this for past 4 hours, and I cannot crack it" some joke about thick head
    – bjb568
    Oct 12, 2014 at 18:09
  • @bjb568 +1 :D yeah
    – user25389
    Mar 26, 2016 at 11:33

1 Answer 1

0

Quick answer. Restart pam service.

There's aparrently alot of mem leaks in PAM and especially with SASLauthd it crashes a lot.

I'm trying to figure out a way to limit the amount on lookups allowed, as right now it's getting 50 or so a second and crashes OFTEN.

You must log in to answer this question.