[imp] Authentication against MySQL Database

Darron Froese darron@froese.org
Thu, 07 Dec 2000 19:32:13 -0700


On 12/7/00 7:25 PM, "Evans, Tim" <Tim_Evans@troweprice.com> wrote:

> We already have all the userid's and passwords for the
> portal site in MySQL and would like to let users log into
> their IMP/Webmail accounts with the same password.
> 
> I believe Cyrus/SASL authentication using PAM may be one way of doing this,
> but would hope this is a wheel someone else has already invented.

It sure is - get the pam_mysql module from Sourceforge and you're all set.
Then compile Cyrus/SASL with PAM support. Then you set your imap server to
authenticate against your mysql db and that's all you need.
-- 
Darron
darron@froese.org



>From chuck@horde.org Date: Thu,  7 Dec 2000 22:50:53 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 68284 invoked from network); 8 Dec 2000 03:51:56 -0000
Received: from r94aag005136.sbo-smr.ma.cable.rcn.com (HELO marina.horde.org) (146.115.120.202)
  by horde.org with SMTP; 8 Dec 2000 03:51:56 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 986F13CB3; Thu,  7 Dec 2000 22:50:53 -0500 (EST)
Received: from 192.168.0.1 ( [192.168.0.1])
	as user chuck@marina by nirgal.your.mom with HTTP;
	Thu,  7 Dec 2000 22:50:53 -0500
Message-ID: <976247453.3a305a9d5eecd@nirgal.your.mom>
Date: Thu,  7 Dec 2000 22:50:53 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: imp@lists.horde.org
References: <001301c060bd$ac4bd430$303688d1@em.ocs>
In-Reply-To: <001301c060bd$ac4bd430$303688d1@em.ocs>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.6-cvs
Subject: Re: [imp] Remote_login.php3

Quoting Tracy Bost <tbost@ifarm.com>:

> After allowing a user to create an account, it seems when they are
> re-directed to the remote_login.php3 file to access email for the first
> time,imp isn't recognizing the username/password variables to start the
> session. The user has to re enter the username/password. After the first
> time, if the user is using the same pc & browser, remote_logn works and the
> session is started  fine with the posted variables. Outside of it being just
> a minor inconvience for the user, I was wondering why this may be happening
> before I dug into it too much.

You may be using remote_login.php3 incorrectly. You'll have to post some more
details - it works for some people.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"If you can't stand the heat, get out of the chicken!" - Baby Blues


>From chuck@horde.org Date: Thu,  7 Dec 2000 22:53:04 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 69004 invoked from network); 8 Dec 2000 03:53:47 -0000
Received: from r94aag005136.sbo-smr.ma.cable.rcn.com (HELO marina.horde.org) (146.115.120.202)
  by horde.org with SMTP; 8 Dec 2000 03:53:47 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id CF0013CB3; Thu,  7 Dec 2000 22:53:04 -0500 (EST)
Received: from 192.168.0.1 ( [192.168.0.1])
	as user chuck@marina by nirgal.your.mom with HTTP;
	Thu,  7 Dec 2000 22:53:04 -0500
Message-ID: <976247584.3a305b208f15a@nirgal.your.mom>
Date: Thu,  7 Dec 2000 22:53:04 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: imp@lists.horde.org
References: <7CE1EE1A3A42D411893200A0C98A39C002EE004C@tc360.troweprice.com>
In-Reply-To: <7CE1EE1A3A42D411893200A0C98A39C002EE004C@tc360.troweprice.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.6-cvs
Subject: Re: [imp] Authentication against MySQL Database

Quoting "Evans, Tim" <Tim_Evans@troweprice.com>:

> Or, if IMP folks have already done this sort of thing with some other
> means, I'd like to hear about that, too.  Best of all possible
> worlds would be a single login to both the portal site and IMP.

It would be useful to know which version of IMP you are using. As other people
have said, getting IMP to auth against the mysql db is just a matter of having
Cyrus do the same, which is done through PAM. Sharing the login is quite
possible if the IMP you are using is recent: if you have imp/remote_login.php3,
read the source for it and you should see how you can use it to set up an IMP
session. Just check for an existing portal login there, and assuming you can get
a user's password from somewhere, set up the session, and you're set.

If you add a similar piece to your portal login code to check for IMP sessions,
you can make it go both ways.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"If you can't stand the heat, get out of the chicken!" - Baby Blues