2 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Authenticating of...
FromSent OnAttachments
Darryl HarveySep 18, 2007 8:27 am 
Lindsay HaisleySep 18, 2007 9:48 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: [courier-users] Authenticating off multiple MysQL Db's ? Is it possible?Actions...
From:Lindsay Haisley (fmou@fmp.com)
Date:Sep 18, 2007 9:48:01 am
List:net.sourceforge.lists.courier-users

I would suggest doing this at the database query level in authmysqlrc. You can set MYSQL_SELECT_CLAUSE to be just about any query you can come up with, as long as the basic criteria are met, mainly that the the query returns the appropriate number of fields. SQL query language is quite flexible and should provide you with the necessary ability to run an either/or query on two different databases assuming your permissions are properly set.

This feature is well documented in authmysqlrc, and although it's labeled EXPERIMENTAL it's been available through many versions of courier. I, for one, will be SOL if Sam ever decides to remove it from the code!

On Tue, 2007-09-18 at 08:27 -0700, Darryl Harvey wrote:

I have a requirement to authenticate POP and IMAP users off two separate mysql databases using Courier IMAP.

I can get one working fine, it has been for ages, but we are consolidating two mail servers into one and the Database Schema's are different, and for a lot of other reasons we cannot merge the DB's into a single DB.

So we need to auth from either DB, if a valid user exists in either DB, grab their info and let them in.

Is it possible? is there any way to specify two instances of authmysql ?

Maybe I can use authmysql for one and authpam (using pammysql) for another (but if I use authpam, I would need to have the users directory path in /etc/passwd ?

Both DB's are in mysql, They can share the same DB username/password, but the DB, tables and fields are different. Can anyone point me int the right direction?