[Pkg-mailman-hackers] Bug#395493: mailman: smtp-failure:timeout, bad file descriptor, set_debuglevel

Lukasz Szybalski szybalski at gmail.com
Wed Nov 1 21:42:32 CET 2006


Package: mailman
Version: 2.1.5-8sarge5
Followup-For: Bug #395493

Hello,
Problem:mailman has problems sending mail. Some emails will be sent and
other will not.
Steps:Mailman receives message. Archives it. Tries to send it
to list. Connects and after 5 min times out. Logs are showing the:
smtp-failure shows:
Low level smtp error: [Errno 9] Bad file descriptor, msgid:
<mailman.1.1162308728.3532.xxx at lists.xxxxx.com>
smtp:
(8074) <mailman.1.1162308728.3532.xxx at lists.xxxxxx.com> smtp for
 1 recips, completed in 300.120 seconds
 Please notice the time here 300 sec is a lot.
mail.log:
Nov  1 13:58:30 localhost postfix/smtpd[8735]: connect from
localhost[127.0.0.1]Nov  1 13:58:30 localhost postfix/smtpd[8735]:
D07CE25C101: client=localhost[127.0.0.1]
Nov  1 14:03:30 localhost postfix/smtpd[8735]: timeout after DATA from
localhost[127.0.0.1]
Nov  1 14:03:30 localhost postfix/smtpd[8735]: disconnect from
localhost[127.0.0.1]
Please notice the 5min timeout.

If you would like to see the time stamps.(skip otherwise)
http://mail.python.org/pipermail/mailman-users/2006-October/054025.html

Finding solution:
1.Is your configuration good?
yes. It has worked for 6 months, some emails are going through.
Mailserver works when sending and delivering local mail.
Fresh instalation with apt-get original permissions etc. I'm unable to
tell which members emails are delivered to and which are not.
For reference on instalation see: (skip otherwise)
http://acm.cs.uic.edu/modules/mediawiki/index.php/Debian#Mailman_on_Debian_with_Postfix.2C_instalation_and_configuration

2. Can mailman connect to smtp server?
yes.
xxxxxx:/home/lucas# su list
xxxxxx:/home/lucas$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 xxxxxx.xxxxxxx.com ESMTP Postfix (Debian/GNU)
2a. Can python connect using smtplib.py?
yes
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()
> >
3. Are there any other errors?
No. Other then these specified above. 

4. Can you enable debug level and see the errors?
NO. Debian bug? 
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

This should provide additional level of debuging information. It does
not. No additional errors are shown in any mailman logs,
mail.log.err.warn nor syslog. Should i make seperate bug for it?

5. Did you try to solve this?
yes but no luck on mailman mailing list. http://mail.python.org/pipermail/mailman-users/2006-October/054049.html
Mark Sapiro belives it is a debian bug that smtplib which tries to write
to stderr, which in turn should write to logs is not doing that. No output from debug level is available which in turn prohibits me from finding out what is causing the timeout and file descriptor problem.


6.Help advice? I already tried reinstalling mailman. dpkg purge mailman.
then restoring archives and config/users by synch_members and
config_list -o,then  -i. Same issue reappears, whether it is a new
mailing list 'testing' or reinstalled old one.  

Thank You
Lukasz(Lucas) Szybalski


-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-386
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages mailman depends on:
ii  apache2-mpm-prefork [ 2.0.54-5sarge1     traditional model for Apache2
ii  cron                  3.0pl1-86          management of regular background p
ii  debconf               1.4.30.13          Debian configuration management sy
ii  libc6                 2.3.2.ds1-22sarge4 GNU C Library: Shared libraries an
ii  logrotate             3.7-5              Log rotation utility
ii  postfix [mail-transpo 2.1.5-9            A high-performance mail transport 
ii  pwgen                 2.03-1             Automatic Password generation
ii  python                2.3.5-2            An interactive high-level object-o
ii  ucf                   1.17               Update Configuration File: preserv

-- debconf information:
  mailman/queue_files_present:
* mailman/default_server_language: en
  mailman/gate_news: false
* mailman/site_languages: en
* mailman/used_languages:
* mailman/create_site_list:




More information about the Pkg-mailman-hackers mailing list