[Dovecot] Using dovecot with wordpress/phpass passwords?

Joan
Fri, 11 Mar 2011 16:39:09 -0000

Good afternoon,

I am trying to setup dovecot to authenticate using the userdata from wordpress.
It's being a bit mor difficult than I thought. This is the relevant
part of the dovecot-sql.conf

default_pass_scheme = CRYPT
password_query = SELECT user_pass AS password FROM wp_users WHERE
user_email='%u';
user_query = SELECT 501 as uid, 501 as gid,'maildir:storage=51200' as
quota FROM wp_users WHERE user_email = '%u'

I can see that the query is being procecessed according to the logs.

Wordpress and others are using phpass to authenticate
(http://www.openwall.com/phpass/), it is basically a salted md5 hash.
Basically, after the process, a hash like this is obtained.

 $P$BiWISc3IsqRHxeEjq4VJP1Vi8gy4mg1 (for test123 password)

I would like to know if dovecot would be able to read this, otherwise
I could still make a custom checkpassword function but that would be
non-optimal.

Could someone guide me on this?
If you need more details just ask.

Thanks a lot,

joan