Custom Query (332 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (112 - 114 of 332)

Ticket Resolution Summary Owner Reporter
#63 fixed Crash when parsing X-Spam-Score headers with no score bas email2trac@…
Description

Given a non-spam email, i.e. the X-Spam-Score header is present, but has no value, the script will crash with:

Traceback (most recent call last):
  File "/usr/bin/email2trac", line 1137, in ?     tktparser.parse(sys.stdin)
  File "/usr/bin/email2trac", line 710, in parse     component =  self.spam(m)
  File "/usr/bin/email2trac", line 245, in spam     number = spam_l[0].count('*')
IndexError: list index out of range

Patch as follows:

--- email2trac.orig     2008-05-29 15:02:15.000000000 -0700
+++ email2trac  2008-05-29 15:04:09.000000000 -0700
@@ -242,7 +242,10 @@
                spam = False
                if message.has_key('X-Spam-Score'):
                        spam_l = string.split(message['X-Spam-Score'])
-                       number = spam_l[0].count('*')
+                       if len(spam_l) == 0:
+                               number = 0
+                       else:
+                               number = spam_l[0].count('*')
 
                        if number >= self.SPAM_LEVEL:
                                spam = True
#64 fixed Configuration flag for SpamAssassin header bas email2trac@…
Description

Spam filtering uses the header X-Spam-Score as a hard-coded value.

Recent versions of SpamAssassin? uses X-Spam-Level instead, thus it will be useful if there is a configuration option for the header.

Providing the standard value as default will be nice too.

#73 fixed Project name is no longer optional (regression in 0.30) bas email2trac@…
Description

Using email2trac.conf:

[DEFAULT]
project: /var/www/cgi-bin/garage/trac/support

email2trac -n -f email2trac.conf produces error message:

No Trac project is defined in the email2trac config file.

Currently, the workaround is to use email2trac.conf:

[DEFAULT]
project: /var/www/cgi-bin/garage/trac/support

[support]
project: /var/www/cgi-bin/garage/trac/support

with the command email2trac -n -f email2trac.conf -p support

If the old behavior is no longer supported, then the documentation needs to be updated accordingly.

Note: See TracQuery for help on using queries.