On 28/07/24 00:49, Jaco Kroon via dovecot wrote:
From what I understood from the archive and from my tests, we cannot have multiple passwords for a given account. (I get the error: Password query returned multiple matches) But it looks like it can be done via a PAM module. Does anyone succeeded setup multiple password with PAM or any other method with a SQL backend ?
We don't do multiple passwords, but in theory you could by passing the password to the query such that the query can determine which (if any) password to return :).
Indeed using the method documented here you should be able to do exactly that:
https://doc.dovecot.org/configuration_manual/authentication/sql/#password-ve...
This should work with password hashes as well so long as your SQL server has an appropriate function to generate the hash from the passed password (%w) and then compare it to the stored hash.
Peter