Changeset 38


Ignore:
Timestamp:
01/24/06 23:37:05 (17 years ago)
Author:
bas
Message:

EmailtoTracScript?:

Email2trac:

  • Changes SPAM level control how it used to be accepted a patch from somebody without proper reviewing it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • emailtotracscript/trunk/email2trac.py.in

    r24 r38  
    261261                        tkt['summary'] = self.to_unicode(msg['Subject'])
    262262
    263                 if self.SPAM_LEVEL and self.spam(msg):
    264                         print 'This message is a SPAM. Automatic ticket insertion refused (SPAM level > %d' % self.SPAM_LEVEL
    265                         sys.exit(1)
    266 
    267                 if settings.has_key('component'):
     263
     264                if self.SPAM_LEVEL:
     265                        tkt['component'] = self.spam(msg)
     266                elif settings.has_key('component'):
    268267                        tkt['component'] = settings['component']
    269268                else:
    270269                        tkt['component'] = self.get_config('ticket', 'default_component')
     270
     271                # Must make this an option or so, discard SPAM messages or save then
     272                # and delete later
     273                #
     274                #if self.SPAM_LEVEL and self.spam(msg):
     275                #       print 'This message is a SPAM. Automatic ticket insertion refused (SPAM level > %d' % self.SPAM_LEVEL
     276                #       sys.exit(1)
    271277
    272278                # Get default owner for component
Note: See TracChangeset for help on using the changeset viewer.