SF.net SVN: tmda: [2173] trunk/tmda/bin/tmda-ofmipd

[email protected] Tue, 13 Mar 2007 20:50:50 -0700
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Revision: 2173
          http://svn.sourceforge.net/tmda/?rev=2173&view=rev
Author:   srwarren
Date:     2007-03-13 20:50:49 -0700 (Tue, 13 Mar 2007)

Log Message:
-----------
tmda-ofmipd: RFC3207 conformance fix: After STARTTLS, the state is reset to the point *after* the server signon has been sent, which means that we shouldn't send the server signon again. Sending it again was confusing some SMTP clients.

Modified Paths:
--------------
    trunk/tmda/bin/tmda-ofmipd

Modified: trunk/tmda/bin/tmda-ofmipd
===================================================================
--- trunk/tmda/bin/tmda-ofmipd	2007-03-12 23:15:35 UTC (rev 2172)
+++ trunk/tmda/bin/tmda-ofmipd	2007-03-14 03:50:49 UTC (rev 2173)
@@ -698,11 +698,13 @@
 class SMTPSessionSignon(asynchat.async_chat):
     def __init__(self, conn):
         asynchat.async_chat.__init__(self, conn)
+        self._sent_signon = False
 
     def handle_connect(self):
         self.init_dynamic_state() # calls sub-class
-        self.push('220 %s ESMTP tmda-ofmipd' % FQDN)
-        self.set_terminator('\r\n')
+        if not self._sent_signon:
+            self._sent_signon = True
+            self.push('220 %s ESMTP tmda-ofmipd' % FQDN)
 
 class SMTPSession(SMTPSessionSignon):
     COMMAND = 0
@@ -726,6 +728,7 @@
 
         # Initialize object state
 
+        self.set_terminator('\r\n')
         self.init_static_state()
 
         # Debug tracing


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.