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.

rbl.conf 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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. rbl {
  16. default_from = true;
  17. default_received = false;
  18. default_exclude_users = true;
  19. default_unknown = true;
  20. url_whitelist = [
  21. "https://maps.rspamd.com/rspamd/surbl-whitelist.inc.zst",
  22. "$LOCAL_CONFDIR/local.d/maps.d/surbl-whitelist.inc.local",
  23. "${DBDIR}/surbl-whitelist.inc.local",
  24. "fallback+file://${CONFDIR}/maps.d/surbl-whitelist.inc"
  25. ];
  26. rbls {
  27. spamhaus {
  28. symbol = "RBL_SPAMHAUS";
  29. rbl = "zen.spamhaus.org";
  30. ipv6 = true;
  31. returncodes {
  32. RBL_SPAMHAUS_SBL = "127.0.0.2";
  33. RBL_SPAMHAUS_CSS = "127.0.0.3";
  34. RBL_SPAMHAUS_XBL = ["127.0.0.4", "127.0.0.5",
  35. "127.0.0.6", "127.0.0.7"];
  36. RBL_SPAMHAUS_PBL = ["127.0.0.10", "127.0.0.11"];
  37. RBL_SPAMHAUS_DROP = "127.0.0.9";
  38. }
  39. }
  40. spamhaus_received {
  41. symbol = "RECEIVED_SPAMHAUS";
  42. rbl = "zen.spamhaus.org";
  43. ipv6 = true;
  44. received = true;
  45. from = false;
  46. ignore_whitelists = true;
  47. returncodes {
  48. RECEIVED_SPAMHAUS_SBL = "127.0.0.2";
  49. RECEIVED_SPAMHAUS_CSS = "127.0.0.3";
  50. RECEIVED_SPAMHAUS_XBL = ["127.0.0.4", "127.0.0.5",
  51. "127.0.0.6", "127.0.0.7"];
  52. RECEIVED_SPAMHAUS_PBL = ["127.0.0.10", "127.0.0.11"];
  53. RECEIVED_SPAMHAUS_DROP = "127.0.0.9";
  54. }
  55. }
  56. mailspike {
  57. symbol = "MAILSPIKE";
  58. rbl = "rep.mailspike.net";
  59. is_whitelist = true;
  60. whitelist_exception = "MAILSPIKE";
  61. whitelist_exception = "RWL_MAILSPIKE_GOOD";
  62. whitelist_exception = "RWL_MAILSPIKE_NEUTRAL";
  63. whitelist_exception = "RWL_MAILSPIKE_POSSIBLE";
  64. whitelist_exception = "RBL_MAILSPIKE_WORST";
  65. whitelist_exception = "RBL_MAILSPIKE_VERYBAD";
  66. whitelist_exception = "RBL_MAILSPIKE_BAD";
  67. returncodes {
  68. RBL_MAILSPIKE_WORST = "127.0.0.10";
  69. RBL_MAILSPIKE_VERYBAD = "127.0.0.11";
  70. RBL_MAILSPIKE_BAD = "127.0.0.12";
  71. RWL_MAILSPIKE_NEUTRAL = ["127.0.0.16", "127.0.0.15", "127.0.0.14", "127.0.0.13"];
  72. RWL_MAILSPIKE_POSSIBLE = "127.0.0.17";
  73. RWL_MAILSPIKE_GOOD = "127.0.0.18";
  74. RWL_MAILSPIKE_VERYGOOD = "127.0.0.19";
  75. RWL_MAILSPIKE_EXCELLENT = "127.0.0.20";
  76. }
  77. }
  78. senderscore {
  79. symbol = "RBL_SENDERSCORE";
  80. rbl = "bl.score.senderscore.com";
  81. }
  82. sem {
  83. symbol = "RBL_SEM";
  84. rbl = "bl.spameatingmonkey.net";
  85. ipv6 = false;
  86. }
  87. semIPv6 {
  88. symbol = "RBL_SEM_IPV6";
  89. rbl = "bl.ipv6.spameatingmonkey.net";
  90. ipv4 = false;
  91. ipv6 = true;
  92. }
  93. dnswl {
  94. symbol = "RCVD_IN_DNSWL";
  95. rbl = "list.dnswl.org";
  96. ipv6 = true;
  97. is_whitelist = true;
  98. whitelist_exception = "RCVD_IN_DNSWL";
  99. whitelist_exception = "RCVD_IN_DNSWL_NONE";
  100. whitelist_exception = "RCVD_IN_DNSWL_LOW";
  101. whitelist_exception = "DNSWL_BLOCKED";
  102. returncodes {
  103. RCVD_IN_DNSWL_NONE = "127.0.%d+.0";
  104. RCVD_IN_DNSWL_LOW = "127.0.%d+.1";
  105. RCVD_IN_DNSWL_MED = "127.0.%d+.2";
  106. RCVD_IN_DNSWL_HI = "127.0.%d+.3";
  107. DNSWL_BLOCKED = "127.0.0.255";
  108. }
  109. }
  110. # Provided by https://virusfree.cz
  111. virusfree {
  112. symbol = "RBL_VIRUSFREE_UNKNOWN";
  113. rbl = "bip.virusfree.cz";
  114. ipv6 = true;
  115. returncodes {
  116. RBL_VIRUSFREE_BOTNET = "127.0.0.2";
  117. }
  118. }
  119. nixspam {
  120. symbol = "RBL_NIXSPAM";
  121. rbl = "ix.dnsbl.manitu.net";
  122. ipv6 = true;
  123. }
  124. blocklistde {
  125. symbol = "RBL_BLOCKLISTDE";
  126. rbl = "bl.blocklist.de";
  127. ipv6 = true;
  128. }
  129. blocklistde_received {
  130. symbol = "RECEIVED_BLOCKLISTDE";
  131. rbl = "bl.blocklist.de";
  132. ipv6 = true;
  133. received = true;
  134. from = false;
  135. ignore_whitelists = true;
  136. }
  137. dnswl_dwl {
  138. symbol = "DWL_DNSWL";
  139. rbl = "dwl.dnswl.org";
  140. dkim = true;
  141. dkim_domainonly = false;
  142. dkim_match_from = true;
  143. ignore_whitelist = true;
  144. unknown = false;
  145. returncodes {
  146. DWL_DNSWL_NONE = "127.0.%d+.0";
  147. DWL_DNSWL_LOW = "127.0.%d+.1";
  148. DWL_DNSWL_MED = "127.0.%d+.2";
  149. DWL_DNSWL_HI = "127.0.%d+.3";
  150. DWL_DNSWL_BLOCKED = "127.0.0.255";
  151. }
  152. }
  153. # Old emails module
  154. RSPAMD_EMAILBL {
  155. ignore_defaults = true;
  156. emails_delimiter = ".";
  157. hash_format = "base32";
  158. hash_len = 32;
  159. rbl = "email.rspamd.com";
  160. replyto = true;
  161. hash = "blake2";
  162. returncodes = {
  163. RSPAMD_EMAILBL = "127.0.0.2";
  164. }
  165. }
  166. MSBL_EBL {
  167. ignore_defaults = true;
  168. rbl = "ebl.msbl.org";
  169. emails_domainonly = false;
  170. replyto = true;
  171. hash = "sha1";
  172. returncodes = {
  173. MSBL_EBL = [
  174. "127.0.0.2",
  175. "127.0.0.3"
  176. ];
  177. MSBL_EBL_GREY = [
  178. "127.0.1.2",
  179. "127.0.1.3"
  180. ];
  181. }
  182. }
  183. # Old SURBL module
  184. "SURBL_MULTI" {
  185. ignore_defaults = true;
  186. rbl = "multi.surbl.org";
  187. dkim = true;
  188. emails = true;
  189. emails_domainonly = true;
  190. urls = true;
  191. returnbits = {
  192. CRACKED_SURBL = 128; # From February 2016
  193. ABUSE_SURBL = 64;
  194. MW_SURBL_MULTI = 16;
  195. PH_SURBL_MULTI = 8;
  196. SURBL_BLOCKED = 1;
  197. }
  198. }
  199. "URIBL_MULTI" {
  200. ignore_defaults = true;
  201. rbl = "multi.uribl.com";
  202. dkim = true;
  203. emails = true;
  204. emails_domainonly = true;
  205. urls = true;
  206. returnbits {
  207. URIBL_BLOCKED = 1;
  208. URIBL_BLACK = 2;
  209. URIBL_GREY = 4;
  210. URIBL_RED = 8;
  211. }
  212. }
  213. "RSPAMD_URIBL" {
  214. ignore_defaults = true;
  215. rbl = "uribl.rspamd.com";
  216. dkim = true;
  217. emails = true;
  218. emails_domainonly = true;
  219. urls = true;
  220. hash = 'blake2';
  221. hash_len = 32;
  222. hash_format = 'base32';
  223. returncodes = {
  224. RSPAMD_URIBL = [
  225. "127.0.0.2",
  226. ];
  227. }
  228. }
  229. "DBL" {
  230. ignore_defaults = true;
  231. rbl = "dbl.spamhaus.org";
  232. no_ip = true;
  233. dkim = true;
  234. emails = true;
  235. emails_domainonly = true;
  236. urls = true;
  237. returncodes = {
  238. # spam domain
  239. DBL_SPAM = "127.0.1.2";
  240. # phish domain
  241. DBL_PHISH = "127.0.1.4";
  242. # malware domain
  243. DBL_MALWARE = "127.0.1.5";
  244. # botnet C&C domain
  245. DBL_BOTNET = "127.0.1.6";
  246. # abused legit spam
  247. DBL_ABUSE = "127.0.1.102";
  248. # abused spammed redirector domain
  249. DBL_ABUSE_REDIR = "127.0.1.103";
  250. # abused legit phish
  251. DBL_ABUSE_PHISH = "127.0.1.104";
  252. # abused legit malware
  253. DBL_ABUSE_MALWARE = "127.0.1.105";
  254. # abused legit botnet C&C
  255. DBL_ABUSE_BOTNET = "127.0.1.106";
  256. # error - IP queries prohibited!
  257. DBL_PROHIBIT = "127.0.1.255";
  258. }
  259. }
  260. # Not enabled by default due to privacy concerns! (see also groups.d/surbl_group.conf)
  261. #"SPAMHAUS_ZEN_URIBL" {
  262. # suffix = "zen.spamhaus.org";
  263. # resolve_ip = true;
  264. # check_emails = true;
  265. # ips {
  266. # URIBL_SBL = "127.0.0.2";
  267. # URIBL_SBL_CSS = "127.0.0.3";
  268. # URIBL_XBL = ["127.0.0.4", "127.0.0.5", "127.0.0.6", "127.0.0.7"];
  269. # URIBL_PBL = ["127.0.0.10", "127.0.0.11"];
  270. # URIBL_DROP = "127.0.0.9";
  271. # }
  272. #}
  273. "SEM_URIBL_UNKNOWN" {
  274. ignore_defaults = true;
  275. rbl = "uribl.spameatingmonkey.net";
  276. no_ip = true;
  277. dkim = true;
  278. emails = true;
  279. emails_domainonly = true;
  280. urls = true;
  281. returnbits {
  282. SEM_URIBL = 2;
  283. }
  284. }
  285. "SEM_URIBL_FRESH15_UNKNOWN" {
  286. ignore_defaults = true;
  287. rbl = "fresh15.spameatingmonkey.net";
  288. no_ip = true;
  289. dkim = true;
  290. emails = true;
  291. emails_domainonly = true;
  292. urls = true;
  293. returnbits {
  294. SEM_URIBL_FRESH15 = 2;
  295. }
  296. }
  297. # Proved to be broken
  298. #"RBL_SARBL_BAD" {
  299. # suffix = "public.sarbl.org";
  300. # noip = true;
  301. # images = true;
  302. #}
  303. }
  304. .include(try=true,priority=5) "${DBDIR}/dynamic/rbl.conf"
  305. .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/rbl.conf"
  306. .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/rbl.conf"
  307. }