2 # Rules to credit some properties of valid BTS mail
4 rawbody HAS_PACKAGE /^Package:/im
5 describe HAS_PACKAGE Has a Package: line, probably a valid report
6 tflags HAS_PACKAGE nice
9 header X_DEBBUGS_CC exists:X-Debbugs-Cc
10 describe X_DEBBUGS_CC Has an X-Debbugs-Cc: header
11 tflags X_DEBBUGS_CC nice
12 score X_DEBBUGS_CC -3.0
14 header X_DEBBUGS_NO_ACK exists:X-Debbugs-No-Ack
15 describe X_DEBBUGS_NO_ACK Has an X-Debbugs-No-Ack: header
16 tflags X_DEBBUGS_NO_ACK nice
17 score X_DEBBUGS_NO_ACK -3.0
19 # SA doesn't like literal # symbols in rules
20 # blarson 2006-10-27 Allow space
21 header HAS_BUG_NUMBER Subject =~ /Bug\s*\x23\d+:/i
22 describe HAS_BUG_NUMBER Has a debbugs-style Bug# in the subject line
23 tflags HAS_BUG_NUMBER nice
24 score HAS_BUG_NUMBER -3.0
27 rawbody VALID_BTS_CONTROL /^(reassign\s+\d{3,6}\s+[a-z\d-]+\s*|(reopen|submitter|owner)\s+\d{3,6}\s|forward\s+\d{3,6}\s+|(notforwarded|unmerge|noowner)\s+\d{3,6}\s*$|retitle\s+\d{3,6}\s+.{10,80}$|severity\s+\d{3,6}\s+(critical|grave|serious|important|normal|minor|wishlist)|clone\s+\d{3,6}\s+-\d$|merge(\s+\d{3,6}){2,4}\s*$|tags?\s+\d{3,6}\s+([\-\+\=]?\s*[a-z]+\s*)*|(not)?found\s+\d+\s+\S+\s*$)/i
28 describe VALID_BTS_CONTROL Seems to be valid BTS control command
29 tflags VALID_BTS_CONTROL nice
30 score VALID_BTS_CONTROL -2
32 # blarson 2004-04-10 20050316 add index packages
33 rawbody INDEXMAINT /^index(?:-|\s+)(?:maint\s+\S+\@|packages)/
34 describe INDEXMAINT index-maint command
35 tflags INDEXMAINT nice
38 # blarson 2006-05-11 2006-09-09 change score
39 header SUBSCRIBEBUG To =~ /\b\d{3,7}\-(?:(?:un)?subscribe|subhelp|ignore|(?:sub(?:yes|approve|reject)|unsubyes|bounce|probe|approve|reject|setlistyes|setlistsilentyes).*)\@bugs\.debian\.org\b/
40 describe SUBSCRIBEBUG subscribing to bug
41 tflags SUBSCRIBEBUG nice
42 score SUBSCRIBEBUG -0.1
45 header SUBSCRIBE2 received =~ /\b for \d{3,7}\-(?:(?:un)?subscribe|subhelp|ignore|(?:sub(?:yes|approve|reject)|unsubyes|bounce|probe|approve|reject|setlistyes|setlistsilentyes).*)\@bugs\.debian\.org\b/
46 describe SUBSCRIBE2 subscribing to bug
47 tflags SUBSCRIBE2 nice
50 header FROMDEVELOPER From =~ /\@debian.org/i
51 describe FROMDEVELOPER Appears to be a message from a developer
52 tflags FROMDEVELOPER nice
53 score FROMDEVELOPER -2
56 # joy, 2003-07-20, 2003-11-09
57 # this is pretty generic
58 header BUGNUMBERGREETING Subject =~ /^(hi|hey)?\s*\d{4}\d*(-\S+)?(\!|,)/i
59 describe BUGNUMBERGREETING greeting or addressing the bug number
60 score BUGNUMBERGREETING 3
62 # joy, 2003-11-09, 2003-12-28
63 # note that Subject: Bug#12345 ... and Subject: Re: Bug#12345 ... won't match
64 header SPAMBUGNUMSUBJ Subject =~ /^\d\d\d\d/i
65 describe SPAMBUGNUMSUBJ greeting or addressing the bug number, simple test
66 score SPAMBUGNUMSUBJ 1
69 header SPAMBUGADDRSUBJ Subject =~ /^\d{4,}(-[^@]+)?\@bugs/i
70 describe SPAMBUGADDRSUBJ greeting or addressing the bug address
71 score SPAMBUGADDRSUBJ 2.5
74 header MAJORDOMO subject =~ /\bMajordomo results\: Bug\b/
75 describe MAJORDOMO MAJORDOMO infinite loop
79 header INFOLOOP subject =~ /Re: Bug\#\d+\: Info received \(Bug\#\d+: Info received/
80 describe INFOLOOP Loopy autoresponder
84 header KOI8R Content-Type =~ /koi8-r/i
85 describe KOI8R korean content
92 header CLOSE subject =~ /^\s*(?:closed?|done|Closing)\s*$/i
93 describe CLOSE closing bug