conn.quit() -> SMTPServerDisconnected

Bug #265762 reported by Uplink2sf
2
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
High
Unassigned

Bug Description

well this is driving me insane. had it since 2.1b3 on
RedHat 7.2 using python 2.2 (stock rpm install).

there's a few lists active but mail gets delivered
rarely - seems when sending mail,
Mailman/Handlers/SMTPDirect.py fails to conn.quit()
thus raising a
SMTPServerDisconnected: please run connect() first

...weird!

please find attached looots of logfiles that hopefully
make sense to you. I have too little knowledge of
python (<=0) to investigate more.

---
root [tweak] # $(which python2) -v
# /usr/lib/python2.2/site.pyc matches
/usr/lib/python2.2/site.py
import site # precompiled from /usr/lib/python2.2/site.pyc
# /usr/lib/python2.2/os.pyc matches
/usr/lib/python2.2/os.py
import os # precompiled from /usr/lib/python2.2/os.pyc
import posix # builtin
# /usr/lib/python2.2/posixpath.pyc matches
/usr/lib/python2.2/posixpath.py
import posixpath # precompiled from
/usr/lib/python2.2/posixpath.pyc
# /usr/lib/python2.2/stat.pyc matches
/usr/lib/python2.2/stat.py
import stat # precompiled from /usr/lib/python2.2/stat.pyc
# /usr/lib/python2.2/UserDict.pyc matches
/usr/lib/python2.2/UserDict.py
import UserDict # precompiled from
/usr/lib/python2.2/UserDict.pyc
Python 2.2 (#1, Apr 12 2002, 15:29:57)
[GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2
Type "help", "copyright", "credits" or
"license" for
more information.
dlopen("/usr/lib/python2.2/lib-dynload/readline.so", 2);
import readline # dynamically loaded from
/usr/lib/python2.2/lib-dynload/readline.so
>>>
---
the following logfile mix is obfuscated a bit (email
and IP addresses)

08017 >>> 220 companyMail ESMTP
08017 <<< EHLO company.at
08017 >>> 250-mx.company.at Hello fqdn.domain.net
[2.3.4.5], pleased to meet you
08017 >>> 250-ENHANCEDSTATUSCODES
08017 >>> 250-PIPELINING
08017 >>> 250-8BITMIME
08017 >>> 250-SIZE
08017 >>> 250-DSN
08017 >>> 250-ETRN
08017 >>> 250-AUTH DIGEST-MD5 CRAM-MD5
08017 >>> 250-STARTTLS
08017 >>> 250-DELIVERBY
08017 >>> 250 HELP
08017 <<< STARTTLS
08017 >>> 220 2.0.0 Ready to start TLS
08018 >>> 220 companyMail ESMTP
08018 <<< HELO company.at
08018 >>> 250 mx.company.at Hello fqdn.domain.net
[2.3.4.5], pleased to meet you
08018 <<< MAIL FROM:<email address hidden>
08018 >>> 250 2.1.0 <email address hidden>... Sender ok
08018 <<< RCPT TO:<email address hidden>
08018 >>> 250 2.1.5 <email address hidden>... Recipient ok
08018 <<< DATA
08018 >>> 354 Enter mail, end with "." on a line by
itself
08018 <<< Date: Thu, 31 Oct 2002 15:05:15 +0100
08018 <<< Mime-Version: 1.0 (Apple Message framework v546)
08018 <<< Content-Type: text/plain; charset=US-ASCII;
format=flowed
08018 <<< Subject: test
08018 <<< From: SENDER REALNAME <email address hidden>
08018 <<< To: <email address hidden>
08018 <<< Content-Transfer-Encoding: 7bit
08018 <<< Message-Id:
<email address hidden>
08018 <<< X-Mailer: Apple Mail (2.546)
08018 <<<
08018 <<< ENDOFTEST
08018 <<<
08018 <<< .
08018 >>> 250 2.0.0 g9VDs6Nu008018 Message accepted for
delivery
08018 <<< QUIT
08018 >>> 221 2.0.0 mx.company.at closing connection
08019 === EXEC smrsh -c
/opt/mailman/current/mail/mailman post apfelsucht
08019 >>> From <email address hidden> Thu Oct 31 14:54:06 2002
08019 >>> Received: from company.at (fqdn.domain.net
[2.3.4.5]) by mx.company.at (company.at/20021013) with
SMTP id g9VDs6Nu008018 for <email address hidden>;
Thu, 31 Oct 2002 14:54:06 +0100
08019 >>> Date: Thu, 31 Oct 2002 15:05:15 +0100
08019 >>> Mime-Version: 1.0 (Apple Message framework v546)
08019 >>> Content-Type: text/plain; charset=US-ASCII;
format=flowed
08019 >>> Subject: test
08019 >>> From: SENDER REALNAME <email address hidden>
08019 >>> To: <email address hidden>
08019 >>> Content-Transfer-Encoding: 7bit
08019 >>> Message-Id:
<email address hidden>
08019 >>> X-Mailer: Apple Mail (2.546)
08019 >>>
08019 >>> ENDOFTEST
08019 >>>
Oct 31 14:54:06 tweak sm-mta[8018]: g9VDs6Nu008018:
from=<email address hidden>, size=377, class=0, nrcpts=1,
msgid=<email address hidden>,
proto=SMTP, daemon=MTA, relay=fqdn.domain.net [2.3.4.5]
08019 <<< [EOF]
Oct 31 14:54:07 tweak sm-mta[8019]: g9VDs6Nu008018:
to="|/opt/mailman/current/mail/mailman post
apfelsucht", ctladdr=<email address hidden> (47/0),
delay=00:00:01, xdelay=00:00:01, mailer=prog,
pri=30568, dsn=2.0.0, stat=Sent
connect: ('localhost', 25)
connect: ('localhost', 25)
reply: '220 companyMail ESMTP\r\n'
reply: retcode (220); Msg: companyMail ESMTP
connect: companyMail ESMTP
send: 'ehlo tweak.company.at\r\n'
reply: '250-mx.company.at Hello localhost [127.0.0.1],
pleased to meet you\r\n'
reply: '250-ENHANCEDSTATUSCODES\r\n'
reply: '250-PIPELINING\r\n'
reply: '250-8BITMIME\r\n'
reply: '250-SIZE\r\n'
reply: '250-DSN\r\n'
reply: '250-ETRN\r\n'
reply: '250-AUTH DIGEST-MD5 CRAM-MD5\r\n'
reply: '250-STARTTLS\r\n'
reply: '250-DELIVERBY\r\n'
reply: '250 HELP\r\n'
reply: retcode (250); Msg: mx.company.at Hello
localhost [127.0.0.1], pleased to meet you
ENHANCEDSTATUSCODES
PIPELINING
8BITMIME
SIZE
DSN
ETRN
AUTH DIGEST-MD5 CRAM-MD5
STARTTLS
DELIVERBY
HELP
send: 'mail FROM:<email address hidden>
size=1168\r\n'
reply: '250 2.1.0 <email address hidden>...
Sender ok\r\n'
reply: retcode (250); Msg: 2.1.0
<email address hidden>... Sender ok
send: 'rcpt TO:<email address hidden>\r\n'
reply: '250 2.1.5 <email address hidden>...
Recipient ok\r\n'
reply: retcode (250); Msg: 2.1.5
<email address hidden>... Recipient ok
send: 'data\r\n'
reply: '354 Enter mail, end with "." on a line by
itself\r\n'
reply: retcode (354); Msg: Enter mail, end with "." on
a line by itself
data: (354, 'Enter mail, end with "." on a line by itself')
send: "Received: from company.at (fqdn.domain.net
[2.3.4.5]) by mx.company.at\r\n\t(company.at/20021013)
with SMTP id g9VDs6Nu008018 for
<email address hidden>;\r\n\tThu, 31 Oct 2002 14:54:06
+0100\r\nDate: Thu, 31 Oct 2002 15:05:15
+0100\r\nMime-Version: 1.0 (Apple Message framework
v546)\r\nContent-Type: text/plain; charset=US-ASCII;
format=flowed\r\nFrom: SENDER REALNAME
<email address hidden>\r\nTo:
<email address hidden>\r\nContent-Transfer-Encoding:
7bit\r\nMessage-Id:
<email address hidden>\r\nX-Mailer:
Apple Mail (2.546)\r\nSubject: [Apfelsucht]
test\r\nX-BeenThere:
<email address hidden>\r\nPrecedence: list\r\nList-Id:
Appl'o'holics, MacLovers & Switchers
<apfelsucht.company.at>\r\nList-Post:
<mailto:<email address hidden>>\r\nList-Subscribe:
<https://webmail.company.at/mailman/listinfo/apfelsucht>,\r\n\t<ma
ilto:<email address hidden>?subject=subscribe>\r\nList-Unsubscrib
e:
<https://webmail.company.at/mailman/listinfo/apfelsucht>,\r\n\t<ma
ilto:<email address hidden>?subject=unsubscribe>\r\nList-Archive:

</pipermail>\r\nList-Help:
<mailto:<email address hidden>?subject=help>\r\nSender:
<email address hidden>\r\nErrors-To:
<email address hidden>\r\n\r\nENDOFTEST\r\n\r\n.\r\n"
reply: '250 2.0.0 g9VDs9Nu008025 Message accepted for
delivery\r\n'
reply: retcode (250); Msg: 2.0.0 g9VDs9Nu008025 Message
accepted for delivery
data: (250, '2.0.0 g9VDs9Nu008025 Message accepted for
delivery')
send: 'mail FROM:<email address hidden>
size=1168\r\n'
reply: '250 2.1.0 <email address hidden>...
Sender ok\r\n'
reply: retcode (250); Msg: 2.1.0
<email address hidden>... Sender ok
send: 'rcpt TO:<email address hidden>\r\n'
send: 'quit\r\n'
send: 'quit\r\n'
Oct 31 14:54:09 2002 (7608) All recipients refused:
please run connect() first
08025 >>> 220 companyMail ESMTP
08025 <<< ehlo tweak.company.at
08025 >>> 250-mx.company.at Hello localhost
[127.0.0.1], pleased to meet you
08025 >>> 250-ENHANCEDSTATUSCODES
08025 >>> 250-PIPELINING
08025 >>> 250-8BITMIME
08025 >>> 250-SIZE
08025 >>> 250-DSN
08025 >>> 250-ETRN
08025 >>> 250-AUTH DIGEST-MD5 CRAM-MD5
08025 >>> 250-STARTTLS
08025 >>> 250-DELIVERBY
08025 >>> 250 HELP
08025 <<< mail FROM:<email address hidden>
size=1168
08025 >>> 250 2.1.0 <email address hidden>...
Sender ok
08025 <<< rcpt TO:<email address hidden>
08025 >>> 250 2.1.5 <email address hidden>...
Recipient ok
08025 <<< data
08025 >>> 354 Enter mail, end with "." on a line by
itself
08025 <<< Received: from company.at (fqdn.domain.net
[2.3.4.5]) by mx.company.at
08025 <<< (company.at/20021013) with SMTP id
g9VDs6Nu008018 for <email address hidden>;
08025 <<< Thu, 31 Oct 2002 14:54:06 +0100
08025 <<< Date: Thu, 31 Oct 2002 15:05:15 +0100
08025 <<< Mime-Version: 1.0 (Apple Message framework v546)
08025 <<< Content-Type: text/plain; charset=US-ASCII;
format=flowed
08025 <<< From: SENDER REALNAME <email address hidden>
08025 <<< To: <email address hidden>
08025 <<< Content-Transfer-Encoding: 7bit
08025 <<< Message-Id:
<email address hidden>
08025 <<< X-Mailer: Apple Mail (2.546)
08025 <<< Subject: [Apfelsucht] test
08025 <<< X-BeenThere: <email address hidden>
08025 <<< Precedence: list
08025 <<< List-Id: Appl'o'holics, MacLovers & Switchers
 <apfelsucht.company.at>
08025 <<< List-Post: <mailto:<email address hidden>>
08025 <<< List-Subscribe:
<https://webmail.company.at/mailman/listinfo/apfelsucht>,
08025 <<<
<mailto:<email address hidden>?subject=subscribe>
08025 <<< List-Unsubscribe:
<https://webmail.company.at/mailman/listinfo/apfelsucht>,
08025 <<<
<mailto:<email address hidden>?subject=unsubscribe>
08025 <<< List-Archive: </pipermail>
08025 <<< List-Help:
<mailto:<email address hidden>?subject=help>
08025 <<< Sender: <email address hidden>
08025 <<< Errors-To: <email address hidden>
08025 <<<
08025 <<< ENDOFTEST
08025 <<<
08025 <<< .
08025 >>> 250 2.0.0 g9VDs9Nu008025 Message accepted for
delivery
08027 === CONNECT localhost
08025 <<< mail FROM:<email address hidden>
size=1168
08025 >>> 250 2.1.0 <email address hidden>...
Sender ok
08025 <<< rcpt TO:<email address hidden>
08027 <<< 220 company.at LMTP company 20021003 ready
08027 >>> LHLO mx.company.at
Oct 31 14:54:09 tweak sm-mta[8025]: g9VDs9Nu008025:
from=<email address hidden>, size=1168,
class=-30, nrcpts=1,
msgid=<email address hidden>,
proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Oct 31 14:54:09 2002 (7608) Uncaught runner exception:
please run connect() first
Oct 31 14:54:09 2002 (7608) Traceback (most recent call
last):
  File "/opt/mailman/current/Mailman/Queue/Runner.py",
line 105, in _oneloop
    self._onefile(msg, msgdata)
  File "/opt/mailman/current/Mailman/Queue/Runner.py",
line 154, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
  File
"/opt/mailman/current/Mailman/Queue/OutgoingRunner.py",
line 61, in _dispose
    self._func(mlist, msg, msgdata)
  File
"/opt/mailman/current/Mailman/Handlers/SMTPDirect.py",
line 149, in process
    conn.quit()
  File
"/opt/mailman/current/Mailman/Handlers/SMTPDirect.py",
line 79, in quit
    self.__conn.quit()
  File "/usr/lib/python2.2/smtplib.py", line 671, in quit
    self.docmd("quit")
  File "/usr/lib/python2.2/smtplib.py", line 352, in docmd
    self.putcmd(cmd,args)
  File "/usr/lib/python2.2/smtplib.py", line 308, in putcmd
    self.send(str)
  File "/usr/lib/python2.2/smtplib.py", line 300, in send
    raise SMTPServerDisconnected('please run connect()
first')
SMTPServerDisconnected: please run connect() first

08027 <<< 250-company.at
08027 <<< 250-8BITMIME
08027 <<< 250-ENHANCEDSTATUSCODES
08027 <<< 250-PIPELINING
08027 <<< 250-SIZE
08027 <<< 250-AUTH EXTERNAL
08027 <<< 250 IGNOREQUOTA
08027 >>> MAIL From:<email address hidden>
SIZE=1168
08027 <<< 250 2.1.0 ok
08027 >>> RCPT To:<kari>
08027 >>> DATA
08027 <<< 250 2.1.5 ok
08027 <<< 354 go ahead
08027 >>> Return-Path: <email address hidden>
08027 >>> Received: from tweak.company.at (localhost
[127.0.0.1]) by mx.company.at (company.at/20021013)
with ESMTP id g9VDs9Nu008025 for
<email address hidden>; Thu, 31 Oct 2002
14:54:09 +0100
08027 >>> Received: from company.at (fqdn.domain.net
[2.3.4.5]) by mx.company.at
08027 >>> (company.at/20021013) with SMTP id
g9VDs6Nu008018 for <email address hidden>;
08027 >>> Thu, 31 Oct 2002 14:54:06 +0100
08027 >>> Date: Thu, 31 Oct 2002 15:05:15 +0100
08027 >>> Mime-Version: 1.0 (Apple Message framework v546)
08027 >>> Content-Type: text/plain; charset=US-ASCII;
format=flowed
08027 >>> From: SENDER REALNAME <email address hidden>
08027 >>> To: <email address hidden>
08027 >>> Content-Transfer-Encoding: 7bit
08027 >>> Message-Id:
<email address hidden>
08027 >>> X-Mailer: Apple Mail (2.546)
08027 >>> Subject: [Apfelsucht] test
08027 >>> X-BeenThere: <email address hidden>
08027 >>> Precedence: list
08027 >>> List-Id: Appl'o'holics, MacLovers & Switchers
 <apfelsucht.company.at>
08027 >>> List-Post: <mailto:<email address hidden>>
08027 >>> List-Subscribe:
<https://webmail.company.at/mailman/listinfo/apfelsucht>,
08027 >>>
<mailto:<email address hidden>?subject=subscribe>
08027 >>> List-Unsubscribe:
<https://webmail.company.at/mailman/listinfo/apfelsucht>,
08027 >>>
<mailto:<email address hidden>?subject=unsubscribe>
08027 >>> List-Archive: </pipermail>
08027 >>> List-Help:
<mailto:<email address hidden>?subject=help>
08027 >>> Sender: <email address hidden>
08027 >>> Errors-To: <email address hidden>
08027 >>>
08027 >>> ENDOFTEST
08027 >>>
08027 >>> .
08027 <<< 250 2.1.5 Ok
08027 >>> QUIT
08027 <<< 221 2.0.0 bye
Oct 31 14:54:10 tweak sm-mta[8027]: g9VDs9Nu008025:
to=<email address hidden>, delay=00:00:01,
xdelay=00:00:01, mailer=local,pri=85157,
relay=localhost, dsn=2.0.0, stat=Sent
---

PLEASE SEND HELP!

[http://sourceforge.net/tracker/index.php?func=detail&aid=631569&group_id=103&atid=100103]

Revision history for this message
Uplink2sf (uplink2sf) wrote :
Revision history for this message
Barry Warsaw (barry) wrote :

Can you start by upgrading to Python 2.2.2? We need to
eliminate any possibility that this is a problem that's been
patched in the latest stable Python release.

Revision history for this message
Uplink2sf (uplink2sf) wrote :

Thanks - weird, but doing a clean wipe-old compile-new
python 2.2.2 did the trick.
without *any* other changes, everything's working like a charme.

heads up!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.