

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
7 messages in net.sourceforge.lists.courier-sqwebmailRe: [sqwebmail] unable to login using...| From | Sent On | Attachments |
|---|---|---|
| Julian Grunnell | Jul 25, 2007 3:11 am | |
| Brian Candler | Jul 25, 2007 12:40 pm | |
| Julian Grunnell | Jul 26, 2007 7:01 am | |
| Brian Candler | Jul 26, 2007 7:28 am | |
| Brian Candler | Jul 26, 2007 7:39 am | |
| Julian Grunnell | Jul 27, 2007 1:05 am | |
| Brian Candler | Jul 27, 2007 4:32 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [sqwebmail] unable to login using mysql authentication | Actions... |
|---|---|---|
| From: | Julian Grunnell (juli...@pipex.net) | |
| Date: | Jul 26, 2007 7:01:51 am | |
| List: | net.sourceforge.lists.courier-sqwebmail | |
Hi - thanks Brian, much appreciated. And almost there now. The final part I believe I'm struggling with is the MYSQL_UID_FIELD & MYSQL_GUID_FIELD - what are these? I know the comment in the authmysqlrc file it says "numerical userid of the account" / "groupid of the account" but still doesn'y make sense - what account is it referring to?
The maillog now shows:
Jul 26 14:45:40 wm01 authdaemond: received auth request, service=webmail, authtype=login Jul 26 14:45:40 wm01 authdaemond: authmysql: trying this module Jul 26 14:45:41 wm01 authdaemond: SQL query: SELECT username, "", password, 8, 12, home, "", "", "", "" FROM mailboxes WHERE username = "foolsgold-rob" Jul 26 14:45:41 wm01 authdaemond: authmysql: sysusername=<null>, sysuserid=8, sysgroupid=12, homedir=/fs/home/37/f/o/foolsgold/users/rob, address=foolsgold-rob, fullname=<null>, maildir=<null>, quota=<null>, options=<null> Jul 26 14:45:41 wm01 authdaemond: authmysql: clearpasswd=q1w2e3, passwd=<null> Jul 26 14:45:41 wm01 authdaemond: Authenticated: sysusername=<null>, sysuserid=8, sysgroupid=12, homedir=/fs/home/37/f/o/foolsgold/users/rob, address=foolsgold-rob, fullname=<null>, maildir=<null>, quota=<null>, options=<null> Jul 26 14:45:41 wm01 authdaemond: Authenticated: clearpasswd=d1u2e3, passwd=<null> Jul 26 14:45:41 wm01 sqwebmaild: foolsgold-rob: chdir(/fs/home/37/f/o/foolsgold/users/rob) failed!! Jul 26 14:45:41 wm01 sqwebmaild: error: Permission denied Jul 26 14:45:41 wm01 sqwebmaild: authentication error: Permission denied Jul 26 14:45:41 wm01 sqwebmaild: LOGIN FAILED, user=foolsgold-rob, ip=[212.103.233.1]
The users Maildir is accessed vi an NFS share, which is available.
[root@wm01 home]# cd /fs/home/37/f/o/foolsgold/users/rob [root@wm01 rob]# ls Maildir
So I'd say it's "failed!!" & getting "Permission denied" because the UID & GID paramaters I've set are wrong, but not sure what they should be.
Thanks - Julian.
-----Original Message----- From: Brian Candler [mailto:B.Ca...@pobox.com] Sent: 25 July 2007 20:41 To: Julian Grunnell Cc: cour...@lists.sourceforge.net Subject: Re: [sqwebmail] unable to login using mysql authentication
On Wed, Jul 25, 2007 at 11:12:21AM +0100, Julian Grunnell wrote:
So my understanding is that the "/usr/local/etc/authlib/authmysqlrc" file needs to have a specific "MYSQL_SELECT_CLAUSE" defined, but it is this that I cannot seem to get right.
No, you don't need to set MYSQL_SELECT_CLAUSE for a simple table like yours.
However, if you do decide to use MYSQL_SELECT_CLAUSE, then your query must return exactly 10 columns, as documented in authmysqlrc. These are
username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname, options
And if you look at the example, you can see that you can use '' to return an empty string for values which you don't have.
However, it will probably be easier in your case just to leave MYSQL_SELECT_CLAUSE unset, and instead use the individual column settings:
MYSQL_CLEAR_PWFIELD password MYSQL_UID_FIELD '1234' # change this to your chosen mail uid MYSQL_GID_FIELD '1234' MYSQL_LOGIN_FIELD username MYSQL_HOME_FIELD home
Then authmysql will build the appropriate SQL query itself.
When that's working you might also want to play with MYSQL_WHERE_CLAUSE, e.g. to only allow access for accounts where suspended='N'
HTH,
Brian.







