Hi all,

        Here's a good Monday mystery for everbody.  I am having some
weird authentication issues with vpopmail and Courier IMAP (using the
authvchkpw module.)  Let me explain my setup:

        I'm running FreeBSD 5.0-RELEASE, qmail 1.03, vpopmail 5.2.1,
MySQL, and Courier IMAP.  (I installed qmail and vpopmail manually,
MySQL came out of the FreeBSD ports collection, and I've tried both the
FreeBSD port of Courier *and* compiling the latest from the Courier site
myself, with same result.)  At any rate, I also have qmail-pop3d running
and users can authenticate there just fine.

        However, when someone tries to login using IMAP, sometimes it
works, sometimes it doesn't.  I've tried this with and without MySQL (at
first with it, and then I disabled MySQL for everything and used
vconvert to get non-MySQL stuff running, and had the same results.)
Here is what a snippet of MySQL logs show:

75 Query       select pw_name, pw_passwd, pw_uid, \
pw_gid, pw_gecos, pw_dir, pw_shell , pw_clear_passwd from vpopmail \
where pw_name = "carrir" and pw_domain = "xxxxxxxxxxxxxxxxxxx.com" 

(There is actually a domain name there, just masked it for user privacy
and anti-spam reasons. <g>  Also, the \'s I added for E-Mail purposes,
to show that this was all on one line.)

        This is what sometimes happens when a user tries to login
through IMAP.  In this example, someone tries to login to IMAP as
[EMAIL PROTECTED] ... you'd think this would break down to
using 'pw_name = "carri"' but it doesn't.  Somehow, an "r" ends up after
the username.  However, it's not always an "r" .. it can be an "e" or
any other character.

        I've also tried telnetting to port 143 and issuing the login
command (* LOGIN [EMAIL PROTECTED] herpassword) to get in,
and I get an authentication failure (with the same mysql query logs

        So ... does anyone have any ideas why random spurious
characters would show up sometimes like that?  I have this same type of
setup working flawlessly on a Red Hat 7.3 box.  If it comes down to it,
I can install Slackware or Debian on this new mail server instead of
FreeBSD, but I'd prefer to use FreeBSD as it seems to scale better.
(We're doing antivirus and spam filtering on this thing, so scalability
is important.)

        Just hoping someone's ran into / seen this before and can give
me a heads up as to how to fix it.  I've been pulling my hair out for a
few days now recompiling, hacking code, etc. trying to figure out where
this is going wrong, with no luck. :(  Any ideas? :)

                Jeremy :)

Jeremy Gault                 <[EMAIL PROTECTED]>
Network Administrator / MIS, WinWorld Corporation
(v) 4237-473-8084 // (f) 423-472-9465

Reply via email to