comparison roundup/mailgw.py @ 339:4e39e26ede38

Case-insensitive match for ISSUE_TRACKER_EMAIL in address in e-mail.
author Richard Jones <richard@users.sourceforge.net>
date Tue, 30 Oct 2001 11:26:10 +0000
parents 8cd545738d8e
children ab16997d9cda
comparison
equal deleted inserted replaced
338:b24754a5c629 339:4e39e26ede38
70 set() method to add the message to the item's spool; in the second case we 70 set() method to add the message to the item's spool; in the second case we
71 are calling the create() method to create a new node). If an auditor raises 71 are calling the create() method to create a new node). If an auditor raises
72 an exception, the original message is bounced back to the sender with the 72 an exception, the original message is bounced back to the sender with the
73 explanatory message given in the exception. 73 explanatory message given in the exception.
74 74
75 $Id: mailgw.py,v 1.26 2001-10-30 00:54:45 richard Exp $ 75 $Id: mailgw.py,v 1.27 2001-10-30 11:26:10 richard Exp $
76 ''' 76 '''
77 77
78 78
79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri 79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
80 import traceback 80 import traceback
249 # 249 #
250 # handle the users 250 # handle the users
251 # 251 #
252 author = self.db.uidFromAddress(message.getaddrlist('from')[0]) 252 author = self.db.uidFromAddress(message.getaddrlist('from')[0])
253 recipients = [] 253 recipients = []
254 tracker_email = self.ISSUE_TRACKER_EMAIL.lower()
254 for recipient in message.getaddrlist('to') + message.getaddrlist('cc'): 255 for recipient in message.getaddrlist('to') + message.getaddrlist('cc'):
255 if recipient[1].strip().lower() == self.ISSUE_TRACKER_EMAIL: 256 if recipient[1].strip().lower() == tracker_email:
256 continue 257 continue
257 recipients.append(self.db.uidFromAddress(recipient)) 258 recipients.append(self.db.uidFromAddress(recipient))
258 259
259 # now handle the body - find the message 260 # now handle the body - find the message
260 content_type = message.gettype() 261 content_type = message.gettype()
442 l.append(section) 443 l.append(section)
443 return summary, '\n\n'.join(l) 444 return summary, '\n\n'.join(l)
444 445
445 # 446 #
446 # $Log: not supported by cvs2svn $ 447 # $Log: not supported by cvs2svn $
448 # Revision 1.26 2001/10/30 00:54:45 richard
449 # Features:
450 # . #467129 ] Lossage when username=e-mail-address
451 # . #473123 ] Change message generation for author
452 # . MailGW now moves 'resolved' to 'chatting' on receiving e-mail for an issue.
453 #
447 # Revision 1.25 2001/10/28 23:22:28 richard 454 # Revision 1.25 2001/10/28 23:22:28 richard
448 # fixed bug #474749 ] Indentations lost 455 # fixed bug #474749 ] Indentations lost
449 # 456 #
450 # Revision 1.24 2001/10/23 22:57:52 richard 457 # Revision 1.24 2001/10/23 22:57:52 richard
451 # Fix unread->chatting auto transition, thanks Roch'e 458 # Fix unread->chatting auto transition, thanks Roch'e

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