22 Mar
2011
22 Mar
'11
12:46 p.m.
On 22.3.2011, at 15.20, Pascal Nobus wrote:
We want to update our password scheme from crypt to SHA256.
Because usernames/passwords are in MySQL I thought this wouldn't be a problem.
So that'd be passdb and userdb sql.
However: the password is not in the ENVIROMENT anymore.
Use passdb sql + userdb prefetch: http://wiki.dovecot.org/UserDatabase/Prefetch
Then have
password_query = select '%w' as userdb_password, ...
and now you'll have $PASSWORD environment. You could maybe also do this all by creating a mysql function that compares and updates the password directly, i.e:
password_query = select check_password('%u', '%w')