comparison roundup/mailgw.py @ 2670:bdf3a73dfd04

merge from maint-0-7
author Richard Jones <richard@users.sourceforge.net>
date Tue, 07 Sep 2004 10:40:15 +0000
parents 1df7d4a41da4
children 437775793d8e
comparison
equal deleted inserted replaced
2668:f48a81d49a86 2670:bdf3a73dfd04
72 set() method to add the message to the item's spool; in the second case we 72 set() method to add the message to the item's spool; in the second case we
73 are calling the create() method to create a new node). If an auditor raises 73 are calling the create() method to create a new node). If an auditor raises
74 an exception, the original message is bounced back to the sender with the 74 an exception, the original message is bounced back to the sender with the
75 explanatory message given in the exception. 75 explanatory message given in the exception.
76 76
77 $Id: mailgw.py,v 1.153 2004-07-28 02:29:45 richard Exp $ 77 $Id: mailgw.py,v 1.154 2004-09-07 10:40:15 richard Exp $
78 """ 78 """
79 __docformat__ = 'restructuredtext' 79 __docformat__ = 'restructuredtext'
80 80
81 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri 81 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
82 import time, random, sys 82 import time, random, sys
903 try: 903 try:
904 message_id = self.db.msg.create(author=author, 904 message_id = self.db.msg.create(author=author,
905 recipients=recipients, date=date.Date('.'), 905 recipients=recipients, date=date.Date('.'),
906 summary=summary, content=content, files=files, 906 summary=summary, content=content, files=files,
907 messageid=messageid, inreplyto=inreplyto, **msg_props) 907 messageid=messageid, inreplyto=inreplyto, **msg_props)
908 except exceptions.Reject: 908 except exceptions.Reject, error:
909 pass 909 raise MailUsageError, '''
910 else: 910 Mail message was rejected by a detector.
911 %s
912 '''%error
911 # attach the message to the node 913 # attach the message to the node
912 if nodeid: 914 if nodeid:
913 # add the message to the node's list 915 # add the message to the node's list
914 messages = cl.get(nodeid, 'messages') 916 messages = cl.get(nodeid, 'messages')
915 messages.append(message_id) 917 messages.append(message_id)

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