bts_specific 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. # BTS Specific rules
  2. # Rules to credit some properties of valid BTS mail
  3. rawbody HAS_PACKAGE /^Package:/im
  4. describe HAS_PACKAGE Has a Package: line, probably a valid report
  5. tflags HAS_PACKAGE nice
  6. score HAS_PACKAGE -6.0
  7. header X_DEBBUGS_CC exists:X-Debbugs-Cc
  8. describe X_DEBBUGS_CC Has an X-Debbugs-Cc: header
  9. tflags X_DEBBUGS_CC nice
  10. score X_DEBBUGS_CC -3.0
  11. header X_DEBBUGS_NO_ACK exists:X-Debbugs-No-Ack
  12. describe X_DEBBUGS_NO_ACK Has an X-Debbugs-No-Ack: header
  13. tflags X_DEBBUGS_NO_ACK nice
  14. score X_DEBBUGS_NO_ACK -3.0
  15. # SA doesn't like literal # symbols in rules
  16. # blarson 2006-10-27 Allow space
  17. header HAS_BUG_NUMBER Subject =~ /Bug\s*\x23\d+:/i
  18. describe HAS_BUG_NUMBER Has a debbugs-style Bug# in the subject line
  19. tflags HAS_BUG_NUMBER nice
  20. score HAS_BUG_NUMBER -3.0
  21. # blarson 2007-07-05
  22. 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
  23. describe VALID_BTS_CONTROL Seems to be valid BTS control command
  24. tflags VALID_BTS_CONTROL nice
  25. score VALID_BTS_CONTROL -2
  26. # blarson 2004-04-10 20050316 add index packages
  27. rawbody INDEXMAINT /^index(?:-|\s+)(?:maint\s+\S+\@|packages)/
  28. describe INDEXMAINT index-maint command
  29. tflags INDEXMAINT nice
  30. score INDEXMAINT -5
  31. # blarson 2006-05-11 2006-09-09 change score
  32. 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/
  33. describe SUBSCRIBEBUG subscribing to bug
  34. tflags SUBSCRIBEBUG nice
  35. score SUBSCRIBEBUG -0.1
  36. # blarson 2007-04-26
  37. 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/
  38. describe SUBSCRIBE2 subscribing to bug
  39. tflags SUBSCRIBE2 nice
  40. score SUBSCRIBE2 -1
  41. # blarson 2009-10-09
  42. header SUBSCRIBE3 received =~ /\(at \d{3,8}-(?:(?:un)?subscribe|subhelp|ignore|(?:sub(?:yes|approve|reject)|unsubyes|bounce|probe|approve|reject|setlistyes|setlistsilentyes).*)\)/
  43. describe SUBSCRIBE3 bug subscription
  44. tflags SUBSCRIBE3 nice
  45. score SUBSCRIBE3 -4
  46. header FROMDEVELOPER From =~ /\@debian.org/i
  47. describe FROMDEVELOPER Appears to be a message from a developer
  48. tflags FROMDEVELOPER nice
  49. score FROMDEVELOPER -2
  50. # joy, 2003-07-20, 2003-11-09
  51. # this is pretty generic
  52. header BUGNUMBERGREETING Subject =~ /^(hi|hey)?\s*\d{4}\d*(-\S+)?(\!|,)/i
  53. describe BUGNUMBERGREETING greeting or addressing the bug number
  54. score BUGNUMBERGREETING 3
  55. # joy, 2003-11-09, 2003-12-28
  56. # note that Subject: Bug#12345 ... and Subject: Re: Bug#12345 ... won't match
  57. header SPAMBUGNUMSUBJ Subject =~ /^\d\d\d\d/i
  58. describe SPAMBUGNUMSUBJ greeting or addressing the bug number, simple test
  59. score SPAMBUGNUMSUBJ 1
  60. # joy, 2003-12-29
  61. header SPAMBUGADDRSUBJ Subject =~ /^\d{4,}(-[^@]+)?\@bugs/i
  62. describe SPAMBUGADDRSUBJ greeting or addressing the bug address
  63. score SPAMBUGADDRSUBJ 2.5
  64. # blarson 2007-07-06
  65. header MAJORDOMO subject =~ /\bMajordomo results\: Bug\b/
  66. describe MAJORDOMO MAJORDOMO infinite loop
  67. score MAJORDOMO 4
  68. # blarson 2007-07-19
  69. header INFOLOOP subject =~ /Re: Bug\#\d+\: Info received \(Bug\#\d+: Info received/
  70. describe INFOLOOP Loopy autoresponder
  71. score INFOLOOP 7
  72. # blarson 2007-11-17
  73. header KOI8R Content-Type =~ /koi8-r/i
  74. describe KOI8R russian content
  75. score KOI8R 4
  76. # blarson 2007-09-07
  77. header SUBKOI8R subject =~ /koi8-r/i
  78. describe SUBKOI8R russian subject
  79. score SUBKOI8R 4
  80. # blarson 2007-12-10
  81. score ONEWORD 3
  82. # blarson 2008-04-03
  83. header CLOSE subject =~ /^\s*(?:closed?|done|Closing)\s*$/i
  84. describe CLOSE closing bug
  85. tflags CLOSE nice
  86. score CLOSE -2
  87. # blarson 2008-06-97
  88. body VERSION /^version\:\s+\S+\s*$/i
  89. describe VERSION version number specified in body
  90. tflags VERSION nice
  91. score VERSION -1
  92. # blarson 2008-09-04 new spamassasin html rules broken
  93. header HTMLCONT content-type =~ /text\/html/i
  94. describe HTMLCONT html only
  95. score HTMLCONT 3
  96. # blarson 2008-09-04
  97. header MULTALT content-type =~ /multipart\/alternative/i
  98. describe MULTALT multipart-alternative
  99. score MULTALT 1
  100. # blarson 2008-10-29
  101. header CREATETICK subject =~ /Unable to create Ticket/
  102. describe CREATETICK Unable to create Ticket
  103. score CREATETICK 4
  104. # blarson 2008-11-28
  105. body ONPHPDEV /onphp-dev-ru.lists.shadanakar.org/
  106. describe ONPHPDEV keeps spamming owner, spamassassin autolearns as ham?
  107. score ONPHPDEV 3
  108. # blarson 2009-07-03
  109. header FELIX X-BeenThere =~ /felix-impl\@lists\.sourceforge\.net/
  110. describe FELIX felix list bounces
  111. score FELIX 4
  112. # blarson 2009-10-08
  113. body BUGADDR /^\d{3,8}\@bugs\.debian\.org$/i
  114. describe BUGADDR bug address in line by itself
  115. score BUGADDR 1
  116. # blarson 2009-10-11
  117. header UNSUB subject =~ /unsubscribe/i
  118. describe UNSUB unsubscribe
  119. score UNSUB 2