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?

-- 
Lindsay Haisley       | "In an open world,    |     PGP public key
FMP Computer Services |    who needs Windows  |      available at
512-259-1190          |      or Gates"        | http://pubkeys.fmp.com
http://www.fmp.com    |                       |


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to