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
51 header SUBSCRIBE3 received =~ /\(at \d{3,8}-(?:(?:un)?subscribe|subhelp|ignore|(?:sub(?:yes|approve|reject)|unsubyes|bounce|probe|approve|reject|setlistyes|setlistsilentyes).*)\)/
52 describe SUBSCRIBE3 bug subscription
53 tflags SUBSCRIBE3 nice
56 header FROMDEVELOPER From =~ /\@debian.org/i
57 describe FROMDEVELOPER Appears to be a message from a developer
58 tflags FROMDEVELOPER nice
59 score FROMDEVELOPER -2
62 # joy, 2003-07-20, 2003-11-09
63 # this is pretty generic
64 header BUGNUMBERGREETING Subject =~ /^(hi|hey)?\s*\d{4}\d*(-\S+)?(\!|,)/i
65 describe BUGNUMBERGREETING greeting or addressing the bug number
66 score BUGNUMBERGREETING 3
68 # joy, 2003-11-09, 2003-12-28
69 # note that Subject: Bug#12345 ... and Subject: Re: Bug#12345 ... won't match
70 header SPAMBUGNUMSUBJ Subject =~ /^\d\d\d\d/i
71 describe SPAMBUGNUMSUBJ greeting or addressing the bug number, simple test
72 score SPAMBUGNUMSUBJ 1
75 header SPAMBUGADDRSUBJ Subject =~ /^\d{4,}(-[^@]+)?\@bugs/i
76 describe SPAMBUGADDRSUBJ greeting or addressing the bug address
77 score SPAMBUGADDRSUBJ 2.5
80 header MAJORDOMO subject =~ /\bMajordomo results\: Bug\b/
81 describe MAJORDOMO MAJORDOMO infinite loop
85 header INFOLOOP subject =~ /Re: Bug\#\d+\: Info received \(Bug\#\d+: Info received/
86 describe INFOLOOP Loopy autoresponder
90 header KOI8R Content-Type =~ /koi8-r/i
91 describe KOI8R russian content
95 header SUBKOI8R subject =~ /koi8-r/i
96 describe SUBKOI8R russian subject
103 header CLOSE subject =~ /^\s*(?:closed?|done|Closing)\s*$/i
104 describe CLOSE closing bug
109 body VERSION /^version\:\s+\S+\s*$/i
110 describe VERSION version number specified in body
114 # blarson 2008-09-04 new spamassasin html rules broken
115 header HTMLCONT content-type =~ /text\/html/i
116 describe HTMLCONT html only
120 header MULTALT content-type =~ /multipart\/alternative/i
121 describe MULTALT multipart-alternative
125 header CREATETICK subject =~ /Unable to create Ticket/
126 describe CREATETICK Unable to create Ticket
130 body ONPHPDEV /onphp-dev-ru.lists.shadanakar.org/
131 describe ONPHPDEV keeps spamming owner, spamassassin autolearns as ham?
135 header FELIX X-BeenThere =~ /felix-impl\@lists\.sourceforge\.net/
136 describe FELIX felix list bounces
140 body BUGADDR /^\d{3,8}\@bugs\.debian\.org$/i
141 describe BUGADDR bug address in line by itself
145 header UNSUB subject =~ /unsubscribe/i
146 describe UNSUB unsubscribe