[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IMAP and MySQL?



I agree with you on keeping the username and domain in two separate fields.
I found after upgrading the Courier IMAP package to the latest version, I
can specify a custom SELECT query in the authmysqlrc file that allows it to
work flawlessly (so far) with qmail-sql.  The section of the config where I
specify the custom select query is called MYSQL_SELECT_CLAUSE.  The query I
used is as follows:

SELECT passwd.login, passwd.password, passwd.uid, passwd.gid, '',
passwd.home,
'', passwd.hardquota, '' from passwd WHERE passwd.login = '$(local_part)'
AND
passwd.virtual_host = '$(domain)' AND passwd.enabled = '1' or passwd.enabled
is NULL

One could also add the startdate and stopdate columns into the query.