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.

composites.conf 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Composites setup
  2. # Please don't modify this file as your changes might be overwritten with
  3. # the next update.
  4. #
  5. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
  6. # parameters defined on the top level
  7. #
  8. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
  9. # parameters defined on the top level
  10. #
  11. # For specific modules or configuration you can also modify
  12. # '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
  13. # '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
  14. #
  15. # See https://rspamd.com/doc/tutorials/writing_rules.html for details
  16. composites {
  17. FORGED_RECIPIENTS_MAILLIST {
  18. expression = "FORGED_RECIPIENTS & -MAILLIST";
  19. }
  20. FORGED_SENDER_MAILLIST {
  21. expression = "FORGED_SENDER & -MAILLIST";
  22. }
  23. FORGED_SENDER_FORWARDING {
  24. expression = "FORGED_SENDER & g:forwarding";
  25. policy = "remove_weight";
  26. }
  27. SPF_FAIL_FORWARDING {
  28. expression = "g:forwarding & (R_SPF_SOFTFAIL | R_SPF_FAIL)";
  29. policy = "remove_weight";
  30. }
  31. DMARC_POLICY_ALLOW_WITH_FAILURES {
  32. expression = "DMARC_POLICY_ALLOW & (R_SPF_SOFTFAIL | R_SPF_FAIL | R_DKIM_REJECT)";
  33. policy = "remove_weight";
  34. }
  35. FORGED_RECIPIENTS_FORWARDING {
  36. expression = "FORGED_RECIPIENTS & g:forwarding";
  37. policy = "remove_weight";
  38. }
  39. FORGED_SENDER_VERP_SRS {
  40. expression = "FORGED_SENDER & (ENVFROM_PRVS | ENVFROM_VERP)";
  41. }
  42. FORGED_MUA_MAILLIST {
  43. expression = "g:mua and -MAILLIST";
  44. }
  45. RBL_SPAMHAUS_XBL_ANY {
  46. expression = "RBL_SPAMHAUS_XBL & RECEIVED_SPAMHAUS_XBL";
  47. }
  48. AUTH_NA {
  49. expression = "R_DKIM_NA & R_SPF_NA & DMARC_NA";
  50. score = 1.0;
  51. policy = "remove_weight";
  52. }
  53. DKIM_MIXED {
  54. expression = "-R_DKIM_ALLOW & (R_DKIM_DNSFAIL | R_DKIM_PERMFAIL | R_DKIM_REJECT)"
  55. policy = "remove_weight";
  56. }
  57. MAIL_RU_MAILER_BASE64 {
  58. expression = "MAIL_RU_MAILER & (FROM_EXCESS_BASE64 | MIME_BASE64_TEXT | REPLYTO_EXCESS_BASE64 | SUBJ_EXCESS_BASE64 | TO_EXCESS_BASE64)";
  59. }
  60. YANDEX_RU_MAILER_CTYPE_MIXED_BOGUS {
  61. expression = "YANDEX_RU_MAILER & -HAS_ATTACHMENT & CTYPE_MIXED_BOGUS";
  62. }
  63. MAILER_1C_8_BASE64 {
  64. expression = "MAILER_1C_8 & (FROM_EXCESS_BASE64 | MIME_BASE64_TEXT | SUBJ_EXCESS_BASE64 | TO_EXCESS_BASE64)";
  65. }
  66. HACKED_WP_PHISHING {
  67. expression = "HAS_X_POS & HAS_WP_URI & PHISHING";
  68. policy = "leave";
  69. }
  70. COMPROMISED_ACCT_BULK {
  71. expression = "(HAS_XOIP | RCVD_FROM_SMTP_AUTH) & DCC_BULK";
  72. description = "Likely to be from a compromised account";
  73. score = 3.0;
  74. policy = "leave";
  75. }
  76. UNDISC_RCPTS_BULK {
  77. expression = "DCC_BULK & (MISSING_TO | R_UNDISC_RCPT)";
  78. description = "Missing or undisclosed recipients with a bulk signature";
  79. score = 3.0;
  80. policy = "leave";
  81. }
  82. RCVD_UNAUTH_PBL {
  83. expression = "RECEIVED_PBL & -RCVD_VIA_SMTP_AUTH";
  84. description = "Relayed through ZEN PBL IP without sufficient authentication";
  85. score = 2.0;
  86. policy = "leave";
  87. }
  88. .include(try=true; priority=1; duplicate=merge) "$LOCAL_CONFDIR/local.d/composites.conf"
  89. .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/composites.conf"
  90. }