On 02 Sep 2013, at 07:40 , Per-Henrik Lundblom <ph@whatever.nu> wrote:
When a virtual user defined in the MySQL database tries to log in using IMAP or SMTP I always get auth failures logged in the system logs. Entries are like this:
Aug 21 06:25:36 roadrunner dovecot-auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=luser@mydomain.com rhost=85.224.xx.xx
I assume these failures comes form the fact that PAM doesn't recognize the virtual users and Dovecot continues to the SQL passdb entry. As a result I get a _lot_ of auth failures in the logs.
I have tried to come up with a way where the auth failures from PAM arent't logged if the the SQL authenication is successful. Is this possible or are there any other recommended ways to handle this?
How do other users solve this issue? The simple way is to just ignore all the logged auth failures but that seems too easy.
There's nothing to solve. If you have multiple authentication methods then any but the right one will fail, obviously.
That said, I don't see these at all (I have pam and sql set).
Are you logging to a dovecot log file or to syslog?
This is what I see in maillog:
Sep 2 15:00:51 mail dovecot: imap-login: Login: user=<*user*@*domain.tld*>, 12.34.56.789, PLAIN, TLS Sep 2 10:10:54 mail dovecot: imap-login: Login: user=<kremels>, 12.34.56.798, PLAIN, TLS
-- In other news, Gandalf died. -- Secret Diary of Boromir