Hello, i'm experiencing a really strange behavoir with the BINDIP directive. Quickly said, when i use * it seems to listen to only ipv6 and if i try connect to ipv4 it accepts the connection BUT login fails and a nice segfault appears in the logs.
The strange thing is that I have the same configuration on another (production) machine and it doesn't seem to happen. It listens correctly also to ipv4 and doesn't go into segfault. My configuration is quite simple: a base (mysql+postfix+dbmail) installation of Debian Lenny on VirtualBox. Here the various behavoirs with different BINDIP values. r...@mx1(~)> dpkg --list | egrep '(mysql)|(dbmail)' ii dbmail 2.2.15-1lenny0 base package for the dbmail email solution ii dbmail-mysql 2.2.15-1lenny0 MySQL module for Dbmail ii libdbd-mysql-perl 4.007-1+lenny1 A Perl5 database interface to the MySQL database ii libmysqlclient15off 5.0.51a-24+lenny4 MySQL database client library ii libmysqlclient16 5.1.47-1~bpo50+1 MySQL database client library ii mysql-client-5.1 5.1.47-1~bpo50+1 MySQL database client binaries ii mysql-common 5.1.47-1~bpo50+1 MySQL database common files, e.g. /etc/mysql/my.cnf ii mysql-server-5.1 5.1.47-1~bpo50+1 MySQL database server binaries and system database setup ii mysql-server-core-5.1 5.1.47-1~bpo50+1 MySQL database server binaries ii postfix-mysql 2.5.5-1.1 MySQL map support for Postfix =============================== BINDIP = * r...@mx1(~)> netstat -l46n Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:12525 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:33006 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 192.168.56.111:465 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:465 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 192.168.56.111:25 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp6 0 0 :::110 :::* LISTEN tcp6 0 0 :::143 :::* LISTEN tcp6 0 0 :::24 :::* LISTEN tcp6 0 0 :::4190 :::* LISTEN udp 0 0 0.0.0.0:60328 0.0.0.0:* udp 0 0 0.0.0.0:68 0.0.0.0:* udp 0 0 0.0.0.0:57952 0.0.0.0:* udp 0 0 0.0.0.0:5353 0.0.0.0:* udp 0 0 0.0.0.0:874 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* udp6 0 0 :::57930 :::* udp6 0 0 :::5353 :::* ett...@imac(~)> telnet mx1.kdev 143 Trying 192.168.56.111... Connected to mx1.kdev. Escape character is '^]'. * OK dbmail imap (protocol version 4r1) server 2.2.15 ready to run zux0 LOGIN "[email protected]" "kreos" Connection closed by foreign host. ....... Aug 29 12:17:48 mx1 dbmail/imap4d[2616]: Debug:[imapsession] dbmail-imapsession.c,dbmail_imap_session_handle_auth(+1621): trying to validate user [[email protected]], pass [XXXX] Aug 29 12:17:48 mx1 dbmail/imap4d[2616]: Debug:[sql] dbmysql.c,db_query(+287): query [SELECT userid FROM dbmail_usermap WHERE 1 = 2] Aug 29 12:17:48 mx1 dbmail/imap4d[2616]: Debug:[db] dbmodule.c,db_query(+145): last query took [0] seconds Aug 29 12:17:48 mx1 dbmail/imap4d[2616]: Debug:[db] db.c,db_use_usermap(+167): enabling usermap lookups Aug 29 12:17:48 mx1 dbmail/imap4d[2616]: Debug:[db] db.c,db_usermap_resolve(+4694): checking userid [[email protected]] in usermap Aug 29 12:17:48 mx1 dbmail/imap4d[2616]: Debug:[db] db.c,db_usermap_resolve(+4723): client on inet socket [inet:::ffff:192.168.56.111:143] Aug 29 12:17:48 mx1 dbmail/imap4d[2616]: Debug:[sql] dbmysql.c,db_query(+287): query [SELECT login, sock_allow, sock_deny, userid FROM dbmail_usermap WHERE login in ('[email protected]','ANY') ORDER BY sock_allow, sock_deny] Aug 29 12:17:48 mx1 dbmail/imap4d[2616]: Debug:[db] dbmodule.c,db_query(+145): last query took [0] seconds Aug 29 12:17:48 mx1 dbmail/imap4d[2616]: Debug:[db] db.c,db_usermap_resolve(+4744): login [[email protected]] not found in usermap Aug 29 12:17:48 mx1 kernel: [ 836.805288] dbmail-imapd[2616]: segfault at ffff007c ip b6fed1b4 sp bfcf7bcc error 4 in libauth_sql.so.0.0.0[b6fec000+5000] ============================= BINDIP = 0.0.0.0 r...@mx1(~)> netstat -l46n Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:12525 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:33006 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 192.168.56.111:465 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:465 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:24 0.0.0.0:* LISTEN tcp 0 0 192.168.56.111:25 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN udp 0 0 0.0.0.0:60328 0.0.0.0:* udp 0 0 0.0.0.0:68 0.0.0.0:* udp 0 0 0.0.0.0:57952 0.0.0.0:* udp 0 0 0.0.0.0:5353 0.0.0.0:* udp 0 0 0.0.0.0:874 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* udp6 0 0 :::57930 :::* udp6 0 0 :::5353 :::* ett...@imac(~)> telnet mx1.kdev 143 Trying 192.168.56.111... Connected to mx1.kdev. Escape character is '^]'. * OK dbmail imap (protocol version 4r1) server 2.2.15 ready to run zux0 LOGIN "[email protected]" "kreos" zux0 OK LOGIN completed ........... Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[imapsession] dbmail-imapsession.c,dbmail_imap_session_handle_auth(+1621): trying to validate user [[email protected]], pass [XXXX] Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[sql] dbmysql.c,db_query(+287): query [SELECT userid FROM dbmail_usermap WHERE 1 = 2] Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[db] dbmodule.c,db_query(+145): last query took [0] seconds Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[db] db.c,db_use_usermap(+167): enabling usermap lookups Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[db] db.c,db_usermap_resolve(+4694): checking userid [[email protected]] in usermap Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[db] db.c,db_usermap_resolve(+4723): client on inet socket [inet:192.168.56.111:143] Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[sql] dbmysql.c,db_query(+287): query [SELECT login, sock_allow, sock_deny, userid FROM dbmail_usermap WHERE login in ('[email protected]','ANY') ORDER BY sock_allow, sock_deny] Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[db] dbmodule.c,db_query(+145): last query took [0] seconds Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[db] db.c,db_usermap_resolve(+4744): login [[email protected]] not found in usermap Aug 29 12:23:10 mx1 dbmail/imap4d[2663]: Debug:[sql] dbmysql.c,db_query(+287): query [SELECT user_idnr FROM dbmail_users WHERE lower(userid) = lower('[email protected]')] ...... Any idea? Greets, Ettore _______________________________________________ DBmail mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
