The following bug has been RESOLVED. ====================================================================== http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0000221 ====================================================================== Reported By: xing Assigned To: aaron ====================================================================== Project: DBMail Bug ID: 221 Category: POP3 daemon Reproducibility: always Severity: feature Priority: normal Status: resolved Resolution: fixed ====================================================================== Date Submitted: 21-Jun-05 16:44 CEST Last Modified: 23-Jul-05 06:51 CEST ====================================================================== Summary: POP3 daemon can't connect to mysql but dbmail-smtp injects emails fine.. Description: After upgrading to 2.1.1, dbmail-smtp injects emails just fine but pop3 and imap daemon both chockes on init. Apparently the init db check fails breaking the startup. Since dbmail-smtp and dbmail-pop3d both use the same config/libraries, not sure why the db check fails.
--here it the trace 5 dump when pop3 daemon is started -- Jun 21 07:39:55 mail dbmail/pop3d[20975]: server.c,dm_socket: socket created Jun 21 07:39:55 mail dbmail/pop3d[20975]: server.c,dm_bind_and_listen: socket bound and listening Jun 21 07:39:55 mail dbmail/pop3d[20975]: server.c,CreateSocket: socket complete Jun 21 07:39:55 mail dbmail/pop3d[20977]: dbmysql.c,db_query: executing query [SELECT 1=1 FROM dbmail_physmessage LIMIT 1 OFFSET 0] Jun 21 07:39:55 mail dbmail/pop3d[20977]: dbmysql.c,db_query: executing query [SELECT 1=1 FROM dbmail_headervalue LIMIT 1 OFFSET 0] Jun 21 07:39:55 mail dbmail/pop3d[20978]: pool.c,child_register: register child [20978] Jun 21 07:39:55 mail dbmail/pop3d[20978]: pool.c,child_register: initializing child_state [20978] using slot [0] Jun 21 07:39:55 mail dbmail/pop3d[20978]: serverchild.c,CreateChild: signal handler placed, going to perform task now Jun 21 07:39:55 mail dbmail/pop3d[20978]: serverchild.c,PerformChildTask: waiting for connection Jun 21 07:39:55 mail dbmail/pop3d[20978]: pool.c,child_reg_disconnected: [20978] Jun 21 07:39:55 mail dbmail/pop3d[20979]: pool.c,child_register: register child [20979] Jun 21 07:39:55 mail dbmail/pop3d[20979]: pool.c,child_register: initializing child_state [20979] using slot [1] Jun 21 07:39:55 mail dbmail/pop3d[20979]: serverchild.c,CreateChild: signal handler placed, going to perform task now Jun 21 07:39:55 mail dbmail/pop3d[20979]: serverchild.c,PerformChildTask: waiting for connection Jun 21 07:39:55 mail dbmail/pop3d[20979]: pool.c,child_reg_disconnected: [20979] Jun 21 07:39:55 mail dbmail/pop3d[20980]: pool.c,child_register: register child [20980] Jun 21 07:39:55 mail dbmail/pop3d[20980]: pool.c,child_register: initializing child_state [20980] using slot [2] Jun 21 07:39:55 mail dbmail/pop3d[20980]: serverchild.c,CreateChild: signal handler placed, going to perform task now Jun 21 07:39:55 mail dbmail/pop3d[20980]: serverchild.c,PerformChildTask: waiting for connection Jun 21 07:39:55 mail dbmail/pop3d[20980]: pool.c,child_reg_disconnected: [20980] Jun 21 07:39:55 mail dbmail/pop3d[20981]: pool.c,child_register: register child [20981] Jun 21 07:39:55 mail dbmail/pop3d[20981]: pool.c,child_register: initializing child_state [20981] using slot [3] Jun 21 07:39:55 mail dbmail/pop3d[20981]: serverchild.c,CreateChild: signal handler placed, going to perform task now Jun 21 07:39:55 mail dbmail/pop3d[20981]: serverchild.c,PerformChildTask: waiting for connection Jun 21 07:39:55 mail dbmail/pop3d[20981]: pool.c,child_reg_disconnected: [20981] Jun 21 07:39:55 mail dbmail/pop3d[20982]: pool.c,child_register: register child [20982] Jun 21 07:39:55 mail dbmail/pop3d[20982]: pool.c,child_register: initializing child_state [20982] using slot [4] Jun 21 07:39:55 mail dbmail/pop3d[20982]: serverchild.c,CreateChild: signal handler placed, going to perform task now Jun 21 07:39:55 mail dbmail/pop3d[20982]: serverchild.c,PerformChildTask: waiting for connection Jun 21 07:39:55 mail dbmail/pop3d[20982]: pool.c,child_reg_disconnected: [20982] Jun 21 07:39:55 mail dbmail/pop3d[20977]: server.c,StartServer: starting main service loop Jun 21 07:39:55 mail dbmail/pop3d[20977]: dbmysql.c,db_check_connection: no database connection, trying to establish on. ====================================================================== ---------------------------------------------------------------------- mobrien9279 - 21-Jun-05 18:06 CEST ---------------------------------------------------------------------- I find that LMTPD ALSO Functions persistantly as well as SMTPd but not IMAPD nor POP3D (This is FBSD 5.4 Mysql 4.1.11 DBMAIL 2.1.1 with LDFLAGS added -lpthread and -L/usr/local/include to all Makefiles) NOTE: LMTPD connects to the database and functions normally NOTE: dbmail-imapd version $Revision: 1778 IMAPD tries database connection and waits while keeping children alive NOTE: dbmail-pop3d version $Revision: 1778 POP3D init fails then POP3D starts killing children and goes away as shown below... IMAPD ===== dbmail/imap4d[587]: server.c,dm_socket: socket created dbmail/imap4d[587]: server.c,dm_bind_and_listen: socket bound and listening dbmail/imap4d[587]: server.c,CreateSocket: socket complete dbmail/imap4d[590]: dbmysql.c,db_query: executing query [SELECT 1=1 FROM dbmail_physmessage LIMIT 1 OFFSET 0] dbmail/imap4d[590]: dbmysql.c,db_query: executing query [SELECT 1=1 FROM dbmail_headervalue LIMIT 1 OFFSET 0] dbmail/imap4d[610]: pool.c,child_register: register child [610] dbmail/imap4d[610]: pool.c,child_register: initializing child_state [610] using slot [0] dbmail/imap4d[610]: serverchild.c,CreateChild: signal handler placed, going to perform task now dbmail/imap4d[610]: serverchild.c,PerformChildTask: waiting for connection dbmail/imap4d[610]: pool.c,child_reg_disconnected: [610] dbmail/imap4d[614]: pool.c,child_register: register child [614] dbmail/imap4d[614]: pool.c,child_register: initializing child_state [614] using slot [1] dbmail/imap4d[614]: serverchild.c,CreateChild: signal handler placed, going to perform task now dbmail/imap4d[614]: serverchild.c,PerformChildTask: waiting for connection dbmail/imap4d[614]: pool.c,child_reg_disconnected: [614] dbmail/imap4d[617]: pool.c,child_register: register child [617] dbmail/imap4d[617]: pool.c,child_register: initializing child_state [617] using slot [2] dbmail/imap4d[617]: serverchild.c,CreateChild: signal handler placed, going to perform task now dbmail/imap4d[617]: serverchild.c,PerformChildTask: waiting for connection dbmail/imap4d[617]: pool.c,child_reg_disconnected: [617] dbmail/imap4d[623]: pool.c,child_register: register child [623] dbmail/imap4d[623]: pool.c,child_register: initializing child_state [623] using slot [3] dbmail/imap4d[623]: serverchild.c,CreateChild: signal handler placed, going to perform task now dbmail/imap4d[623]: serverchild.c,PerformChildTask: waiting for connection dbmail/imap4d[623]: pool.c,child_reg_disconnected: [623] dbmail/imap4d[631]: pool.c,child_register: register child [631] dbmail/imap4d[631]: pool.c,child_register: initializing child_state [631] using slot [4] dbmail/imap4d[631]: serverchild.c,CreateChild: signal handler placed, going to perform task now dbmail/imap4d[631]: serverchild.c,PerformChildTask: waiting for connection dbmail/imap4d[631]: pool.c,child_reg_disconnected: [631] dbmail/imap4d[637]: pool.c,child_register: register child [637] dbmail/imap4d[637]: pool.c,child_register: initializing child_state [637] using slot [5] dbmail/imap4d[637]: serverchild.c,CreateChild: signal handler placed, going to perform task now dbmail/imap4d[637]: serverchild.c,PerformChildTask: waiting for connection dbmail/imap4d[637]: pool.c,child_reg_disconnected: [637] dbmail/imap4d[642]: pool.c,child_register: register child [642] dbmail/imap4d[642]: pool.c,child_register: initializing child_state [642] using slot [6] etc... POP3d =====dbmail/pop3d[57015]: dbmysql.c,db_check_connection: no database connection, trying to establish on. dbmail/pop3d[57015]: dbmysql.c,db_connect: mysql_real_connect failed: Can't connect to MySQL server on '192.168.100.8' (61) dbmail/pop3d[57015]: dbmysql.c,db_check_connection: unable to connect to database. dbmail/pop3d[57015]: server.c,StartServer: entering sleep-mode until database is back again dbmail/pop3d[57015]: pool.c,manage_stop_children: General stop requested. Killing children.. dbmail/pop3d[57016]: serverchild.c,active_child_sig_handler: got signal [Terminated] dbmail/pop3d[57016]: serverchild.c,active_child_sig_handler: setting stop request dbmail/pop3d[57016]: serverchild.c,PerformChildTask: accept failed dbmail/pop3d[57016]: serverchild.c,PerformChildTask: stop requested dbmail/pop3d[57016]: pool.c,child_reg_disconnected: [57016] dbmail/pop3d[57016]: serverchild.c,disconnect_all: database connection still open, closing dbmail/pop3d[57016]: pool.c,child_unregister: child [57016] unregistered dbmail/pop3d[57015]: server.c,ParentSigHandler: got signal [Child exited] dbmail/pop3d[57015]: pool.c,scoreboard_release: pid [57016] dbmail/pop3d[57017]: serverchild.c,active_child_sig_handler: got signal [Terminated] dbmail/pop3d[57017]: serverchild.c,active_child_sig_handler: setting stop request dbmail/pop3d[57017]: serverchild.c,PerformChildTask: accept failed dbmail/pop3d[57017]: serverchild.c,PerformChildTask: stop requested AND NOTE: with processes all gone attempt restart dbmail/pop3d[598]: server.c,dm_socket: socket created dbmail/pop3d[598]: server.c,dm_bind_and_listen: Address already in use dbmail/pop3d[810]: server.c,dm_socket: socket created dbmail/pop3d[810]: server.c,dm_bind_and_listen: Address already in use ---------------------------------------------------------------------- mobrien9279 - 21-Jun-05 18:41 CEST ---------------------------------------------------------------------- dbmail-util Version: 2.1 $Revision: 1780 works fine, no connection issues dbmail-users Version: 2.1 $Revision: 1780 also connects fine ---------------------------------------------------------------------- paul - 21-Jun-05 21:28 CEST ---------------------------------------------------------------------- Xing, I'm most interested in the lines **right after** your log ends. All daemons share the same framework. The parent process (20977) preforks and goes into a main event-loop which checks the database connection every 10 seconds or so. If the database is down, all preforked children are shutdown until the database comes back; then they are preforked again and we're a happy family of processes. You say dbmail-pop3d chokes, but I see no signs of failure other than a problem with the database connection. I need more info... ---------------------------------------------------------------------- xing - 21-Jun-05 21:41 CEST ---------------------------------------------------------------------- Paul, the "no database connection" is the last log I can get out of the pop3d daemon even after waiting more than 10 seconds for the re-try. Telnet to port 110 gets rejected and I assume the daemon is in the wait/reject mode as you mentioned. Both dbmail-util and dbmail-smtp connect to the db fine and all the new add_* table scripts have been applied. Jun 21 12:37:40 mail dbmail/pop3d[23405]: serverchild.c,PerformChildTask: waiting for connection Jun 21 12:37:40 mail dbmail/pop3d[23405]: pool.c,child_reg_disconnected: [23405] Jun 21 12:37:40 mail dbmail/pop3d[23400]: server.c,StartServer: starting main service loop Jun 21 12:37:40 mail dbmail/pop3d[23400]: dbmysql.c,db_check_connection: no database connection, trying to establish on. Jun 21 12:38:00 mail dbmail/smtp[23464]: dbmail-message.c, sort_and_deliver: message id=2183925, size=3018 is inserted Jun 21 12:38:00 mail postfix/pipe[22263]: E04655E00AE: to=<[EMAIL PROTECTED]>, relay=dbmail, delay=1, status=sent (fanfiction.com) Jun 21 12:38:12 mail dbmail/smtp[23534]: dbmail-message.c, sort_and_deliver: message id=2183927, size=1970 is inserted Jun 21 12:38:12 mail postfix/pipe[22263]: 0795B5E0093: to=<[EMAIL PROTECTED]>, relay=dbmail, delay=1, status=sent (fanfiction.com) Jun 21 12:38:13 mail dbmail/smtp[23538]: dbmail-message.c, sort_and_deliver: message id=2183929, size=3043 is inserted Jun 21 12:38:14 mail postfix/pipe[22263]: E13275E0099: to=<[EMAIL PROTECTED]>, relay=dbmail, delay=1, status=sent (fanfiction.com) Jun 21 12:38:48 mail dbmail/smtp[23653]: dbmail-message.c, sort_and_deliver: message id=2183931, size=3210 is inserted Jun 21 12:38:48 mail postfix/pipe[22263]: BCFE15E0093: to=<[EMAIL PROTECTED]>, relay=dbmail, delay=0, status=sent (fanfiction.net) Jun 21 12:38:51 mail dbmail/smtp[23666]: dbmail-message.c, sort_and_deliver: message id=2183933, size=2921 is inserted Jun 21 12:38:51 mail postfix/pipe[22263]: 05CFD5E0099: to=<[EMAIL PROTECTED]>, relay=dbmail, delay=0, status=sent (fanfiction.com) Nothing happens after pop3d says no db connection and you can see dbmail-smtp works fine. ---------------------------------------------------------------------- dstilts - 23-Jun-05 18:03 CEST ---------------------------------------------------------------------- After downloading and installing 2.1.1 myself, I too run into the same exact problem with IMAPD (I don't offer POP access, so haven't tried that). The error's aren't all that descriptive, but here they are with TRACE=5. OS: FC3 MySQL: 4.0.20 Gmime: 2.1.9 Gllib: 2.4.8-1 ........... Jun 22 10:36:53 mail dbmail/imap4d[9120]: serverchild.c,PerformChildTask: waitin g for connection Jun 22 10:36:53 mail dbmail/imap4d[9120]: pool.c,child_reg_disconnected: [9120] Jun 22 10:36:53 mail dbmail/imap4d[9122]: pool.c,child_register: register child [9122] Jun 22 10:36:53 mail dbmail/imap4d[9122]: pool.c,child_register: initializing ch ild_state [9122] using slot [49] Jun 22 10:36:53 mail dbmail/imap4d[9122]: serverchild.c,CreateChild: signal hand ler placed, going to perform task now Jun 22 10:36:53 mail dbmail/imap4d[9122]: serverchild.c,PerformChildTask: waitin g for connection Jun 22 10:36:53 mail dbmail/imap4d[9122]: pool.c,child_reg_disconnected: [9122] Jun 22 10:36:53 mail dbmail/imap4d[9022]: server.c,StartServer: starting main se rvice loop Jun 22 10:36:53 mail dbmail/imap4d[9022]: dbmysql.c,db_check_connection: no data base connection, trying to establish on ---------------------------------------------------------------------- nix - 30-Jun-05 22:40 CEST ---------------------------------------------------------------------- dbmail-imapd also creates file srwxrwsrwx 1 root root 0 2005-07-01 00:31 &http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001088;¤&http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001055;·lm&http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001096;&http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001111;&http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001115;&http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001074;&http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001095;·&http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001034;¦&http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001055;· &http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001051;&http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0001111;·?= telnet localhost 143 refuses connection linux, gmime 2.1.15, glib 2.7.0, mysql 4.1.12 latin1 charset with standart swedish collate Jul 1 00:15:39 bsx dbmail/imap4d[18383]: pool.c,child_register: register child [18383] Jul 1 00:15:39 bsx dbmail/imap4d[18383]: pool.c,child_register: initializing child_state [18383] using slot [11] Jul 1 00:15:39 bsx dbmail/imap4d[18383]: serverchild.c,CreateChild: signal handler placed, going to perform task now Jul 1 00:15:39 bsx dbmail/imap4d[18383]: serverchild.c,PerformChildTask: waiting for connection Jul 1 00:15:39 bsx dbmail/imap4d[18383]: pool.c,child_reg_disconnected: [18383] Jul 1 00:15:39 bsx dbmail/imap4d[18385]: pool.c,child_register: register child [18385] Jul 1 00:15:39 bsx dbmail/imap4d[18385]: pool.c,child_register: initializing child_state [18385] using slot [12] Jul 1 00:15:39 bsx dbmail/imap4d[18385]: serverchild.c,CreateChild: signal handler placed, going to perform task now Jul 1 00:15:39 bsx dbmail/imap4d[18385]: serverchild.c,PerformChildTask: waiting for connection Jul 1 00:15:39 bsx dbmail/imap4d[18385]: pool.c,child_reg_disconnected: [18385] Jul 1 00:15:39 bsx dbmail/imap4d[18387]: pool.c,child_register: register child [18387] Jul 1 00:15:39 bsx dbmail/imap4d[18387]: pool.c,child_register: initializing child_state [18387] using slot [13] Jul 1 00:15:39 bsx dbmail/imap4d[18387]: serverchild.c,CreateChild: signal handler placed, going to perform task now Jul 1 00:15:39 bsx dbmail/imap4d[18387]: serverchild.c,PerformChildTask: waiting for connection Jul 1 00:15:39 bsx dbmail/imap4d[18387]: pool.c,child_reg_disconnected: [18387] Jul 1 00:15:39 bsx dbmail/imap4d[18389]: pool.c,child_register: register child [18389] Jul 1 00:15:39 bsx dbmail/imap4d[18389]: pool.c,child_register: initializing child_state [18389] using slot [14] Jul 1 00:15:39 bsx dbmail/imap4d[18389]: serverchild.c,CreateChild: signal handler placed, going to perform task now Jul 1 00:15:39 bsx dbmail/imap4d[18389]: serverchild.c,PerformChildTask: waiting for connection Jul 1 00:15:39 bsx dbmail/imap4d[18389]: pool.c,child_reg_disconnected: [18389] Jul 1 00:15:39 bsx dbmail/imap4d[18368]: server.c,StartServer: starting main service loop edited on: 30-Jun-05 22:40 ---------------------------------------------------------------------- nix - 30-Jun-05 22:40 CEST ---------------------------------------------------------------------- Reminder sent to aaron, paul this is a serious bug, can you please give me some advices how to find error? ---------------------------------------------------------------------- paul - 01-Jul-05 00:25 CEST ---------------------------------------------------------------------- Heh, what that file?? Looks totally garbled here! Where's that? Could be the unix-socket code. Unable to reproduce so far, though. ---------------------------------------------------------------------- nix - 01-Jul-05 00:28 CEST ---------------------------------------------------------------------- it appears in directory from which i run dbmail-imapd example: i'm in /home/nix and run /usr/local/sbin/dbmail-imapd file appears in /home/nix # ldd dbmail-imapd libsqldbmail.so.0 => /home/www/sumy.biz/soft/dbmail/lib/dbmail/libsqldbmail.so.0 (0xb7fb1000) libmysqlclient.so.14 => /home/www/sumy.biz/soft/mysql/lib/mysql/libmysqlclient.so.14 (0xb7f53000) libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7f1d000) libm.so.6 => /lib/libm.so.6 (0xb7efa000) libssl.so.0 => /usr/lib/libssl.so.0 (0xb7ec9000) libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0xb7dcb000) libgmime-2.0.so.2 => /home/www/sumy.biz/soft/gmime/lib/libgmime-2.0.so.2 (0xb7d7c000) libgobject-2.0.so.0 => /home/www/sumy.biz/soft/glib/lib/libgobject-2.0.so.0 (0xb7d41000) libgmodule-2.0.so.0 => /home/www/sumy.biz/soft/glib/lib/libgmodule-2.0.so.0 (0xb7d3d000) libdl.so.2 => /lib/libdl.so.2 (0xb7d39000) libgthread-2.0.so.0 => /home/www/sumy.biz/soft/glib/lib/libgthread-2.0.so.0 (0xb7d34000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7ce3000) libglib-2.0.so.0 => /home/www/sumy.biz/soft/glib/lib/libglib-2.0.so.0 (0xb7c61000) libz.so.1 => /usr/lib/libz.so.1 (0xb7c54000) libnsl.so.1 => /lib/libnsl.so.1 (0xb7c3f000) libc.so.6 => /lib/libc.so.6 (0xb7b0f000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fb6000) ---------------------------------------------------------------------- xing - 01-Jul-05 00:39 CEST ---------------------------------------------------------------------- I also have jumbled nonsensical stuff created by either the dbmail* binaries or the installer. All the files with the ? mark in them are 0 byte files but yet when I "cat file", I get garbled ouput with sprinkles of dbmail tags in it. I don't know how to capture the garble since it kills my terminal and I can't cp the file. /usr/local/sbin/ srwxrwsrwx 1 root root 0 Jun 21 07:39 4M??fy? -rwxr-xr-x 1 root root 323334 Jun 21 12:44 dbmail-imapd -rwxr-xr-x 1 root root 93574 Jun 21 12:44 dbmail-lmtpd -rwxr-xr-x 1 root root 89244 Jun 21 12:44 dbmail-pop3d -rwxr-xr-x 1 root root 32272 Jun 21 12:44 dbmail-smtp -rwxr-xr-x 1 root root 57034 Jun 21 12:44 dbmail-users -rwxr-xr-x 1 root root 43043 Jun 21 12:44 dbmail-util srwxrwsrwx 1 root root 0 Jun 21 07:36 d???fy? -rwxr-xr-x 1 root root 745089 Oct 22 2004 dictd srwxrwsrwx 1 root root 0 Jun 21 07:32 ????fy? srwxrwsrwx 1 root root 0 Jun 21 07:38 ?o??fy? -rwxr-xr-x 1 root root 76789 Jan 27 00:53 pure-authd -rwxr-xr-x 1 root root 452661 Jan 27 00:53 pure-ftpd -rwxr-xr-x 1 root root 97674 Jan 27 00:53 pure-ftpwho -rwxr-xr-x 1 root root 98407 Jan 27 00:53 pure-mrtginfo -rwxr-xr-x 1 root root 104380 Jan 27 00:53 pure-quotacheck -rwxr-xr-x 1 root root 76812 Jan 27 00:53 pure-uploadscript -rwxr-xr-x 1 root root 283676 Dec 4 2004 saslauthd -rwxr-xr-x 1 root root 108305 Dec 4 2004 sasldblistusers2 -rwxr-xr-x 1 root root 44268 Dec 4 2004 saslpasswd2 srwxrwsrwx 1 root root 0 Jun 21 07:20 $u??fy? -rwxr-xr-x 1 root root 81340 May 12 12:07 vsftpd -rwxr-xr-x 1 root root 863690 Dec 23 2004 wzdftpd ---------------------------------------------------------------------- nix - 01-Jul-05 01:43 CEST ---------------------------------------------------------------------- gcc 3.4.3 ---------------------------------------------------------------------- nix - 01-Jul-05 02:30 CEST ---------------------------------------------------------------------- dbmail thinks that it should create sockets for imapd and pop3d. the problem is around config parsing and socket creating. ---------------------------------------------------------------------- kcbrown - 06-Jul-05 17:13 CEST ---------------------------------------------------------------------- I'm experiencing the same problem (the one initially reported, not the one involving the random-looking unix-domain sockets) with the 2.1.1 Debian package. I'd get an error message in the logs saying that the connection was bad. The message looks like this: Jul 6 06:13:22 rtserver dbmail/imap4d[9091]: dbpgsql.c,db_check_connection: connection with database gone bad When I examined the database itself, I saw no connections to it from dbmail. Hmm... So I modified dbpgsql.c and added the following to the very top of db_check_connection(): if (conn == NULL) return db_connect(); and modified the definition of conn to read: static PGconn *conn = NULL; This caused the bug to disappear. So it looks to me like imapd and popd are not even calling db_connect() before checking the database connection state, based on the fact that the above causes things to work properly. ---------------------------------------------------------------------- aaron - 23-Jul-05 06:51 CEST ---------------------------------------------------------------------- I think I've got this fixed in SVN now. If you're using PostgreSQL, and you get this message, and things work properly, then there's something funky but it's being worked around: "dbpgsql.c,db_check_connection: connection with database invalid, retrying" Bug History Date Modified Username Field Change ====================================================================== 21-Jun-05 16:44xing New Bug 21-Jun-05 18:06mobrien9279 Bugnote Added: 0000751 21-Jun-05 18:41mobrien9279 Bugnote Added: 0000752 21-Jun-05 21:28paul Bugnote Added: 0000753 21-Jun-05 21:41xing Bugnote Added: 0000754 23-Jun-05 18:03dstilts Bugnote Added: 0000756 30-Jun-05 22:39nix Bugnote Added: 0000762 30-Jun-05 22:40nix Bug Monitored: aaron 30-Jun-05 22:40nix Bug Monitored: paul 30-Jun-05 22:40nix Bugnote Added: 0000763 30-Jun-05 22:40nix Bugnote Edited: 0000762 01-Jul-05 00:25paul Bugnote Added: 0000764 01-Jul-05 00:28nix Bugnote Added: 0000765 01-Jul-05 00:39xing Bugnote Added: 0000766 01-Jul-05 01:43nix Bugnote Added: 0000767 01-Jul-05 01:55nix Bug Monitored: nix 01-Jul-05 02:30nix Bugnote Added: 0000768 06-Jul-05 17:13kcbrown Bugnote Added: 0000769 21-Jul-05 16:03Mysticode Bug Monitored: Mysticode 23-Jul-05 06:51aaron Bugnote Added: 0000783 23-Jul-05 06:51aaron Assigned To => aaron 23-Jul-05 06:51aaron Resolution open => fixed 23-Jul-05 06:51aaron Status new => resolved ======================================================================