composites.conf 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. MX_IMPLICIT {
  2. expression = "MX_GOOD & MX_MISSING";
  3. score = -0.01;
  4. }
  5. VIRUS_FOUND {
  6. expression = "CLAM_VIRUS & !MAILCOW_WHITE";
  7. score = 2000.0;
  8. }
  9. # Bad policy from free mail providers
  10. FREEMAIL_POLICY_FAILURE {
  11. expression = "-g+:policies & !DMARC_POLICY_ALLOW & !MAILLIST & ( FREEMAIL_ENVFROM | FREEMAIL_FROM ) & !WHITELISTED_FWD_HOST";
  12. score = 16.0;
  13. }
  14. # Applies to freemail with undisclosed recipients
  15. FREEMAIL_TO_UNDISC_RCPT {
  16. expression = "FREEMAIL_FROM & ( MISSING_TO | R_UNDISC_RCPT | TO_EQ_FROM )";
  17. score = 5.0;
  18. }
  19. # Bad policy from non-whitelisted senders
  20. # Remove SOGO_CONTACT symbol for fwd hosts and senders with broken policy
  21. SOGO_CONTACT_EXCLUDE {
  22. expression = "(-WHITELISTED_FWD_HOST | -g+:policies) & ^SOGO_CONTACT & !DMARC_POLICY_ALLOW";
  23. }
  24. # Spoofed header from and broken policy (excluding sieve host, rspamd host, whitelisted senders, authenticated senders and forward hosts)
  25. SPOOFED_UNAUTH {
  26. expression = "!MAILCOW_AUTH & !MAILCOW_WHITE & !RSPAMD_HOST & !SIEVE_HOST & MAILCOW_DOMAIN_HEADER_FROM & !WHITELISTED_FWD_HOST & -g+:policies";
  27. score = 50.0;
  28. }
  29. # Only apply to inbound unauthed and not whitelisted
  30. OLEFY_MACRO {
  31. expression = "!MAILCOW_AUTH & !MAILCOW_WHITE & OLETOOLS";
  32. score = 20.0;
  33. policy = "remove_weight";
  34. }
  35. # Applies to a content filter map
  36. BAD_WORD_BAD_TLD {
  37. expression = "FISHY_TLD & ( BAD_WORDS | BAD_WORDS_DE )";
  38. score = 10.0;
  39. }
  40. # Forged with bad policies and not fwd host, keep bad policy symbols
  41. FORGED_W_BAD_POLICY {
  42. expression = "( -g+:policies | -R_SPF_NA) & ( ~FROM_NEQ_ENVFROM | ~FORGED_SENDER ) & !WHITELISTED_FWD_HOST & !DMARC_POLICY_ALLOW";
  43. score = 3.0;
  44. }
  45. # Keep negative (good) scores for rbl, policies and hfilter, disable neural group
  46. WL_FWD_HOST {
  47. expression = "-WHITELISTED_FWD_HOST & (^g+:rbl | ^g+:policies | ^g+:hfilter | ^g:neural)";
  48. }
  49. # Exclude X-Spam like flags from scoring from fwd and sieve hosts
  50. UPSTREAM_CHECKS_EXCLUDE_FWD_HOST {
  51. expression = "(-SIEVE_HOST | -WHITELISTED_FWD_HOST) & (^UNITEDINTERNET_SPAM | ^SPAM_FLAG | ^KLMS_SPAM | ^AOL_SPAM | ^MICROSOFT_SPAM)";
  52. }
  53. # Remove fuzzy group from bounces
  54. BOUNCE_FUZZY {
  55. expression = "-BOUNCE & ^g+:fuzzy";
  56. }
  57. # Remove bayes ham if fuzzy denied
  58. FUZZY_HAM_MISMATCH {
  59. expression = "( -FUZZY_DENIED | -MAILCOW_FUZZY_DENIED | -LOCAL_FUZZY_DENIED ) & ( ^BAYES_HAM | ^NEURAL_HAM_LONG | ^NEURAL_HAM_SHORT )";
  60. }
  61. # Remove bayes spam if local fuzzy white
  62. FUZZY_SPAM_MISMATCH {
  63. expression = "( -LOCAL_FUZZY_WHITE ) & ( ^BAYES_SPAM | ^NEURAL_SPAM_LONG | ^NEURAL_SPAM_SHORT )";
  64. }
  65. WL_FWD_HOST {
  66. expression = "-WHITELISTED_FWD_HOST & (^g+:rbl | ^g+:policies | ^g+:hfilter | ^g:neural)";
  67. }
  68. ENCRYPTED_CHAT {
  69. expression = "CHAT_VERSION_HEADER & ENCRYPTED_PGP";
  70. }