5 messages in net.sourceforge.lists.courier-sqwebmailRe: [sqwebmail] Bug Report: sqwebmail...
FromSent OnAttachments
XantiusFeb 12, 2005 7:21 pm 
Brian CandlerFeb 13, 2005 2:00 am 
Brian CandlerFeb 13, 2005 3:37 am 
XantiusFeb 13, 2005 7:24 am 
Brian CandlerFeb 14, 2005 1:15 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [sqwebmail] Bug Report: sqwebmail can't change passwords in mysql dbActions...
From:Xantius (xant@xantius.com)
Date:Feb 13, 2005 7:24:09 am
List:net.sourceforge.lists.courier-sqwebmail

Well, after the previously thorough tongue lashing, I'm feeling much better, thank you. You are correct, and I tried what I knew of debugging and asking other courier users, so don't think I came in just accusing without cause. In any case, it turns out that when I reinstalled, I didn't give my mysql user update permissions. The proper query WAS being sent, so watching debug stuff wasn't helping much. But after updating the permissions, it worked immediately. Thank you for the help. I think this may help someone from making the same mistake in the future.

Brian Candler wrote:

On Sun, Feb 13, 2005 at 10:00:44AM +0000, Brian Candler wrote:

I trust you have noticed that authmysqlrc has a section labelled "MYSQL_CHPASS_CLAUSE:0" which is COMMENTED OUT in the default configuration. That means you have to do some work yourself to make password changing happen, by writing a SQL clause which is appropriate to your particular database schema.

I've just checked the source. To be more precise, if you leave this item commented out, then a default update query will be sent, something along the lines of:

UPDATE <MYSQL_USER_TABLE> SET <MYSQL_CLEAR_PWFIELD>='newpass', -- if MYSQL_CLEAR_PWFIELD set <MYSQL_CRYPT_PWFIELD>='cryptedpass' -- if MYSQL_CRYPT_PWFIELD set WHERE <MYSQL_LOGIN_FIELD or id>='userame' AND <MYSQL_WHERE_CLAUSE> -- if MYSQL_WHERE_CLAUSE set

Turning on authentication debugging should show exactly what it sends, and therefore whether there is a problem with the code or with your authmysql configuration.

I can see one potential problem - there may be a spurious comma in the query if you are using MYSQL_CLEAR_PWFIELD without MYSQL_CRYPT_PWFIELD.