mailman does not work with exim and python 1.5.2
Hello!
Mailman does not work with exim and python 1.5.2, probably because of the esmtp support in python 1.5.2's smtplib. Following is a trace from exim. Note that exim gets an ehlo and later a helo which resets it into smtp from esmtp. Please forward this to the appropriate python forums :)
set_process_info: 15805 2.11 handling incoming connection from localhost [127.0.0.1] ready for new message smtp_setup_msg entered SMTP<< ehlo darmol.elte.hu sender_fullhost = localhost (darmol.elte.hu) [127.0.0.1] sender_rcvhost = localhost ([127.0.0.1] helo=darmol.elte.hu) set_process_info: 15805 2.11 handling incoming connection from localhost (darmol.elte.hu) [127.0.0.1] 250-darmol.elte.hu Hello localhost [127.0.0.1] 250-SIZE 2000000 250-PIPELINING 250 HELP SMTP<< helo darmol.elte.hu sender_fullhost = localhost (darmol.elte.hu) [127.0.0.1] sender_rcvhost = localhost ([127.0.0.1] helo=darmol.elte.hu) set_process_info: 15805 2.11 handling incoming connection from localhost (darmol.elte.hu) [127.0.0.1] 250 darmol.elte.hu Hello localhost [127.0.0.1] SMTP<< mail FROM:<teszt-admin@darmol.elte.hu> size=1335 LOG: 4 MAIN SMTP syntax error in "mail FROM:<teszt-admin@darmol.elte.hu> size=1335" H=localhost (darmol.elte.hu) [127.0.0.1]: malformed address: size=1335 may not follow <teszt-admin@darmol.elte.hu> 501 <teszt-admin@darmol.elte.hu> size=1335: malformed address: size=1335 may not follow <teszt-admin@darmol.elte.hu> SMTP<< rset 250 Reset OK 421 darmol.elte.hu lost input connection LOG: 4 MAIN SMTP connection from localhost (darmol.elte.hu) [127.0.0.1] lost child 15805 ended
-- Madarasz Gergely gorgo@caesar.elte.hu gorgo@linux.rulez.org It's practically impossible to look at a penguin and feel angry. Egy pingvinre gyakorlatilag lehetetlen haragosan nezni. HuLUG: http://mlf.linux.rulez.org/
On Sun, 25 Apr 1999, Gergely Madarasz wrote:
Hello!
Mailman does not work with exim and python 1.5.2, probably because of the esmtp support in python 1.5.2's smtplib. Following is a trace from exim. Note that exim gets an ehlo and later a helo which resets it into smtp from esmtp. Please forward this to the appropriate python forums :)
Erf, yes,I should have thrown a warning your folx's way (I'm the
maintainer of python's smtplib) In 1.5.2 some of the return values of methods have been changed. Before, some of the methods returned integrer codes, some string descriptions, and some (code,desc) tuples. Now they _all_ return tuples (and the exception objects have more meaningful info, too). I'm in the middle of moving now, so I don't have access to a news server that carries c.l.p ATM, and half my equipment is packed. the patch should be simple In Mailman.Utils.TrySMTPDelivery() there is a few lines like:
conn = smtplib.SMTP(mm_cfg.SMTPHOST)
# Do the EHLO/HELO manually so we can check for DSN support
if conn.ehlo() >= 400:
conn.helo()
change it to:
conn = smtplib.SMTP(mm_cfg.SMTPHOST)
# Do the EHLO/HELO manually so we can check for DSN support
if conn.ehlo()[0] >= 400:
conn.helo()
(This change was considered resonable, as only code using ESMTP would likely need to call the SMTP command methods, most other code just uses the sendmail() method, and 1.5.1's smtplib didn't support ESMTP, so 1.5.2 was the 'last chance' to regularize the return values )
-The Dragon De Monsyne
"Dragon" == The Dragon De Monsyne <dragondm@integral.org> writes:
| conn = smtplib.SMTP(mm_cfg.SMTPHOST)
| # Do the EHLO/HELO manually so we can check for DSN support
| if conn.ehlo() >= 400:
| conn.helo()
Dragon> change it to:
| conn = smtplib.SMTP(mm_cfg.SMTPHOST)
| # Do the EHLO/HELO manually so we can check for DSN support
| if conn.ehlo()[0] >= 400:
| conn.helo()
Thanks for the patch Dragon. I'm going to also copy Python 1.5.2's final smtplib.py file into Mailman/pythonlib and keep the module test hack in TrySMTPDelivery. What this means is that Mailman will probably be broken for Python 1.5.2 beta, but I don't think that's a huge loss. Comments?
-Barry
Oh dang. I just remembered that smtplib.py has a patch by Per Cederqvist post Python 1.5.2. I'm going to copy that version to Mailman/pythonlib and use it unconditionally. Dragon, how's that sound?
-Barry
(sorry fer th' delay, I'm on vacation & net access is scarce)
On Tue, 27 Apr 1999, Barry A. Warsaw wrote:
Oh dang. I just remembered that smtplib.py has a patch by Per Cederqvist post Python 1.5.2. I'm going to copy that version to Mailman/pythonlib and use it unconditionally. Dragon, how's that sound?
Should be fine , i've seen that patch (if it's the one I'm
thinking of) Eventually that patch should be put in the std python lib sometime (1.5.3?)
-The Dragon De Monsyne
"TDDM" == The Dragon De Monsyne <dragondm@integral.org> writes:
Dragon> Should be fine , i've seen that patch (if it's the one
Dragon> I'm thinking of) Eventually that patch should be put in
Dragon> the std python lib sometime (1.5.3?)
It should be in there (that's where I snagged it from).
Thanks, -Barry
participants (3)
-
Barry A. Warsaw
-
Gergely Madarasz
-
The Dragon De Monsyne