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.

policies_group.conf 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. # Policies rules scores, includes SPF, DKIM, DMARC and ARC symbols
  2. #
  3. # Please don't modify this file as your changes might be overwritten with
  4. # the next update.
  5. #
  6. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
  7. # parameters defined on the top level
  8. #
  9. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
  10. # parameters defined on the top level
  11. #
  12. # For specific modules or configuration you can also modify
  13. # '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
  14. # '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
  15. #
  16. # See https://rspamd.com/doc/tutorials/writing_rules.html for details
  17. description = "SPF, DKIM, DMARC, ARC";
  18. symbols = {
  19. # SPF
  20. "R_SPF_FAIL" {
  21. weight = 1.0;
  22. description = "SPF verification failed";
  23. groups = ["spf"];
  24. }
  25. "R_SPF_SOFTFAIL" {
  26. weight = 0.0;
  27. description = "SPF verification soft-failed";
  28. groups = ["spf"];
  29. }
  30. "R_SPF_NEUTRAL" {
  31. weight = 0.0;
  32. description = "SPF policy is neutral";
  33. groups = ["spf"];
  34. }
  35. "R_SPF_ALLOW" {
  36. weight = -0.2;
  37. description = "SPF verification allows sending";
  38. groups = ["spf"];
  39. }
  40. "R_SPF_DNSFAIL" {
  41. weight = 0.0;
  42. description = "SPF DNS failure";
  43. groups = ["spf"];
  44. }
  45. "R_SPF_NA" {
  46. weight = 0.0;
  47. description = "Missing SPF record";
  48. one_shot = true;
  49. groups = ["spf"];
  50. }
  51. "R_SPF_PERMFAIL" {
  52. weight = 0.0;
  53. description = "SPF record is malformed or persistent DNS error";
  54. groups = ["spf"];
  55. }
  56. # DKIM
  57. "R_DKIM_REJECT" {
  58. weight = 1.0;
  59. description = "DKIM verification failed";
  60. one_shot = true;
  61. groups = ["dkim"];
  62. }
  63. "R_DKIM_TEMPFAIL" {
  64. weight = 0.0;
  65. description = "DKIM verification soft-failed";
  66. groups = ["dkim"];
  67. }
  68. "R_DKIM_PERMFAIL" {
  69. weight = 0.0;
  70. description = "DKIM verification hard-failed (invalid)";
  71. groups = ["dkim"];
  72. }
  73. "R_DKIM_ALLOW" {
  74. weight = -0.2;
  75. description = "DKIM verification succeed";
  76. one_shot = true;
  77. groups = ["dkim"];
  78. }
  79. "R_DKIM_NA" {
  80. weight = 0.0;
  81. description = "Missing DKIM signature";
  82. one_shot = true;
  83. groups = ["dkim"];
  84. }
  85. # DMARC
  86. "DMARC_POLICY_ALLOW" {
  87. weight = -0.5;
  88. description = "DMARC permit policy";
  89. groups = ["dmarc"];
  90. }
  91. "DMARC_POLICY_ALLOW_WITH_FAILURES" {
  92. weight = -0.5;
  93. description = "DMARC permit policy with DKIM/SPF failure";
  94. groups = ["dmarc"];
  95. }
  96. "DMARC_POLICY_REJECT" {
  97. weight = 2.0;
  98. description = "DMARC reject policy";
  99. groups = ["dmarc"];
  100. }
  101. "DMARC_POLICY_QUARANTINE" {
  102. weight = 1.5;
  103. description = "DMARC quarantine policy";
  104. groups = ["dmarc"];
  105. }
  106. "DMARC_POLICY_SOFTFAIL" {
  107. weight = 0.1;
  108. description = "DMARC failed";
  109. groups = ["dmarc"];
  110. }
  111. "DMARC_NA" {
  112. weight = 0.0;
  113. description = "No DMARC record";
  114. groups = ["dmarc"];
  115. }
  116. # ARC
  117. "ARC_ALLOW" {
  118. weight = -1.0;
  119. description = "ARC checks success";
  120. groups = ["arc"];
  121. }
  122. "ARC_REJECT" {
  123. weight = 2.0;
  124. description = "ARC checks failed";
  125. groups = ["arc"];
  126. }
  127. "ARC_INVALID" {
  128. weight = 1.0;
  129. description = "ARC structure invalid";
  130. groups = ["arc"];
  131. }
  132. "ARC_DNSFAIL" {
  133. weight = 0.0;
  134. description = "ARC DNS error";
  135. groups = ["arc"];
  136. }
  137. "ARC_NA" {
  138. weight = 0.0;
  139. description = "ARC signature absent";
  140. groups = ["arc"];
  141. }
  142. }