Thanks for reply.
Yes, the log line
pam_mysql - SELECT returned no result
was an experiment, and I only got this result when I on purpose changed the row in the mailbox table so that there would be no hit. After changeing back, the error line disappeared.
This was a test to see that pam really selected the line in the mailbox table, and the test revealed that it does.
Even so, auth failes...