[Dovecot] SSHA256 scheme

Daniel Luttermann daniel at dlutt.de
Tue Jul 27 16:49:59 EEST 2010


Patrick Westenberg wrote on 27.07.2010:

> Hi again,

> I`m a bit confused how to store a SSHA256 password in the database and
> I can`t find any information in the wiki.

> Do I have to store the SHA256 hash and the salt separately (what would
> the password_query be like in this way) or just the final SSHA256 hash?

when you create a password with dovecotpw or doveadm you can
copy&paste the generated password into your database.

If you use the same password scheme for all users you can use
"default_pass_scheme = ..." or as far as I know you can also override
the password scheme for the users in MySQL. Just insert the password
with the scheme prefix like "{SHA256}Password" into your MySQL
password field to override the default password scheme.

The query looks like

password_query = SELECT username, password \
  FROM users WHERE username = '%u'

even for other password schemes than PLAIN...

--
Daniel



More information about the dovecot mailing list