See attachment. Guess I can't "post" to that mailing list. Perhaps just
because I'm not subscribed? Anyway, I subscribed now, so hopefully that
won't happen again!
--- Begin Message ---
You are not allowed to post to this mailing list, and your message has
been automatically rejected.  If you think that your messages are
being rejected in error, contact the mailing list owner at
[EMAIL PROTECTED]

--- Begin Message ---
Revision: 2034
          http://svn.sourceforge.net/tmda/?rev=2034&view=rev
Author:   srwarren
Date:     2006-09-24 19:56:10 -0700 (Sun, 24 Sep 2006)

Log Message:
-----------
tmda-ofmipd: Wrap message processing in an exception handler.

This new code catches all exceptions thrown during message processing,
and returns a valid SMTP error response to the client application.
Without this, exceptions (e.g. caused by incorrect syntax in the
outgoing filter) will simply abort the SMTP connection. This confuses
some clients (e.g. Thunderbird), which then think that the message
was successfully sent, when it was actually dropped. Sending an SMTP
error fixes that (arguably, the client should be fixed, but this
change is good in and of itself.)

Notes:
* This fix is untested on TMDA trunk, since I can't upgrade to 1.1.x
  yet, because I need to patch in run-from-stunnel support (soon!)
  However, the same patch has been working on 1.0.2+ for years.
* Perhaps this exception handler should eventually cover a larger
  block of the code (i.e. the whole function its in) to catch all
  errors at any time during the SMTP protocol.

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

Modified: trunk/tmda/bin/tmda-ofmipd
===================================================================
--- trunk/tmda/bin/tmda-ofmipd  2006-09-22 23:30:51 UTC (rev 2033)
+++ trunk/tmda/bin/tmda-ofmipd  2006-09-25 02:56:10 UTC (rev 2034)
@@ -793,11 +793,14 @@
 
             if not throttlescript or not os.system("%s %s" % (throttlescript,
                 self.__auth_username)):
-                status = self.__server.process_message(self.__peer,
-                                                       self.__mailfrom,
-                                                       self.__rcpttos,
-                                                       self.__data,
-                                                       self.__auth_username)
+                try:
+                    status = self.__server.process_message(self.__peer,
+                                                           self.__mailfrom,
+                                                           self.__rcpttos,
+                                                           self.__data,
+                                                           
self.__auth_username)
+                except:
+                    status = self.push('451 Internal exception in tmda-ofmipd')
             else:
                 status = self.push('450 Outgoing mail quota exceeded')
 


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

--- End Message ---

--- End Message ---

Attachment: signature.asc
Description: OpenPGP digital signature

_________________________________________________
tmda-workers mailing list ([email protected])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to