[tpop3d-discuss] auth_mysql trouble

Mark Moseley mmoseley at bizland-inc.com
Wed, 19 Dec 2001 09:36:14 -0800


I was a little curious myself as to why it was the case that you needed a
domain to get auth-mysql to run. I figured it out only after poking through
the auth-mysql code and adding liberal error reporting and finally noticed
the statement: if (domain == user || !*domain) return NULL; when the light
went on. But I still wondered as to why it was the case. Might be a good FAQ
entry, esp. for people who fire up tpop3d and just telnet to port 110 to
test it out.

----- Original Message -----
From: "Chris Lightfoot" <chris@ex-parrot.com>
To: "Dmitry Nemtchinov" <dima@nival.com>
Cc: <tpop3d-discuss@lists.beasts.org>
Sent: Wednesday, December 19, 2001 5:09 AM
Subject: Re: [tpop3d-discuss] auth_mysql trouble


> On Wed, Dec 19, 2001 at 03:39:13PM +0300, Dmitry Nemtchinov wrote:
> >
> > > -----Original Message-----
> > > From: Chris Lightfoot [mailto:chris@ex-parrot.com]
> > > Sent: Wednesday, December 19, 2001 3:16 PM
> > > >
> > > > I am using "dmitry.nemtchinov" as login and, for
> > > example "dnlogin" as
> > > > password.
> > > >
> > > > I can give you an answer for a query, that was in my
> > > tpop3d.conf file from
> > > > MySQL. It's a result of typing this query in mysql shell:
> > > >
> > > > mysql> SELECT
> > > >
> > > '','/var/mail/$(localpart)',CONCAT('{plaintext}',user.Password
> > > ),user.User
> > > > FROM user WHERE user.User='dmitry.nemtchinov';
> > >
> > > Ah. Are you trying to use this in a virtual domains
> > > setting?
> >
> > No. I don't want to use virual domains. I have to made logins
consistinng
> > of two parts, name and surname, like 'dmitry.nemtchinov' in my case. I
want
> > to use only one domain. For example 'nival.com'. But there are no
domains
> > defined in my tpop3d.conf.
>
> OK. The best idea is probably to assign a domain to the
> listening address and switch on append-domain. This will
> make tpop3d try the authentication with
> `dmitry.nemtchinov@some.domain', which means that
> auth-mysql will actually have a go at authenticating that
> way. The SQL statement need not actually reference the
> domain.
>
> Since you're not using virtual domains, it might be easier
> just to use Unix user authentication. Or you could write a
> perl authenticator to do what you want.
>
> --
>  ``If one is sailing on the Titanic, it is best to live in a lifeboat.''
>  (Danish minister, on exchange-rate policy)
>
> _______________________________________________
> tpop3d-discuss mailing list
> tpop3d-discuss@lists.beasts.org
> http://lists.beasts.org/mailman/listinfo/tpop3d-discuss
>