Title: Message
Hi list,
I have a Qmail cluster running, using Gentoo's patched versions of Qmail, vpopmail (using MySQL replication), Courier-imap, and then Courier-authlib linked to authvchkpw for IMAP & POP3 authentication.
MySQL replication is set up with a remote Master server for writes/updates, and a local Slave server for authentication reads.
This setup works fine. MySQL is replicating, SMTP and POP3 authentication is working, and all mail delivery is fine ... On the surface there are no issues with these mail servers.
But I noticed (while testing POP3 connections) that both the read and the write MySQL servers have persistent connections opened up (user: vpopsqluser, table: vpopmail ) after checking mail once via POP3.  The 'last query' time on both MySQL servers match the last POP3 request, so the theoretically *read only* POP3 authentication is hitting *both* the read and the write MySQL servers set in vpopmail.mysql ?  I would expect only the read only Slave would have a persistent connection opened, because POP3 authentication should be a read only operation (and there is no other traffic on this test box besides my testing). 
# My vpopmail.mysql file
# Read-only DB
# Write DB
In troubleshooting this, I am able to comment out either one of the MySQL connection strings from the vpopmail.mysql configuration file, and everything continues to work fine ... So I don't think this is the, 'Vpopmail can't connect to the first DB, so it tries the second DB' behavior.  Which ever MySQL connection string I comment out, vpopmail and courier begin using the remaining connection string for both read and write queries. In this case, the persistent MySQL connection only shows up on the one MySQL server that vpopmail is configured to use.  This of course reads and writes to that one DB, which defeats the MySQL replication.
In summary, authentication & mail delivery work fine using just:
or just: 
or both
BUT when using both connections, both DBs have persistent connections opened that get hit with queries for what should be a read only POP3 authentication?
I am at a real loss as to why courier-authlib with authvchkpw connects to both the read only and update/write database for pop3 authentication connections.  Has anyone else run into this kind of behavior? I've searched Google & searched the mailing lists for Courier and Vpopmail, and have read through the docs for the programs, and have found very little information about this topic.
P.S.  I'm not new to these programs, and feel some what familiar in how they all operate together too.  To me this looks to be more of a Courier issue, in how vchkpw is used by Courier's authlib. Authlib seems to be opening the persistent MySQL connections.  Unfortunately Courier's mailing list seems to tar & feather Vpopmail questions.  And I know a lot of this Vpopmail list use both MySQL replication and Courier.
Thanks in advance,
Shane Metler
(vpopmail OR vchkpw OR authvchkpw) AND (read OR write OR replication)

Reply via email to