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

[email protected] Mon, 13 Nov 2006 18:15:32 -0800
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Revision: 2126
          http://svn.sourceforge.net/tmda/?rev=2126&view=rev
Author:   srwarren
Date:     2006-11-13 18:15:32 -0800 (Mon, 13 Nov 2006)

Log Message:
-----------
tmda-ofmipd: Explicitly log all exceptions thrown by process_message. This should allow us to find those exceptions that cause the connection to be dropped, instead of sending an SMTP error message back to that client.

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

Modified: trunk/tmda/bin/tmda-ofmipd
===================================================================
--- trunk/tmda/bin/tmda-ofmipd	2006-11-06 13:20:58 UTC (rev 2125)
+++ trunk/tmda/bin/tmda-ofmipd	2006-11-14 02:15:32 UTC (rev 2126)
@@ -778,11 +778,17 @@
 
             if not opts.throttlescript or not os.system("%s %s" % (opts.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:
+                    print >>DEBUGSTREAM, "process_message raised an exception:"
+                    import traceback
+                    traceback.print_exc(DEBUGSTREAM)
+                    raise
             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.