[dovecot] Re: Question about the password field in a postgres ql database
Works fine with me.. Only thing I can think of is that it's some stupid configuration mistake, like not uncommenting the line :)
Hi Timo,
I just (double) checked my config files, and it LOOKS ok.
My dovecot is from cvs, updated yesterday, and running on Redhat 7.3 (if that matters).
Here is my dovecot-pgsql.conf:
--8<-- # # Postgress connect string. Similar to PHP connect = host=A.B.C.D dbname=maildb user=mailuser password=******
password_query = SELECT password FROM aliases WHERE alias = '%u' AND password != '' AND locked='f'; user_query = SELECT maildir as home, 100 as uid,498 as gid FROM aliases where alias = '%u';
#default_pass_scheme = PLAIN #default_pass_scheme = PLAIN-MD5 default_pass_scheme = CRYPT --8<--
My NON-working DB entry is: --8<-- maildb-> default_pass_scheme = CRYPT maildb-> select * from aliases where alias = 'marc@test.com'; ERROR: parser: parse error at or near "#" maildb=> ; maildb=> select * from aliases where alias = 'marc@test.com'; alias | maildir | password | locked ---------------+------------------------+----------------------------------- -+-------- marc@test.com | test.com/marc/Maildir/ | $1$JJN5H82p$yKs5jnb/csQVYsZZ/4WFS0 | f (1 row) --8<--
and the one that IS working: --8<-- maildb=> select * from aliases where alias = 'maikel@test.com'; alias | maildir | password | locked -----------------+--------------------------+------------------------------- ------------+-------- maikel@test.com | test.com/maikel/Maildir/ | {CRYPT}$1$JJN5H82p$yKs5jnb/csQVYsZZ/4WFS0 | f (1 row) --8<--
Both strings are crypted versions of 'qwerty'
Thank you,
Maikel Verheijen
On Fri, 2003-04-04 at 00:54, Maikel Verheijen wrote:
$1$JJN5H82p$yKs5jnb/csQVYsZZ/4WFS0 | f
Oh, you're using MD5 passwords. If password begins with "$1$", Dovecot assumes it's MD5 and handles it internally instead of via crypt(). And their internal handling was buggy, fixed in CVS now.
On 4 Apr 2003, Timo Sirainen wrote:
$1$JJN5H82p$yKs5jnb/csQVYsZZ/4WFS0 | f Oh, you're using MD5 passwords. If password begins with "$1$", Dovecot assumes it's MD5 and handles it internally instead of via crypt(). And
On Fri, 2003-04-04 at 00:54, Maikel Verheijen wrote: their internal handling was buggy, fixed in CVS now.
No stupid configuration mistake? ;-)
Andy
-- Andreas Aardal Hanssen http://www.andreas.hanssen.name/gpg
participants (3)
-
Andreas Aardal Hanssen
-
Maikel Verheijen
-
Timo Sirainen