Changeset 149 for emailtotracscript
- Timestamp:
- 03/08/07 22:53:07 (17 years ago)
- Location:
- emailtotracscript/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
emailtotracscript/trunk/ChangeLog
r146 r149 1 2007-03-08 Michel Jouvin <jouvin@lal.in2p3.fr> 2 * email2trac.py : blacklist (don't create ticket) mail from 3 MAILER-DAEMON to avoid loops 4 * msg.bad.txt : add an example of message from MAILER-DAEMON 5 6 1 7 2006-12-08 2 8 * email2trac.py: -
emailtotracscript/trunk/email2trac.py.in
r148 r149 202 202 return self.get_config('ticket', 'default_component') 203 203 204 def blacklisted_from(self): 205 FROM_RE = re.compile(r""" 206 MAILER-DAEMON@ 207 """, re.VERBOSE) 208 result = FROM_RE.search(self.email_addr) 209 if result: 210 return True 211 else: 212 return False 213 204 214 def email_to_unicode(self, message_str): 205 215 """ … … 443 453 # 444 454 if self.DROP_SPAM and (tkt['component'] == 'Spam'): 445 # print 'This message is a SPAM. Automatic ticket insertion refused (SPAM level > %d' % self.SPAM_LEVEL 455 if self.DROP_SPAM > 2 : 456 print 'This message is a SPAM. Automatic ticket insertion refused (SPAM level > %d' % self.SPAM_LEVEL 446 457 return False 447 458 … … 510 521 511 522 self.db = self.env.get_db_cnx() 512 self.get_author_emailaddrs(m) 523 self.get_author_emailaddrs(m) 524 if self.blacklisted_from(): 525 if self.DEBUG > 1 : 526 print 'Message rejected : From: in blacklist' 527 return False 513 528 514 529 if self.get_config('notification', 'smtp_enabled') in ['true']:
Note: See TracChangeset
for help on using the changeset viewer.