[vchkpw] read DB vs. write / update DB - Qmail, Vpopmail (authvchkpw Mysql replication), Courier-pop3d
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. qmail-1.03 vpopmail-5.4.6 courier-imap-4.0.1 courier-authlib-0.55 MySQL replication is set up with a remote Master server for writes/updates, and a localSlave server for authentication reads. This setupworks 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 boththe read and the write MySQL servers have persistent connections opened up (user: vpopsqluser, table: vpopmail ) after checking mail once via POP3. The 'last query' timeon 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 DBlocalhost|0|vpopsqluser|password|vpopmail# Write DBauth.homes.com|3306|vpopsqluser|password|vpopmail 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 theremaining 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 fineusing just: localhost|0|vpopsqluser|password|vpopmail or just: auth.homes.com|3306|vpopsqluser|password|vpopmail or both localhost|0|vpopsqluser|password|vpopmail auth.homes.com|3306|vpopsqluser|password|vpopmail 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-authlibwith 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 familiarin how they all operate together too. To me this looks to be more of a Courier issue, in howvchkpw 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)
Re: [vchkpw] read DB vs. write / update DB - Qmail, Vpopmail (authvchkpw Mysql replication), Courier-pop3d
On Friday 20 May 2005 09:48 am, Shane Metler wrote: 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. qmail-1.03 vpopmail-5.4.6 courier-imap-4.0.1 courier-authlib-0.55 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. all vpopmail processes are short lived. If there is an open mysql connection for any reason for more than about 3 seconds, there's a bug. I would recommend upgrading to a newer version, as I believe this bug has been squashed. Then again, I would also recommend removing gentoo's qmail ebuilds and installing it by hand.. but that's a discussion for another day. -Jeremy -- Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc. [EMAIL PROTECTED] ++ inter7.com ++ 866.528.3530 ++ 815.776.9465 int'l kitchen @ #qmail #gentoo on EFnet IRC ++ scriptkitchen.com/qmail GnuPG Key ID: 481BF7E2 ++ jabber:[EMAIL PROTECTED] pgpKzVQb5LbEZ.pgp Description: PGP signature
RE: [vchkpw] read DB vs. write / update DB - Qmail, Vpopmail (authvchkpw Mysql replication), Courier-pop3d
-Original Message- From: Jeremy Kitchen [mailto:[EMAIL PROTECTED] Sent: Friday, May 20, 2005 8:27 AM To: vchkpw@inter7.com Subject: Re: [vchkpw] read DB vs. write / update DB - Qmail, Vpopmail (authvchkpw Mysql replication), Courier-pop3d On Friday 20 May 2005 09:48 am, Shane Metler wrote: 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. qmail-1.03 vpopmail-5.4.6 courier-imap-4.0.1 courier-authlib-0.55 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. all vpopmail processes are short lived. If there is an open mysql connection for any reason for more than about 3 seconds, there's a bug. I would recommend upgrading to a newer version, as I believe this bug has been squashed. Then again, I would also recommend removing gentoo's qmail ebuilds and installing it by hand.. but that's a discussion for another day. -Jeremy -- Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc. [EMAIL PROTECTED] ++ inter7.com ++ 866.528.3530 ++ 815.776.9465 int'l kitchen @ #qmail #gentoo on EFnet IRC ++ scriptkitchen.com/qmail GnuPG Key ID: 481BF7E2 ++ jabber:[EMAIL PROTECTED] I too have seen this behavior. Running vpopmail 5.4.7 with everything built from source. I am still using courier 3.0.8, so I believe this issue to be in vpopmail somewhere, most likely vchkpw. I do not have logging going to the mysql server, so in essence there should be no need to write. It is frustrating to have a cluster built using replication and then still have a single point of failure. If my mysql master goes down for whatever reason, then it doesn't matter how many other hosts I have to handle requests or how solid my file server is, authentication will fail and my users can't get in. I have not seen any notes in the change logs about this being fixed or else I just flat out missed it. Can't say that I have problems with persistent connections, however, I would like to see true use of the read/write setup. Would be happy to supply more info. Brian
Re: [vchkpw] read DB vs. write / update DB - Qmail, Vpopmail (authvchkpw Mysql replication), Courier-pop3d
On May 20, 2005, at 7:48 AM, Shane Metler wrote: 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). One idea, do you have logging enabled? Or maybe it needs to update the lastauth time on the account? -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ You don't need a laptop to troubleshoot high-speed Internet: sniffter.com
RE: [vchkpw] read DB vs. write / update DB - Qmail, Vpopmail (authvchkpw Mysql replication), Courier-pop3d
Hi there, The persistent connections are part of newer Courier-authlib, I don't think it's a bug, but a feature. The SMTP AUTH connection (handled directly by vchkpw in my setup) is as you described, a quick 1/4 second connection that disappears from the MySQL processlist immediately. Courier-authlib, using vchkpw, is what is sending queries to both MySQL servers. I too have Vpopmail configured to log to files, and not to MySQL. Auth_logging is on, but should be sent to syslog I suppose I should send this issue to the Courier list. Hopefully they can add more insight as to how courier-authlib uses vchkpw and the two MySQL connection strings available in vpopmail.mysql. vpopmail directory = /var/vpopmail uid = 89 gid = 89 roaming users = OFF --disable-roaming-users (default) password learning = OFF --disable-learn-passwords (default) md5 passwords = ON --enable-md5-passwords (default) file locking = ON --enable-file-locking (default) vdelivermail fsync = ON --enable-file-sync make seekable = ON --enable-make-seekable (default) clear passwd = ON --enable-clear-passwd (default) user dir hashing = ON --enable-users-big-dir (default) address extensions = ON --enable-qmail-ext ip alias = OFF --disable-ip-alias-domains (default) domain quotas = ON --enable-domainquotas auth module = mysql --enable-auth-module=mysql mysql replication = ON --enable-mysql-replication mysql logging = OFF --disable-mysql-logging (default) mysql limits = OFF --disable-mysql-limits (default) MySQL valias = OFF --disable-valias (default) auth inc = -I/usr/include/mysql auth lib = -L/usr/lib/mysql -lmysqlclient -lz -lm system passwords = OFF --disable-passwd (default) pop syslog = show successful and failed login attempts --enable-logging=y auth logging = ON --enable-auth-logging (default) all domains in one SQL table = --enable-many-domains (default) -Original Message- From: Jeremy Kitchen [mailto:[EMAIL PROTECTED] Sent: Friday, May 20, 2005 8:27 AM To: vchkpw@inter7.com Subject: Re: [vchkpw] read DB vs. write / update DB - Qmail, Vpopmail (authvchkpw Mysql replication), Courier-pop3d On Friday 20 May 2005 09:48 am, Shane Metler wrote: 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. qmail-1.03 vpopmail-5.4.6 courier-imap-4.0.1 courier-authlib-0.55 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. all vpopmail processes are short lived. If there is an open mysql connection for any reason for more than about 3 seconds, there's a bug. I would recommend upgrading to a newer version, as I believe this bug has been squashed. Then again, I would also recommend removing gentoo's qmail ebuilds and installing it by hand.. but that's a discussion for another day. -Jeremy -- Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc. [EMAIL PROTECTED] ++ inter7.com ++ 866.528.3530 ++ 815.776.9465 int'l kitchen @ #qmail #gentoo on EFnet IRC ++ scriptkitchen.com/qmail GnuPG Key ID: 481BF7E2 ++ jabber:[EMAIL PROTECTED] I too have seen this behavior. Running vpopmail 5.4.7 with everything built from source. I am still using courier 3.0.8, so I believe this issue to be in vpopmail somewhere, most likely vchkpw. I do not have logging going to the mysql server, so in essence there should be no need to write. It is frustrating to have a cluster built using replication and then still have a single point of failure. If my mysql master goes down for whatever reason, then it doesn't matter how many other hosts I have to handle requests or how solid my file server is, authentication will fail and my users can't get in. I have not seen any notes in the change logs about this being fixed or else I just flat out missed it. Can't say that I have problems with persistent connections, however, I would like to see true use of the read/write setup. Would be happy to supply more info. Brian