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.

multimap.conf 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. # Please don't modify this file as your changes might be overwritten with
  2. # the next update.
  3. #
  4. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
  5. # parameters defined on the top level
  6. #
  7. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
  8. # parameters defined on the top level
  9. #
  10. # For specific modules or configuration you can also modify
  11. # '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
  12. # '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
  13. #
  14. # See https://rspamd.com/doc/tutorials/writing_rules.html for details
  15. multimap {
  16. # Freemail Addresses
  17. freemail_envfrom {
  18. type = "from";
  19. filter = "email:domain";
  20. map = "https://maps.rspamd.com/freemail/free.txt.zst";
  21. symbol = "FREEMAIL_ENVFROM";
  22. description = "Envelope From is a Freemail address";
  23. score = 0.0;
  24. }
  25. freemail_envrcpt {
  26. type = "rcpt";
  27. filter = "email:domain";
  28. map = "https://maps.rspamd.com/freemail/free.txt.zst";
  29. symbol = "FREEMAIL_ENVRCPT";
  30. description = "Envelope Recipient is a Freemail address";
  31. score = 0.0;
  32. }
  33. freemail_from {
  34. type = "header";
  35. header = "from";
  36. filter = "email:domain";
  37. map = "https://maps.rspamd.com/freemail/free.txt.zst";
  38. symbol = "FREEMAIL_FROM";
  39. description = "From is a Freemail address";
  40. score = 0.0;
  41. }
  42. freemail_to {
  43. type = "header";
  44. header = "To";
  45. filter = "email:domain";
  46. map = "https://maps.rspamd.com/freemail/free.txt.zst";
  47. symbol = "FREEMAIL_TO";
  48. description = "To is a Freemail address";
  49. score = 0.0;
  50. }
  51. freemail_cc {
  52. type = "header";
  53. header = "Cc";
  54. filter = "email:domain";
  55. map = "https://maps.rspamd.com/freemail/free.txt.zst";
  56. symbol = "FREEMAIL_CC";
  57. description = "To is a Freemail address";
  58. score = 0.0;
  59. }
  60. freemail_replyto {
  61. type = "header";
  62. header = "Reply-To";
  63. filter = "email:domain";
  64. map = "https://maps.rspamd.com/freemail/free.txt.zst";
  65. symbol = "FREEMAIL_REPLYTO";
  66. description = "Reply-To is a Freemail address";
  67. score = 0.0;
  68. }
  69. # Disposable Addresses
  70. disposable_envfrom {
  71. type = "from";
  72. filter = "email:domain";
  73. map = "https://rspamd.com/freemail/disposable.txt.zst";
  74. symbol = "DISPOSABLE_ENVFROM";
  75. description = "Envelope From is a Disposable e-mail address";
  76. score = 0.0;
  77. }
  78. disposable_envrcpt {
  79. type = "rcpt";
  80. filter = "email:domain";
  81. map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
  82. symbol = "DISPOSABLE_ENVRCPT";
  83. description = "Envelope Recipient is a Disposable e-mail address";
  84. score = 0.0;
  85. }
  86. disposable_from {
  87. type = "header";
  88. header = "from";
  89. filter = "email:domain";
  90. map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
  91. symbol = "DISPOSABLE_FROM";
  92. description = "From a Disposable e-mail address";
  93. score = 0.0;
  94. }
  95. disposable_to {
  96. type = "header";
  97. header = "To";
  98. filter = "email:domain";
  99. map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
  100. symbol = "DISPOSABLE_TO";
  101. description = "To a disposable e-mail address";
  102. score = 0.0;
  103. }
  104. disposable_cc {
  105. type = "header";
  106. header = "Cc";
  107. filter = "email:domain";
  108. map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
  109. symbol = "DISPOSABLE_CC";
  110. description = "To a disposable e-mail address";
  111. score = 0.0;
  112. }
  113. disposable_replyto {
  114. type = "header";
  115. header = "Reply-To";
  116. filter = "email:domain";
  117. map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
  118. symbol = "DISPOSABLE_REPLYTO";
  119. description = "Reply-To a disposable e-mail address";
  120. score = 0.0;
  121. }
  122. .include(try=true,priority=5) "${DBDIR}/dynamic/multimap.conf"
  123. .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/multimap.conf"
  124. .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/multimap.conf"
  125. }
  126. /* Example setup
  127. sender_from_whitelist_user {
  128. type = "from";
  129. filter = "email:user";
  130. map = "file:///tmp/from.map";
  131. symbol = "SENDER_FROM_WHITELIST_USER";
  132. action = "accept"; # Prefilter mode
  133. }
  134. sender_from_regexp {
  135. type = "header";
  136. header = "from";
  137. filter = 'regexp:/.*@/';
  138. map = "file:///tmp/from_re.map";
  139. symbol = "SENDER_FROM_REGEXP";
  140. }
  141. url_map {
  142. type = "url";
  143. filter = "tld";
  144. map = "file:///tmp/url.map";
  145. symbol = "URL_MAP";
  146. }
  147. url_tld_re {
  148. type = "url";
  149. filter = 'tld:regexp:/\.[^.]+$/'; # Extracts the last component of URL
  150. map = "file:///tmp/url.map";
  151. symbol = "URL_MAP_RE";
  152. }
  153. */