# BTS Specific rules # Rules to credit some properties of valid BTS mail rawbody HAS_PACKAGE /^Package:/im describe HAS_PACKAGE Has a Package: line, probably a valid report tflags HAS_PACKAGE nice score HAS_PACKAGE -6.0 header X_DEBBUGS_CC exists:X-Debbugs-Cc describe X_DEBBUGS_CC Has an X-Debbugs-Cc: header tflags X_DEBBUGS_CC nice score X_DEBBUGS_CC -3.0 header X_DEBBUGS_NO_ACK exists:X-Debbugs-No-Ack describe X_DEBBUGS_NO_ACK Has an X-Debbugs-No-Ack: header tflags X_DEBBUGS_NO_ACK nice score X_DEBBUGS_NO_ACK -3.0 # SA doesn't like literal # symbols in rules # blarson 2006-10-27 Allow space header HAS_BUG_NUMBER Subject =~ /Bug\s*\x23\d+:/i describe HAS_BUG_NUMBER Has a debbugs-style Bug# in the subject line tflags HAS_BUG_NUMBER nice score HAS_BUG_NUMBER -3.0 # blarson 2007-07-05 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+.+$)/i describe VALID_BTS_CONTROL Seems to be valid BTS control command tflags VALID_BTS_CONTROL nice score VALID_BTS_CONTROL -2 # blarson 2004-04-10 20050316 add index packages rawbody INDEXMAINT /^index(?:-|\s+)(?:maint\s+\S+\@|packages)/ describe INDEXMAINT index-maint command tflags INDEXMAINT nice score INDEXMAINT -5 # blarson 2006-05-11 2006-09-09 change score 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/ describe SUBSCRIBEBUG subscribing to bug tflags SUBSCRIBEBUG nice score SUBSCRIBEBUG -1 # blarson 2007-04-26 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/ describe SUBSCRIBE2 subscribing to bug tflags SUBSCRIBE2 nice score SUBSCRIBE2 -6 header FROMDEVELOPER From =~ /\@debian.org/i describe FROMDEVELOPER Appears to be a message from a developer tflags FROMDEVELOPER nice score FROMDEVELOPER -2 # joy, 2003-07-20, 2003-11-09 # this is pretty generic header BUGNUMBERGREETING Subject =~ /^(hi|hey)?\s*\d{4}\d*(-\S+)?(\!|,)/i describe BUGNUMBERGREETING greeting or addressing the bug number score BUGNUMBERGREETING 3 # joy, 2003-11-09, 2003-12-28 # note that Subject: Bug#12345 ... and Subject: Re: Bug#12345 ... won't match header SPAMBUGNUMSUBJ Subject =~ /^\d\d\d\d/i describe SPAMBUGNUMSUBJ greeting or addressing the bug number, simple test score SPAMBUGNUMSUBJ 1 # joy, 2003-12-29 header SPAMBUGADDRSUBJ Subject =~ /^\d{4,}(-[^@]+)?\@bugs/i describe SPAMBUGADDRSUBJ greeting or addressing the bug address score SPAMBUGADDRSUBJ 2.5 # blarson 2007-07-06 header MAJORDOMO subject =~ /\bMajordomo results\: Bug\b/ describe MAJORDOMO MAJORDOMO infinite loop score MAJORDOMO 4 # blarson 2007-07-19 header INFOLOOP subject =~ /Re: Bug\#\d+\: Info received \(Bug\#\d+: Info received/ describe INFOLOOP Loopy autoresponder score INFOLOOP 7