comparison roundup/mailgw.py @ 590:b43f031f3946

tabnuke
author Richard Jones <richard@users.sourceforge.net>
date Wed, 23 Jan 2002 21:43:23 +0000
parents 16d13b9b8321
children 82555a1429d0
comparison
equal deleted inserted replaced
589:28debb477133 590:b43f031f3946
71 set() method to add the message to the item's spool; in the second case we 71 set() method to add the message to the item's spool; in the second case we
72 are calling the create() method to create a new node). If an auditor raises 72 are calling the create() method to create a new node). If an auditor raises
73 an exception, the original message is bounced back to the sender with the 73 an exception, the original message is bounced back to the sender with the
74 explanatory message given in the exception. 74 explanatory message given in the exception.
75 75
76 $Id: mailgw.py,v 1.58 2002-01-23 21:41:56 richard Exp $ 76 $Id: mailgw.py,v 1.59 2002-01-23 21:43:23 richard Exp $
77 ''' 77 '''
78 78
79 79
80 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri 80 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
81 import time, random 81 import time, random
174 m = self.bounce_message(message, sendto, m) 174 m = self.bounce_message(message, sendto, m)
175 except: 175 except:
176 # bounce the message back to the sender with the error message 176 # bounce the message back to the sender with the error message
177 sendto = [sendto[0][1], self.instance.ADMIN_EMAIL] 177 sendto = [sendto[0][1], self.instance.ADMIN_EMAIL]
178 m = [''] 178 m = ['']
179 m.append('An unexpected error occurred during the processing') 179 m.append('An unexpected error occurred during the processing')
180 m.append('of your message. The tracker administrator is being') 180 m.append('of your message. The tracker administrator is being')
181 m.append('notified.\n') 181 m.append('notified.\n')
182 m.append('---- traceback of failure ----') 182 m.append('---- traceback of failure ----')
183 s = cStringIO.StringIO() 183 s = cStringIO.StringIO()
184 import traceback 184 import traceback
185 traceback.print_exc(None, s) 185 traceback.print_exc(None, s)
186 m.append(s.getvalue()) 186 m.append(s.getvalue())
755 l.append(section) 755 l.append(section)
756 return summary, '\n\n'.join(l) 756 return summary, '\n\n'.join(l)
757 757
758 # 758 #
759 # $Log: not supported by cvs2svn $ 759 # $Log: not supported by cvs2svn $
760 # Revision 1.58 2002/01/23 21:41:56 richard
761 # . mailgw failures (unexpected ones) are forwarded to the roundup admin
762 #
760 # Revision 1.57 2002/01/22 22:27:43 richard 763 # Revision 1.57 2002/01/22 22:27:43 richard
761 # . handle stripping of "AW:" from subject line 764 # . handle stripping of "AW:" from subject line
762 # 765 #
763 # Revision 1.56 2002/01/22 11:54:45 rochecompaan 766 # Revision 1.56 2002/01/22 11:54:45 rochecompaan
764 # Fixed status change in mail gateway. 767 # Fixed status change in mail gateway.

Roundup Issue Tracker: http://roundup-tracker.org/