While installing a new mail server i ran into a problem with SMTP authentication. The mail server in question is postfix installed on a Debian lenny box. The backend for postfix is MySQL. And because SASL is always a pain to configure i used dovecot to do the SMTP authentication with the MySQL backend. This however resulted in the following error
Jun 21 17:43:02 ims1 dovecot: auth-worker(default): mysql: Connect failed to localhost (mail): Access denied for user ‘mail_admin’@’localhost’ (using password: YES) - waiting for 1 seconds before retry
It took me a while to figure this out. The settings in ‘dovecot-sql.conf’ were correct. Logging in with the same data from a shell went without a problem. I remembered i had this problem some years ago. With a vpopmail setup. The problem then was the encryption algorithm used by MySQL. So i tried to use the older encryption algorithm.
After a restart everything was fine.
Jun 21 18:41:03 ims1 dovecot: auth-worker(default): mysql: Connected to localhost (mail)
Like i said it took me a while to figure out. So maybe i can safe somebody some time.