Hello all.
I'm trying to get Courier to authenticate against a Drupal MySQL database. As
Drupal uses PHP's MD5 to encrypt passwords, my first question is this: is
PHP's MD5 encryption compatible with Courier's authentication schemes?
What I've done is use the MYSQL_SELECT_CLAUSE option to specify the select
query with the crypt field being set to:
CONCAT('{MD5}', users.pass)
Here's the entire query:
MYSQL_SELECT_CLAUSE<tab>SELECT users.mail, CONCAT('{MD5}', users.pass), '',
5000, 5000,
CONCAT('/var/spool/mail/virtual/',SUBSTRING_INDEX(users.mail,'@',-1),'/',SUBSTRING_INDEX(users.mail,'@',1),'/'),
CONCAT('/var/spool/mail/virtual/',SUBSTRING_INDEX(users.mail,'@',-1),'/',SUBSTRING_INDEX(users.mail,'@',1),'/'),
'', '', ''
FROM users WHERE users.mail = '$(local_part)@$(domain)' AND (users.status=1)
All of that is on one line in my authmysqlrc file. I tried it both that way
and with every part on separate lines as the examples demonstrate with the
same results. (The log messages are easier to read with the query on one
line.) The query seems to be executing correctly, as the hash that is pulled
from the database is the correct one, but I get a password not matched error,
like so:
mail authdaemond: supplied password 'password' does not match encrypted
password '{MD5}283581d9ae7793e1e906c0672a015d0b'
So my second question is am I constructing the query correctly?
The thing I noticed in that error I get shows the supplied password in plain
text and the checked password as the encrypted hash. And so my third
question is, am I getting that output because I have incorrectly configured
my authentication and am trying to authenticate with the wrong encryption
scheme, or is that the way it's supposed to look? As I have only used clear
text password storage in the past, I'm not sure how it's supposed to look.
Thank you for any assistance offered.
--
Jason Flatt
Father of Six: http://www.flattfamily.com/ (Joseph, 13; Cramer, 11; Travis,
9; Angela; Harry, 5; and William, 12:04 am, 12-29-2005)
Linux User: http://www.sourcemage.org/
Drupal Fanatic: http://drupal.org/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users