You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

spamassassin.rules 3.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # These rules are from SpamAssasin project! (but might be modified)
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to you under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at:
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. ifplugin Mail::SpamAssassin::Plugin::FreeMail
  17. freemail_domains qq.com yahoo.com outlook.com
  18. freemail_domains lycosmail.com hotmail.com
  19. header FREEMAIL_FROM eval:check_freemail_from()
  20. describe FREEMAIL_FROM Sender email is commonly abused enduser mail provider
  21. score FREEMAIL_FROM 1.0
  22. header FREEMAIL_ENVFROM_END_DIGIT eval:check_freemail_header('EnvelopeFrom', '\d@')
  23. describe FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit
  24. score FREEMAIL_ENVFROM_END_DIGIT 1.0
  25. header FREEMAIL_SUBJECT eval:check_freemail_header('Subject')
  26. describe FREEMAIL_SUBJECT Subject contains freemail
  27. score FREEMAIL_SUBJECT 1.0
  28. endif
  29. ifplugin Mail::SpamAssassin::Plugin::WLBLEval
  30. header USER_IN_BLACKLIST eval:check_from_in_blacklist()
  31. describe USER_IN_BLACKLIST From: address is in the user's black-list
  32. tflags USER_IN_BLACKLIST userconf noautolearn
  33. score USER_IN_BLACKLIST 10.0
  34. header USER_IN_WHITELIST eval:check_from_in_whitelist()
  35. describe USER_IN_WHITELIST From: address is in the user's white-list
  36. tflags USER_IN_WHITELIST userconf nice noautolearn
  37. score USER_IN_WHITELIST -10.0
  38. header USER_IN_BLACKLIST_TO eval:check_to_in_blacklist()
  39. describe USER_IN_BLACKLIST_TO User is listed in 'blacklist_to'
  40. tflags USER_IN_BLACKLIST_TO userconf noautolearn
  41. score USER_IN_BLACKLIST_TO 10.0
  42. header USER_IN_WHITELIST_TO eval:check_to_in_whitelist()
  43. describe USER_IN_WHITELIST_TO User is listed in 'whitelist_to'
  44. tflags USER_IN_WHITELIST_TO userconf nice noautolearn
  45. score USER_IN_WHITELIST_TO -10.0
  46. # not implemented
  47. #header USER_IN_DEF_WHITELIST eval:check_from_in_default_whitelist()
  48. #describe USER_IN_DEF_WHITELIST From: address is in the default white-list
  49. #tflags USER_IN_DEF_WHITELIST userconf nice noautolearn
  50. #score USER_IN_DEF_WHITELIST -10.0
  51. # not implemented
  52. #header USER_IN_MORE_SPAM_TO eval:check_to_in_more_spam()
  53. #describe USER_IN_MORE_SPAM_TO User is listed in 'more_spam_to'
  54. #tflags USER_IN_MORE_SPAM_TO userconf nice noautolearn
  55. # not implemented
  56. #header USER_IN_ALL_SPAM_TO eval:check_to_in_all_spam()
  57. #describe USER_IN_ALL_SPAM_TO User is listed in 'all_spam_to'
  58. #tflags USER_IN_ALL_SPAM_TO userconf nice noautolearn
  59. blacklist_to xxx@example.com
  60. blacklist_from yy@example.com
  61. whitelist_from nasutkadqw@esumare.ru
  62. whitelist_to zelen@megafonkavkaz.ru
  63. # not implemented
  64. #whitelist_from example@example.net yy@example.com
  65. # not implemented
  66. #whitelist_from *@example.com
  67. # not implemented
  68. #whitelist_from_rcvd *@example.org
  69. # not implemented
  70. #def_whitelist_from rspamd.com
  71. endif
  72. # These rules are /not/ from SpamAssassin project
  73. header TEST_XFOO X-Foo =~ /.{1,50}/
  74. score TEST_XFOO 1
  75. header TEST_XBAR X-Bar =~ /.{1,50}/
  76. score TEST_XBAR 1
  77. meta TEST_META1 TEST_XFOO && TEST_XBAR
  78. meta TEST_META2 TEST_META1 && SIMPLE_TEST
  79. meta TEST_META3 TEST_META1 && TEST_META2
  80. meta TEST_META4 TEST_META3 && TEST_XBAR