[Zope-Checkins] SVN: Zope/branches/2.11/ Merge r108731 from 2.12: MailHost fallback to HELO

Martijn Pieters mj at zopatista.com
Wed Feb 3 09:15:24 EST 2010


Log message for revision 108733:
  Merge r108731 from 2.12: MailHost fallback to HELO

Changed:
  U   Zope/branches/2.11/doc/CHANGES.txt
  U   Zope/branches/2.11/lib/python/Products/MailHost/mailer.py

-=-
Modified: Zope/branches/2.11/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.11/doc/CHANGES.txt	2010-02-03 14:10:01 UTC (rev 108732)
+++ Zope/branches/2.11/doc/CHANGES.txt	2010-02-03 14:15:23 UTC (rev 108733)
@@ -4,6 +4,12 @@
   Change information for previous versions of Zope can be found in the
   file HISTORY.txt.
 
+  Zope 2.11.7 (Unreleased)
+
+    Bugs Fixed
+
+      - MailHost should fall back to HELO when EHLO fails.
+
   Zope 2.11.6 (2010/01/12)
 
     Bugs Fixed

Modified: Zope/branches/2.11/lib/python/Products/MailHost/mailer.py
===================================================================
--- Zope/branches/2.11/lib/python/Products/MailHost/mailer.py	2010-02-03 14:10:01 UTC (rev 108732)
+++ Zope/branches/2.11/lib/python/Products/MailHost/mailer.py	2010-02-03 14:15:23 UTC (rev 108733)
@@ -49,8 +49,10 @@
         # send EHLO
         code, response = connection.ehlo()
         if code < 200 or code >300:
-            raise RuntimeError('Error sending EHLO to the SMTP server '
-                                '(code=%s, response=%s)' % (code, response))
+            code, response = connection.helo()
+            if code < 200 or code >300:
+                raise RuntimeError('Error sending HELO to the SMTP server '
+                                   '(code=%s, response=%s)' % (code, response))
 
         # encryption support
         have_tls =  connection.has_extn('starttls') 



More information about the Zope-Checkins mailing list