On 10/23/06, Mark Sapiro <[EMAIL PROTECTED]> wrote: > Lukasz Szybalski wrote: > > >One issue was a domain. I am not sure why it has worked before and one > >day it stopped, but to continue on; i still have a problem. > > > >http://mail.python.org/pipermail/mailman-users/2005-May/044742.html > >I did following test which showed me that when i use my > >SMTPHOST='example.com' i would not connect, which explains the time > >out. > > > Which is why the default SMTPHOST is 'localhost'. > > > >I have tested it by(would be nice to have this test included with > >mailman as testmailman.py or something like that): > >>su list > >>python > >>>> import smtplib > >>>> SMTPHOST = 'localhost' > >>>> SMTPPORT = 0 > >>>> x = smtplib.SMTP() > >>>> x.connect(SMTPHOST, SMTPPORT) > >(220, 'mycomp.example.com ESMTP Postfix (Debian/GNU)') > >>>> x.close > ><bound method SMTP.close of <smtplib.SMTP instance at 0x4021a5ec>> > >>>> x.close() > >>>> SMTPHOST = 'example.com' > >>>> x.connect(SMTPHOST, SMTPPORT) > >(220, 'mycomp.example.com ESMTP Postfix (Debian/GNU)') > >>>> x.close() > >>>> SMTPHOST = 'mycomp' > >>>> x.connect(SMTPHOST, SMTPPORT) > >(220, 'mycomp.example.com ESMTP Postfix (Debian/GNU)') > >>>> x.close() > > > >now it seemd to work for a second, it sent few mails but now: > > cat /var/log/mail.log > > says: > >Oct 23 10:55:36 localhost postfix/smtpd[11974]: connect from > >localhost[127.0.0.1] > >Oct 23 10:55:36 localhost postfix/smtpd[11974]: 3F54C25C0C3: > >client=localhost[127.0.0.1] > >Oct 23 11:00:36 localhost postfix/smtpd[11974]: timeout after DATA > >from localhost[127.0.0.1] > >Oct 23 11:00:36 localhost postfix/smtpd[11974]: disconnect from > >localhost[127.0.0.1] > >Oct 23 11:00:36 localhost postfix/cleanup[11977]: 3F54C25C0C3: > >message-id=<[EMAIL PROTECTED]> > > > >I changed the Mailman/Handlers/SMTPDirect.py as follows. > > def __connect(self): > > self.__conn = smtplib.SMTP() > > self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT) > > self.__numsessions = mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION > >and add a line so it becomes > > def __connect(self): > > self.__conn = smtplib.SMTP() > > self.__conn.set_debuglevel(1) > > self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT) > > self.__numsessions = mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION > > > >cat /var/log/mailman/smtp-fail says: > > Low level smtp error: [Errno 9] Bad file descriptor, msgid: > ><[EMAIL PROTECTED]> > >Oct 23 11:00:36 2006 (1497) delivery to [EMAIL PROTECTED] failed with > >code -1: [Errno 9] Bad file descriptor > >Oct 23 11:00:36 2006 (1497) delivery to [EMAIL PROTECTED] failed with > >code -1: [Errno 9] Bad file descriptor > >Oct 23 11:00:36 2006 (1497) delivery to [EMAIL PROTECTED] failed with > >code -1: [Errno 9] Bad file descriptor > >Oct 23 11:00:36 2006 (1497) delivery to [EMAIL PROTECTED] failed with > >code -1: [Errno 9] Bad file descriptor > >Oct 23 11:00:36 2006 (1497) delivery to [EMAIL PROTECTED] failed with > >code -1: [Errno 9] Bad file descriptor > >Oct 23 11:00:36 2006 (1497) delivery to [EMAIL PROTECTED] failed with > >code -1: [Errno 9] Bad file descriptor > >Oct 23 11:00:36 2006 (1497) delivery to [EMAIL PROTECTED] failed with > >code -1: [Errno 9] Bad file descriptor > > > The above patch puts additional debugging info in Mailman's 'error' > log. If you aren't seeing this, see below. > > > >qrunner says: > >Oct 23 06:25:35 2006 (1491) Master watcher caught SIGHUP. Re-opening > >log files.Oct 23 06:25:35 2006 (1492) ArchRunner qrunner caught > >SIGHUP. Reopening logs. > >Oct 23 06:25:35 2006 (1493) BounceRunner qrunner caught SIGHUP. > >Reopening logs.Oct 23 06:25:35 2006 (1494) CommandRunner qrunner > >caught SIGHUP. Reopening logs. > >Oct 23 06:25:35 2006 (1495) IncomingRunner qrunner caught SIGHUP. > >Reopening logs. > >Oct 23 06:25:35 2006 (1496) NewsRunner qrunner caught SIGHUP. Reopening > >logs. > >Oct 23 06:25:35 2006 (1497) OutgoingRunner qrunner caught SIGHUP. > >Reopening logs. > >Oct 23 06:25:35 2006 (1498) VirginRunner qrunner caught SIGHUP. > >Reopening logs.Oct 23 06:25:35 2006 (1499) RetryRunner qrunner caught > >SIGHUP. Reopening logs. > > > > This indicates you did 'bin/mailmanctl reopen' (or sent mailmanctl a > SIGHUP). You need to do 'bin/mailmanctl reopen' (or send mailmanctl a > SIGINT) in order to reload the patched SMTPDirect.py module. > > > >What could be causing the problem? > > > > > >--- > >Side note: > >is file permission like this normal? > >/var/lib/mailman/bin > >py files are in group list > >but pyo or pyc are in group root > > > >-rwxr-xr-x 1 root list 1499 2006-09-20 07:18 convert.py > >-rw-r--r-- 1 root root 1148 2006-10-18 10:44 convert.pyc > >-rw-r--r-- 1 root root 1148 2006-10-18 10:44 convert.pyo > >-rwxr-xr-x 1 root list 3238 2006-09-20 07:18 discard > >-rwxr-xr-x 1 root list 4399 2006-09-20 07:18 dumpdb > >-rwxr-xr-x 1 root list 4951 2006-09-20 07:18 find_member > >-rwxr-xr-x 1 root list 2633 2006-09-20 07:18 fix_url.py > >-rw-r--r-- 1 root root 2491 2006-10-18 10:44 fix_url.pyc > >-rw-r--r-- 1 root root 2491 2006-10-18 10:44 fix_url.pyo > >------------------------------------------------------ > > > This is normal. The various discard, dumpdb, etc files are the command > line scripts and are normally installed with the owner/group and > permissions as above (assuming you ran the install as root). > convert.py and fix_url.py are 'withlist' scripts designed to be > imported by 'bin/withlist -r'. only the .py file is normally > installed. The .pyc (and .pyo if any) files are created by Python when > withlist imports the module. They will normally have the owner:group > of whoever ran the withlist command that imported them.
Why do i get this error in smtp-failure? Any ideas? Oct 23 20:30:31 2006 (13510) delivery to [EMAIL PROTECTED] failed with code -1: [Errno 9] Bad file descriptor Oct 23 20:30:31 2006 (13510) delivery to [EMAIL PROTECTED] failed with code -1: [Errno 9] Bad file descriptor Oct 23 20:30:31 2006 (13510) Low level smtp error: [Errno 9] Bad file descriptor, msgid: <[EMAIL PROTECTED]> Oct 23 20:33:30 2006 (13510) Low level smtp error: [Errno 9] Bad file descriptor, msgid: <[EMAIL PROTECTED]> mail.info says: Oct 23 20:25:31 localhost postfix/smtpd[13513]: connect from localhost[127.0.0.1] Oct 23 20:25:31 localhost postfix/smtpd[13513]: 0CA9A25C0C3: client=localhost[127.0.0.1] Oct 23 20:30:31 localhost postfix/smtpd[13513]: timeout after DATA from localhost[127.0.0.1] Oct 23 20:30:31 localhost postfix/smtpd[13513]: disconnect from localhost[127.0.0.1] Oct 23 20:30:31 localhost postfix/cleanup[13514]: 0CA9A25C0C3: message-id=<[EMAIL PROTECTED]> ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp