Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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.d/composites.conf' to add and merge
  6. # parameters defined inside this section
  7. #
  8. # You can modify 'override.d/composites.conf' to strictly override all
  9. # parameters defined inside this section
  10. #
  11. # See https://rspamd.com/doc/faq.html#what-are-the-locald-and-overrided-directories
  12. # for details
  13. #
  14. # See https://rspamd.com/doc/tutorials/writing_rules.html and
  15. # https://rspamd.com/doc/configuration/composites.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. description = "Forged sender, but message is forwarded";
  26. policy = "remove_weight";
  27. }
  28. SPF_FAIL_FORWARDING {
  29. expression = "g:forwarding & (R_SPF_SOFTFAIL | R_SPF_FAIL)";
  30. policy = "remove_weight";
  31. }
  32. DMARC_POLICY_ALLOW_WITH_FAILURES {
  33. expression = "DMARC_POLICY_ALLOW & (R_SPF_SOFTFAIL | R_SPF_FAIL | R_DKIM_REJECT)";
  34. policy = "remove_weight";
  35. }
  36. FORGED_RECIPIENTS_FORWARDING {
  37. expression = "FORGED_RECIPIENTS & g:forwarding";
  38. policy = "remove_weight";
  39. }
  40. FORGED_SENDER_VERP_SRS {
  41. expression = "FORGED_SENDER & (ENVFROM_PRVS | ENVFROM_VERP)";
  42. }
  43. FORGED_MUA_MAILLIST {
  44. expression = "g:mua & -MAILLIST";
  45. }
  46. RBL_SPAMHAUS_XBL_ANY {
  47. expression = "RBL_SPAMHAUS_XBL & RECEIVED_SPAMHAUS_XBL";
  48. description = "From and Received address are listed in Spamhaus XBL";
  49. }
  50. AUTH_NA {
  51. expression = "R_DKIM_NA & R_SPF_NA & DMARC_NA & ARC_NA";
  52. score = 1.0;
  53. policy = "remove_weight";
  54. description = "Authenticating message via SPF/DKIM/DMARC/ARC not available";
  55. }
  56. AUTH_NA_OR_FAIL {
  57. expression = "!(R_DKIM_NA & R_SPF_NA & DMARC_NA & ARC_NA) & (R_DKIM_NA | R_DKIM_TEMPFAIL | R_DKIM_PERMFAIL) & (R_SPF_NA | R_SPF_DNSFAIL) & DMARC_NA & (ARC_NA | ARC_DNSFAIL)";
  58. score = 1.0;
  59. policy = "remove_weight";
  60. description = "No authenticating method SPF/DKIM/DMARC/ARC was successful";
  61. }
  62. BOUNCE_NO_AUTH {
  63. expression = "(AUTH_NA | AUTH_NA_OR_FAIL) & (BOUNCE | SUBJ_BOUNCE_WORDS)";
  64. score = 1.0;
  65. }
  66. DKIM_MIXED {
  67. expression = "-R_DKIM_ALLOW & (R_DKIM_TEMPFAIL | R_DKIM_PERMFAIL | R_DKIM_REJECT)"
  68. policy = "remove_weight";
  69. }
  70. MAIL_RU_MAILER_BASE64 {
  71. expression = "MAIL_RU_MAILER & (FROM_EXCESS_BASE64 | MIME_BASE64_TEXT | REPLYTO_EXCESS_BASE64 | SUBJ_EXCESS_BASE64 | TO_EXCESS_BASE64)";
  72. }
  73. YANDEX_RU_MAILER_CTYPE_MIXED_BOGUS {
  74. expression = "YANDEX_RU_MAILER & -HAS_ATTACHMENT & CTYPE_MIXED_BOGUS";
  75. }
  76. MAILER_1C_8_BASE64 {
  77. expression = "MAILER_1C_8 & (FROM_EXCESS_BASE64 | MIME_BASE64_TEXT | SUBJ_EXCESS_BASE64 | TO_EXCESS_BASE64)";
  78. description = "Message was sent by '1C:Enterprise 8' and uses base64 encoded data";
  79. }
  80. HACKED_WP_PHISHING {
  81. expression = "(HAS_X_POS | HAS_PHPMAILER_SIG) & HAS_WP_URI & (PHISHING | DBL_PHISH | PHISHED_OPENPHISH | PHISHED_PHISHTANK)";
  82. description = "Phish message sent by hacked Wordpress instance";
  83. policy = "leave";
  84. }
  85. COMPROMISED_ACCT_BULK {
  86. expression = "(HAS_XOIP | RCVD_FROM_SMTP_AUTH) & DCC_BULK";
  87. description = "Likely to be from a compromised account";
  88. score = 3.0;
  89. policy = "leave";
  90. }
  91. UNDISC_RCPTS_BULK {
  92. expression = "DCC_BULK & (MISSING_TO | R_UNDISC_RCPT)";
  93. description = "Missing or undisclosed recipients with a bulk signature";
  94. score = 3.0;
  95. policy = "leave";
  96. }
  97. RCVD_UNAUTH_PBL {
  98. expression = "RECEIVED_PBL & !RCVD_VIA_SMTP_AUTH";
  99. description = "Relayed through ZEN PBL IP without sufficient authentication (possible indicating an open relay)";
  100. score = 2.0;
  101. policy = "leave";
  102. }
  103. RCVD_DKIM_ARC_DNSWL_MED {
  104. expression = "(R_DKIM_ALLOW | ARC_ALLOW) & RCVD_IN_DNSWL_MED";
  105. description = "Sufficiently DKIM/ARC signed and received from IP with medium trust at DNSWL";
  106. score = -0.5;
  107. policy = "leave";
  108. }
  109. RCVD_DKIM_ARC_DNSWL_HI {
  110. expression = "(R_DKIM_ALLOW | ARC_ALLOW) & RCVD_IN_DNSWL_HI";
  111. description = "Sufficiently DKIM/ARC signed and received from IP with high trust at DNSWL";
  112. score = -1.0;
  113. policy = "leave";
  114. }
  115. AUTOGEN_PHP_SPAMMY {
  116. expression = "(HAS_X_POS | HAS_PHPMAILER_SIG | HAS_X_PHP_SCRIPT) & (SUBJECT_ENDS_QUESTION | SUBJECT_ENDS_EXCLAIM | MANY_INVISIBLE_PARTS)";
  117. description = "Message was generated by PHP script and contains some spam indicators";
  118. score = 1.0;
  119. policy = "leave";
  120. }
  121. PHISH_EMOTION {
  122. expression = "(PHISHING | DBL_PHISH | PHISHED_OPENPHISH | PHISHED_PHISHTANK) & (SUBJECT_ENDS_QUESTION | SUBJECT_ENDS_EXCLAIM)";
  123. description = "Phish message with subject trying to address users emotion";
  124. score = 1.0;
  125. policy = "leave";
  126. }
  127. HAS_ANON_DOMAIN {
  128. expression = "HAS_GUC_PROXY_URI | URIBL_RED | DBL_ABUSE_REDIR | HAS_ONION_URI";
  129. description = "Contains one or more domains trying to disguise owner/destination";
  130. score = 0.1;
  131. policy = "leave";
  132. }
  133. BAD_REP_POLICIES {
  134. description = "Contains valid policies but are also marked by fuzzy/bayes/surbl/rbl";
  135. expression = "(~g-:policies) & (-g+:fuzzy | -g+:statistics | -g+:surbl | -g+:rbl)";
  136. score = 0.1;
  137. }
  138. VIOLATED_DIRECT_SPF {
  139. description = "Has no Received (or no trusted received relays) and SPF policy fails or soft fails";
  140. expression = "(R_SPF_FAIL | R_SPF_SOFTFAIL) & (RCVD_COUNT_ZERO | RCVD_NO_TLS_LAST)";
  141. policy = "leave";
  142. score = 3.5;
  143. }
  144. IP_SCORE_FREEMAIL {
  145. description = "Negate IP_SCORE when message comes from FreeMail";
  146. expression = "FREEMAIL_FROM & SENDER_REP_SPAM";
  147. score = 0.0;
  148. policy = "remove_weight";
  149. }
  150. BROKEN_HEADERS_MAILLIST {
  151. description = "Negate BROKEN_HEADERS when message comes via some mailing list";
  152. expression = "BROKEN_HEADERS & -MAILLIST";
  153. score = 0.0;
  154. policy = "remove_weight";
  155. }
  156. LEAKED_PASSWORD_SCAM {
  157. description = "Contains BTC wallet address and scam patterns";
  158. expression = "BITCOIN_ADDR & (LEAKED_PASSWORD_SCAM_RE | R_MIXED_CHARSET | R_EMPTY_IMAGE)";
  159. policy = "leave";
  160. score = 7.0;
  161. group = "scams";
  162. }
  163. FREEMAIL_AFF {
  164. expression = "(FREEMAIL_FROM | FREEMAIL_ENVFROM | FREEMAIL_REPLYTO) & R_UNDISC_RCPT & (INTRODUCTION | FROM_NAME_HAS_TITLE | FREEMAIL_REPLYTO_NEQ_FROM_DOM)";
  165. score = 4.0;
  166. policy = "leave";
  167. description = "Message exhibits strong characteristics of advance fee fraud (AFF a/k/a '419' spam) involving freemail addresses";
  168. }
  169. .include(try=true; priority=1; duplicate=merge) "$LOCAL_CONFDIR/local.d/composites.conf"
  170. .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/composites.conf"
  171. }