Changeset 118


Ignore:
Timestamp:
10/05/06 21:01:07 (16 years ago)
Author:
bas
Message:

EmailtoTracScript?:

email2trac.py.in, email2trac.conf:

  • Added drop_spam option
Location:
emailtotracscript/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • emailtotracscript/trunk/ChangeLog

    r117 r118  
    88          Fixed by   : Bas van der Vlies
    99          Thanks to Matthew Good for the hint
     10        * Added drop_spam option, default = 0. If set then
     11          mail marked as Spam is not accepted.
    1012
    11132006-10-02
  • emailtotracscript/trunk/email2trac.conf

    r115 r118  
    1212enable_syslog : 0
    1313alternate_notify_template :
     14drop_spam : 0
    1415
    1516
  • emailtotracscript/trunk/email2trac.py.in

    r117 r118  
    166166                        self.TICKET_UPDATE = 0
    167167
     168                if parameters.has_key('drop_spam'):
     169                        self.DROP_SPAM = int(parameters['drop_spam'])
     170                else:
     171                        self.DROP_SPAM = 0
     172
    168173
    169174        # X-Spam-Score: *** (3.255) BAYES_50,DNS_FROM_AHBL_RHSBL,HTML_
     
    403408                        tkt['component'] = self.spam(msg)
    404409
    405                 # Must make this an option or so, discard SPAM messages or save then
    406                 # and delete later
    407                 #
    408                 #if self.SPAM_LEVEL and self.spam(msg):
    409                 #       print 'This message is a SPAM. Automatic ticket insertion refused (SPAM level > %d' % self.SPAM_LEVEL
    410                 #       sys.exit(1)
     410                # Discard SPAM messages.
     411                #
     412                if self.DROP_SPAM:
     413                        # print 'This message is a SPAM. Automatic ticket insertion refused (SPAM level > %d' % self.SPAM_LEVEL
     414                        sys.exit(0)
    411415
    412416                # Set default owner for component
Note: See TracChangeset for help on using the changeset viewer.