Update: I've tried to insert the password in plain text in the DB. That works, and I'm now able to send mail as well. I tried setting up the whole thing (using the guide mentioned) again, but with the same result. Any ideas?
Original question: Just set up a Postfix / Courier bundle following this tutorial. I've used this tutorial with luck before, but this time I am having problems sending email. My main problem is that I don't really know where to look for clues on what's causing this error. Mail.log only gives me the following lines,
Apr 21 17:38:50 gordon postfix/smtpd[5059]: connect from xxx.xx-xxx-xx.my.isp.carrier[xx.xxx.xx.xxx]
Apr 21 17:38:51 gordon imapd: LOGIN, user=my@domain.com, ip=[::ffff:xx.xxx.xx.xxx], port=[57701], protocol=IMAP
Apr 21 17:38:51 gordon postfix/smtpd[5059]: warning: xxx.xx-xxx-xx.my.isp.carrier[xx.xxx.xx.xxx]: SASL LOGIN authentication failed: authentication failure
When searching it appears "authentication failure" is a very generic error message and may be caused by a number of different errors – which makes it all the more diffifcult for a newbie like myself to locate the problem.
System
- Ubuntu 12.04
- Postfix
- Courier
- SASL with SSL and TLS
- SpamAssassin
- ClamAV
- Amavis
Best Answer
In the tutorial linked above, the author using CRYPT hash algorithm. This fact can be looked in SQL query:
Saslauthd using pam-mysql to authenticate user, so we need to configure pam-mysql to use same hash algorithm. The configuration file is defined in
/etc/pam.d/smtp
The important parameter is
crypt
because it specifies the method to encrypt the user's passwordSo, if you need use encrypted password for authentication then set
crypt
parameter so it match with your original query.Another important parameter is
verbose
. You can set it as 1 so you can know what the pam-mysql was doing.Further info: PAM-MySQL Package README readme.php