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.

rspamd.xml 32KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <rspamd>
  3. <!-- Global section -->
  4. <lua src="/etc/rspamd/lua/rspamd.lua" />
  5. <!-- Options -->
  6. <options>
  7. <!-- Temporary directory -->
  8. <tempdir>/tmp</tempdir>
  9. <!-- Path to pid file -->
  10. <pidfile>/var/run/rspamd.pid</pidfile>
  11. <!-- Turned on C filters -->
  12. <filters>regexp,surbl,chartable,fuzzy_check,spf,dkim</filters>
  13. <!-- Maximum size of statistics mapped in memory -->
  14. <statfile_pool_size>250M</statfile_pool_size>
  15. <!-- Raw mode is non-utf mode. In utf mode all messages are converted to utf8 (if possible) -->
  16. <raw_mode>no</raw_mode>
  17. <!-- Check text attachements as ordinary text parts -->
  18. <check_attachements>no</check_attachements>
  19. <!-- If a rule has been met several times do not add additional score -->
  20. <one_shot>yes</one_shot>
  21. <!-- DNS requests global timeout -->
  22. <dns_timeout>1s</dns_timeout>
  23. <!-- DNS retransmits count -->
  24. <dns_retransmits>5</dns_retransmits>
  25. <!-- File for saving settings of symbols cache -->
  26. <cache_file>/var/lib/rspamd/symbols.cache</cache_file>
  27. <!-- Maps watch timeout (floating point number in seconds, for file maps this timeout is reduced by two) -->
  28. <map_watch_interval>10.0s</map_watch_interval>
  29. <!-- A path to dynamic configuration file, required for webui -->
  30. <dynamic_conf>/var/lib/rspamd/rspamd_dynamic</dynamic_conf>
  31. <!-- Use mlock to prevent statistic from getting to swap file, requires either root privileges or specific system configuration -->
  32. <use_mlock>no</use_mlock>
  33. </options>
  34. <!-- End of options section -->
  35. <!-- Logging section -->
  36. <logging>
  37. <level>info</level>
  38. <log_urls>no</log_urls>
  39. <type filename="/var/log/rspamd/rspamd.log">file</type>
  40. <!-- Other types
  41. <type>console</type>
  42. <type facility="local7">syslog</type>
  43. -->
  44. <!-- Selective debug
  45. <debug_ip>127.0.0.1</debug_ip>
  46. <debug_symbols>SYMBOL1,SYMBOL2</debug_symbols>
  47. -->
  48. </logging>
  49. <!-- End of logging section -->
  50. <!-- Metrics section -->
  51. <metric>
  52. <name>default</name>
  53. <required_score>15.0</required_score>
  54. <!-- Sample actions -->
  55. <action>reject</action>
  56. <action>greylist:4</action>
  57. <action>add_header:8</action>
  58. <!-- Weights for symbols -->
  59. <!-- Subject is missing inside message -->
  60. <symbol weight="2.00" description="Subject is missing inside message">MISSING_SUBJECT</symbol>
  61. <!-- Message pretends to be send from Outlook but has 'strange' tags -->
  62. <symbol weight="2.10" description="Message pretends to be send from Outlook but has 'strange' tags ">FORGED_OUTLOOK_TAGS</symbol>
  63. <!-- Sender is forged (different From: header and smtp MAIL FROM: addresses) -->
  64. <symbol weight="5.00" description="Sender is forged (different From: header and smtp MAIL FROM: addresses)">FORGED_SENDER</symbol>
  65. <!-- Recipients seems to be autogenerated (works if recipients count is more than 5) -->
  66. <symbol weight="3.50" description="Recipients seems to be autogenerated (works if recipients count is more than 5)">SUSPICIOUS_RECIPS</symbol>
  67. <!-- Fake reply (has RE in subject, but has not References header) -->
  68. <symbol weight="6.00" description="Fake reply (has RE in subject, but has not References header)">FAKE_REPLY_C</symbol>
  69. <!-- Messages that have only HTML part -->
  70. <symbol weight="1.00" description="Messages that have only HTML part">MIME_HTML_ONLY</symbol>
  71. <!-- Forged yahoo msgid -->
  72. <symbol weight="2.00" description="Forged yahoo msgid">FORGED_MSGID_YAHOO</symbol>
  73. <!-- Forged The Bat! MUA headers -->
  74. <symbol weight="2.00" description="Forged The Bat! MUA headers">FORGED_MUA_THEBAT_BOUN</symbol>
  75. <!-- Charset is missing in a message -->
  76. <symbol weight="5.00" description="Charset is missing in a message">R_MISSING_CHARSET</symbol>
  77. <!-- Two received headers with ip addresses -->
  78. <symbol weight="2.00" description="Two received headers with ip addresses">RCVD_DOUBLE_IP_SPAM</symbol>
  79. <!-- Forged outlook HTML signature -->
  80. <symbol weight="5.00" description="Forged outlook HTML signature">FORGED_OUTLOOK_HTML</symbol>
  81. <!-- Recipients are absent or undisclosed -->
  82. <symbol weight="5.00" description="Recipients are absent or undisclosed">R_UNDISC_RCPT</symbol>
  83. <!-- White color on white background in HTML messages -->
  84. <symbol weight="9.00" description="White color on white background in HTML messages">R_WHITE_ON_WHITE</symbol>
  85. <!-- Short html part with a link to an image -->
  86. <symbol weight="3.00" description="Short html part with a link to an image">HTML_SHORT_LINK_IMG_2</symbol>
  87. <!-- Forged outlook MUA -->
  88. <symbol weight="3.00" description="Forged outlook MUA">FORGED_MUA_OUTLOOK</symbol>
  89. <!-- Forged outlook MUA, but from maillist -->
  90. <symbol weight="0.00" description="Forged outlook MUA, but from maillist">FORGED_MUA_OUTLOOK_MAILLIST</symbol>
  91. <!-- Suspicious boundary in header Content-Type -->
  92. <symbol weight="5.00" description="Suspicious boundary in header Content-Type">SUSPICIOUS_BOUNDARY</symbol>
  93. <!-- Suspicious boundary in header Content-Type -->
  94. <symbol weight="4.00" description="Suspicious boundary in header Content-Type">SUSPICIOUS_BOUNDARY2</symbol>
  95. <!-- Suspicious boundary in header Content-Type -->
  96. <symbol weight="3.00" description="Suspicious boundary in header Content-Type">SUSPICIOUS_BOUNDARY3</symbol>
  97. <!-- Suspicious boundary in header Content-Type -->
  98. <symbol weight="4.00" description="Suspicious boundary in header Content-Type">SUSPICIOUS_BOUNDARY4</symbol>
  99. <!-- Message pretends to be send from The Bat! but has forged Message-ID -->
  100. <symbol weight="4.00" description="Message pretends to be send from The Bat! but has forged Message-ID">FORGED_MUA_THEBAT_MSGID</symbol>
  101. <!-- Message pretends to be send from The Bat! but has forged Message-ID -->
  102. <symbol weight="3.00" description="Message pretends to be send from The Bat! but has forged Message-ID">FORGED_MUA_THEBAT_MSGID_UNKNOWN</symbol>
  103. <!-- Message pretends to be send from KMail but has forged Message-ID -->
  104. <symbol weight="3.00" description="Message pretends to be send from KMail but has forged Message-ID">FORGED_MUA_KMAIL_MSGID</symbol>
  105. <!-- Message pretends to be send from KMail but has forged Message-ID -->
  106. <symbol weight="2.50" description="Message pretends to be send from KMail but has forged Message-ID">FORGED_MUA_KMAIL_MSGID_UNKNOWN</symbol>
  107. <!-- Message pretends to be send from Opera Mail but has forged Message-ID -->
  108. <symbol weight="4.00" description="Message pretends to be send from Opera Mail but has forged Message-ID">FORGED_MUA_OPERA_MSGID</symbol>
  109. <!-- Message pretends to be send from suspicious Opera Mail/10.x (Windows) but has forged Message-ID, apparently from KMail -->
  110. <symbol weight="4.00" description="Message pretends to be send from suspicious Opera Mail/10.x (Windows) but has forged Message-ID, apparently from KMail">SUSPICIOUS_OPERA_10W_MSGID</symbol>
  111. <!-- Message pretends to be send from Mozilla Mail but has forged Message-ID -->
  112. <symbol weight="4.00" description="Message pretends to be send from Mozilla Mail but has forged Message-ID">FORGED_MUA_MOZILLA_MAIL_MSGID</symbol>
  113. <!-- Message pretends to be send from Mozilla Mail but has forged Message-ID -->
  114. <symbol weight="2.50" description="Message pretends to be send from Mozilla Mail but has forged Message-ID">FORGED_MUA_MOZILLA_MAIL_MSGID_UNKNOWN</symbol>
  115. <!-- Forged mail pretending to be from Mozilla Thunderbird but has forged Message-ID -->
  116. <symbol weight="4.00" description="Forged mail pretending to be from Mozilla Thunderbird but has forged Message-ID">FORGED_MUA_THUNDERBIRD_MSGID</symbol>
  117. <!-- Forged mail pretending to be from Mozilla Thunderbird but has forged Message-ID -->
  118. <symbol weight="2.50" description="Forged mail pretending to be from Mozilla Thunderbird but has forged Message-ID">FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN</symbol>
  119. <!-- Forged mail pretending to be from Mozilla Seamonkey but has forged Message-ID -->
  120. <symbol weight="4.00" description="Forged mail pretending to be from Mozilla Seamonkey but has forged Message-ID">FORGED_MUA_SEAMONKEY_MSGID</symbol>
  121. <!-- Forged mail pretending to be from Mozilla Seamonkey but has forged Message-ID -->
  122. <symbol weight="2.50" description="Forged mail pretending to be from Mozilla Seamonkey but has forged Message-ID">FORGED_MUA_SEAMONKEY_MSGID_UNKNOWN</symbol>
  123. <!-- Fake helo for verizon provider -->
  124. <symbol weight="2.00" description="Fake helo for verizon provider">FM_FAKE_HELO_VERIZON</symbol>
  125. <!--Quoted reply-to from yahoo (seems to be forged) -->
  126. <symbol weight="2.00" description="Quoted reply-to from yahoo (seems to be forged)">REPTO_QUOTE_YAHOO</symbol>
  127. <!-- Mime-OLE is needed but absent (e.g. fake Outlook or fake Exchange) -->
  128. <symbol weight="5.00" description="Mime-OLE is needed but absent (e.g. fake Outlook or fake Exchange)">MISSING_MIMEOLE</symbol>
  129. <!-- To header is missing -->
  130. <symbol weight="2.00" description="To header is missing">MISSING_TO</symbol>
  131. <!-- From that contains encoded characters while base 64 is not needed as all symbols are 7bit -->
  132. <symbol weight="1.5" description="From that contains encoded characters while base 64 is not needed as all symbols are 7bit">FROM_EXCESS_BASE64</symbol>
  133. <!-- From that contains encoded characters while quoted-printable is not needed as all symbols are 7bit -->
  134. <symbol weight="1.2" description="From that contains encoded characters while quoted-printable is not needed as all symbols are 7bit">FROM_EXCESS_QP</symbol>
  135. <!-- To that contains encoded characters while base 64 is not needed as all symbols are 7bit -->
  136. <symbol weight="1.5" description="To that contains encoded characters while base 64 is not needed as all symbols are 7bit">TO_EXCESS_BASE64</symbol>
  137. <!-- To that contains encoded characters while quoted-printable is not needed as all symbols are 7bit -->
  138. <symbol weight="1.2" description="To that contains encoded characters while quoted-printable is not needed as all symbols are 7bit">TO_EXCESS_QP</symbol>
  139. <!-- Reply-To that contains encoded characters while base 64 is not needed as all symbols are 7bit -->
  140. <symbol weight="1.5" description="Reply-To that contains encoded characters while base 64 is not needed as all symbols are 7bit">REPLYTO_EXCESS_BASE64</symbol>
  141. <!-- Reply-To that contains encoded characters while quoted-printable is not needed as all symbols are 7bit -->
  142. <symbol weight="1.2" description="Reply-To that contains encoded characters while quoted-printable is not needed as all symbols are 7bit">REPLYTO_EXCESS_QP</symbol>
  143. <!-- Cc that contains encoded characters while base 64 is not needed as all symbols are 7bit -->
  144. <symbol weight="1.5" description="Cc that contains encoded characters while base 64 is not needed as all symbols are 7bit">CC_EXCESS_BASE64</symbol>
  145. <!-- Cc that contains encoded characters while quoted-printable is not needed as all symbols are 7bit -->
  146. <symbol weight="1.2" description="Cc that contains encoded characters while quoted-printable is not needed as all symbols are 7bit">CC_EXCESS_QP</symbol>
  147. <!-- Mixed characters in a message -->
  148. <symbol weight="5.00" description="Mixed characters in a message">R_MIXED_CHARSET</symbol>
  149. <!-- Recipients list seems to be sorted -->
  150. <symbol weight="3.50" description="Recipients list seems to be sorted">SORTED_RECIPS</symbol>
  151. <!-- Spambots signatures in received headers -->
  152. <symbol weight="3.00" description="Spambots signatures in received headers">R_RCVD_SPAMBOTS</symbol>
  153. <!-- To header seems to be autogenerated -->
  154. <symbol weight="2.00" description="To header seems to be autogenerated">R_TO_SEEMS_AUTO</symbol>
  155. <!-- Subject needs encoding -->
  156. <symbol weight="1.00" description="Subject needs encoding">SUBJECT_NEEDS_ENCODING</symbol>
  157. <!-- Spam string at the end of message to make statistics faults 0-->
  158. <symbol weight="3.84" description="Spam string at the end of message to make statistics faults 0">TRACKER_ID</symbol>
  159. <!-- No space in from header -->
  160. <symbol weight="1.00" description="No space in from header">R_NO_SPACE_IN_FROM</symbol>
  161. <!-- Subject seems to be spam -->
  162. <symbol weight="8.00" description="Subject seems to be spam">R_SAJDING</symbol>
  163. <!-- Detects bad content-transfer-encoding for text parts -->
  164. <symbol weight="3.00" description="Detects bad content-transfer-encoding for text parts">R_BAD_CTE_7BIT</symbol>
  165. <!-- Flash redirect on imageshack.us -->
  166. <symbol weight="10.00" description="Flash redirect on imageshack.us">R_FLASH_REDIR_IMGSHACK</symbol>
  167. <!-- Message id is incorrect -->
  168. <symbol weight="5.00" description="Message id is incorrect">INVALID_MSGID</symbol>
  169. <!-- Message id is missing -->
  170. <symbol weight="3.00" description="Message id is missing ">MISSING_MID</symbol>
  171. <!-- Recipients are not the same as RCPT TO: mail command -->
  172. <symbol weight="3.00" description="Recipients are not the same as RCPT TO: mail command">FORGED_RECIPIENTS</symbol>
  173. <!-- Recipients are not the same as RCPT TO: mail command, but from maillist -->
  174. <symbol weight="0.00" description="Recipients are not the same as RCPT TO: mail command, but from maillist">FORGED_RECIPIENTS_MAILLIST</symbol>
  175. <!-- Forged Exchange messages -->
  176. <symbol weight="2.00" description="Forged Exchange messages ">RATWARE_MS_HASH</symbol>
  177. <!-- Reply-type in content-type -->
  178. <symbol weight="1.00" description="Reply-type in content-type">STOX_REPLY_TYPE</symbol>
  179. <!-- IP in received headers is in PBL -->
  180. <symbol weight="3.00" description="IP in received headers is in PBL">R_IP_PBL</symbol>
  181. <!-- One received header in a message -->
  182. <symbol weight="1.00" description="One received header in a message ">ONCE_RECEIVED</symbol>
  183. <!-- One received header with 'bad' patterns inside -->
  184. <symbol weight="4.00" description="One received header with 'bad' patterns inside">ONCE_RECEIVED_STRICT</symbol>
  185. <!-- Received headers contains addresses from RBL -->
  186. <symbol weight="1.00" description="Received headers contains addresses from RBL">RECEIVED_RBL</symbol>
  187. <!-- Text and HTML parts differ -->
  188. <symbol weight="3.00" description="Text and HTML parts differ">R_PARTS_DIFFER</symbol>
  189. <!-- Only Content-Type header without other MIME headers -->
  190. <symbol weight="2.00" description="Only Content-Type header without other MIME headers">MIME_HEADER_CTYPE_ONLY</symbol>
  191. <!-- Message contains empty parts and image -->
  192. <symbol weight="2.00" description="Message contains empty parts and image ">R_EMPTY_IMAGE</symbol>
  193. <!-- Drugs patterns inside message -->
  194. <symbol weight="2.00" description="Drugs patterns inside message">DRUGS_MANYKINDS</symbol>
  195. <!-- Specific drugs signatures -->
  196. <symbol weight="2.00" description="">DRUGS_ANXIETY</symbol>
  197. <symbol weight="2.00" description="">DRUGS_MUSCLE</symbol>
  198. <symbol weight="2.00" description="">DRUGS_ANXIETY_EREC</symbol>
  199. <symbol weight="2.00" description="">DRUGS_DIET</symbol>
  200. <symbol weight="2.00" description="">DRUGS_ERECTILE</symbol>
  201. <!-- 2 or 3 'advance fee' patterns in a message -->
  202. <symbol weight="3.30" description="2 'advance fee' patterns in a message">ADVANCE_FEE_2</symbol>
  203. <symbol weight="2.12" description="3 'advance fee' patterns in a message">ADVANCE_FEE_3</symbol>
  204. <!-- Lotto signatures -->
  205. <symbol weight="8.00" description="Lotto signatures">R_LOTTO</symbol>
  206. <!-- Statistics -->
  207. <symbol weight="3.00" description="Message probably spam, probability: ">BAYES_SPAM</symbol>
  208. <symbol weight="-3.00" description="Message probably ham, probability: ">BAYES_HAM</symbol>
  209. <!-- Fuzzy lists example -->
  210. <symbol weight="1.00" description="">R_FUZZY</symbol>
  211. <symbol weight="1.00" description="">R_FUZZY1</symbol>
  212. <symbol weight="1.00" description="">R_FUZZY2</symbol>
  213. <symbol weight="1.00" description="">R_FUZZY3</symbol>
  214. <!-- DKIM rules -->
  215. <symbol weight="1.0" description="DKIM policy reject">R_DKIM_REJECT</symbol>
  216. <symbol weight="0.0" description="DKIM policy temporary fail">R_DKIM_TEMPFAIL</symbol>
  217. <symbol weight="-0.5" description="DKIM policy allow">R_DKIM_ALLOW</symbol>
  218. <!-- SPF rules -->
  219. <symbol weight="3.00" description="SPF verification failed">R_SPF_FAIL</symbol>
  220. <symbol weight="1.00" description="SPF verification soft-failed">R_SPF_SOFTFAIL</symbol>
  221. <symbol weight="-3.00" description="SPF verification alowed">R_SPF_ALLOW</symbol>
  222. <!-- Message seems to be from maillist -->
  223. <symbol weight="-2.00" description="Message seems to be from maillist">MAILLIST</symbol>
  224. <!-- multi.surbl.org lists (more details at http://www.surbl.org) -->
  225. <!-- Phishing and malware sites -->
  226. <symbol weight="10.50" description="Phishing and malware sites">PH_SURBL_MULTI</symbol>
  227. <!-- Outblaze URI Blacklist -->
  228. <symbol weight="10.50" description="Outblaze URI Blacklist">OB_SURBL_MULTI</symbol>
  229. <!-- AbuseButler web sites -->
  230. <symbol weight="10.50" description="AbuseButler web sites">AB_SURBL_MULTI</symbol>
  231. <!-- SpamCop web sites -->
  232. <symbol weight="10.50" description="SpamCop web sites">SC_SURBL_MULTI</symbol>
  233. <!-- jwSpamSpy + Prolocation sites -->
  234. <symbol weight="10.50" description="jwSpamSpy + Prolocation sites">JP_SURBL_MULTI</symbol>
  235. <!-- sa-blacklist web sites -->
  236. <symbol weight="10.50" description="sa-blacklist web sites ">WS_SURBL_MULTI</symbol>
  237. <!-- rambler.ru uribl -->
  238. <symbol weight="12.50" description="rambler.ru uribl">RAMBLER_URIBL</symbol>
  239. <!-- DBL uribl -->
  240. <symbol weight="11.50" description="dbl.spamhaus.org uribl">DBL</symbol>
  241. <!-- rambler.ru emailbl -->
  242. <symbol weight="9.50" description="rambler.ru emailbl">RAMBLER_EMAILBL</symbol>
  243. <!-- Phished mail -->
  244. <symbol weight="5.0" description="Phished mail">PHISHING</symbol>
  245. <!-- Tabs as delimiters between header names and header values -->
  246. <symbol weight="1.0" description="Header From begins with tab">HEADER_FROM_DELIMITER_TAB</symbol>
  247. <symbol weight="1.0" description="Header To begins with tab">HEADER_TO_DELIMITER_TAB</symbol>
  248. <symbol weight="1.0" description="Header Cc begins with tab">HEADER_CC_DELIMITER_TAB</symbol>
  249. <symbol weight="1.0" description="Header Reply-To begins with tab">HEADER_REPLYTO_DELIMITER_TAB</symbol>
  250. <symbol weight="1.0" description="Header Date begins with tab">HEADER_DATE_DELIMITER_TAB</symbol>
  251. <!-- Empty delimiters between header names and header values -->
  252. <symbol weight="1.0" description="Header From has no delimiter between header name and header value">HEADER_FROM_EMPTY_DELIMITER</symbol>
  253. <symbol weight="1.0" description="Header To has no delimiter between header name and header value">HEADER_TO_EMPTY_DELIMITER</symbol>
  254. <symbol weight="1.0" description="Header Cc has no delimiter between header name and header value">HEADER_CC_EMPTY_DELIMITER</symbol>
  255. <symbol weight="1.0" description="Header Reply-To has no delimiter between header name and header value">HEADER_REPLYTO_EMPTY_DELIMITER</symbol>
  256. <symbol weight="1.0" description="Header Date has no delimiter between header name and header value">HEADER_DATE_EMPTY_DELIMITER</symbol>
  257. <!-- Received headers -->
  258. <symbol weight="4.0" description="Header Received has raw illegal character">RCVD_ILLEGAL_CHARS</symbol>
  259. <symbol weight="4.0" description="Fake helo mail.ru in header Received from non mail.ru sender address">FAKE_RECEIVED_mail_ru</symbol>
  260. <symbol weight="4.0" description="Fake smtp.yandex.ru Received">FAKE_RECEIVED_smtp_yandex_ru</symbol>
  261. <symbol weight="3.6" description="Forged generic Received">FORGED_GENERIC_RECEIVED</symbol>
  262. <symbol weight="3.6" description="Forged generic Received">FORGED_GENERIC_RECEIVED2</symbol>
  263. <symbol weight="3.6" description="Forged generic Received">FORGED_GENERIC_RECEIVED3</symbol>
  264. <symbol weight="3.6" description="Forged generic Received">FORGED_GENERIC_RECEIVED4</symbol>
  265. <symbol weight="4.6" description="Forged generic Received">FORGED_GENERIC_RECEIVED5</symbol>
  266. <symbol weight="3.0" description="Invalid Postfix Received">INVALID_POSTFIX_RECEIVED</symbol>
  267. <symbol weight="5.0" description="Invalid Exim Received">INVALID_EXIM_RECEIVED</symbol>
  268. <symbol weight="3.0" description="Invalid Exim Received">INVALID_EXIM_RECEIVED2</symbol>
  269. <!-- Date checks -->
  270. <symbol weight="1.5" description="Message date is in future">DATE_IN_FUTURE</symbol>
  271. <symbol weight="1.0" description="Message date is in past">DATE_IN_PAST</symbol>
  272. </metric>
  273. <!-- End of metrics section -->
  274. <!-- Composites section -->
  275. <composite name="FORGED_RECIPIENTS_MAILLIST">FORGED_RECIPIENTS &amp; -MAILLIST</composite>
  276. <composite name="FORGED_MUA_OUTLOOK_MAILLIST">FORGED_MUA_OUTLOOK &amp; -MAILLIST</composite>
  277. <!-- End of composites section -->
  278. <!-- Workers section -->
  279. <worker>
  280. <type>fuzzy</type>
  281. <bind_socket>localhost:11335</bind_socket>
  282. <count>1</count>
  283. <maxfiles>2048</maxfiles>
  284. <!-- Other params -->
  285. <hashfile>/var/lib/rspamd/fuzzy.db</hashfile>
  286. <use_judy>yes</use_judy>
  287. </worker>
  288. <worker>
  289. <type>controller</type>
  290. <bind_socket>localhost:11334</bind_socket>
  291. <count>1</count>
  292. <maxfiles>2048</maxfiles>
  293. <!-- Other params -->
  294. <password>q1</password>
  295. </worker>
  296. <worker>
  297. <type>normal</type>
  298. <bind_socket>*:11333</bind_socket>
  299. <maxfiles>2048</maxfiles>
  300. <!-- Other params -->
  301. </worker>
  302. <!-- Webui worker -->
  303. <worker>
  304. <type>webui</type>
  305. <count>1</count>
  306. <bind_socket>localhost:11336</bind_socket>
  307. <!-- UI password, should be changed to something more secure -->
  308. <password>q1</password>
  309. </worker>
  310. <!-- End of workers section -->
  311. <!-- Modules section -->
  312. <!-- fuzzy_check -->
  313. <module name="fuzzy_check">
  314. <servers>localhost:11335</servers>
  315. <symbol>R_FUZZY</symbol>
  316. <min_bytes>300</min_bytes>
  317. <max_score>10</max_score>
  318. <mime_types>application/pdf</mime_types>
  319. <fuzzy_map>1:R_FUZZY1:10,2:R_FUZZY2:5,3:R_FUZZY3:-2.1</fuzzy_map>
  320. </module>
  321. <!-- forged_recipients -->
  322. <module name="forged_recipients">
  323. <symbol_sender>FORGED_SENDER</symbol_sender>
  324. <symbol_rcpt>FORGED_RECIPIENTS</symbol_rcpt>
  325. </module>
  326. <!-- maillist -->
  327. <module name="maillist">
  328. <symbol>MAILLIST</symbol>
  329. </module>
  330. <!-- surbl -->
  331. <module name="surbl">
  332. <whitelist>file:///etc/rspamd/surbl-whitelist.inc</whitelist>
  333. <exceptions>file:///etc/rspamd/2tld.inc</exceptions>
  334. <bit_64>JP</bit_64>
  335. <bit_32>AB</bit_32>
  336. <bit_16>OB</bit_16>
  337. <bit_8>PH</bit_8>
  338. <bit_4>WS</bit_4>
  339. <bit_2>SC</bit_2>
  340. <suffix_RAMBLER_URIBL>uribl.rambler.ru</suffix_RAMBLER_URIBL>
  341. <option name="suffix_%b_SURBL_MULTI">multi.surbl.org</option>
  342. <suffix_DBL>dbl.spamhaus.org</suffix_DBL>
  343. <!-- Do not send ip urls to this URIBL -->
  344. <options_DBL>noip</options_DBL>
  345. <!-- Redirector sample setup -->
  346. <!--
  347. <redirector_read_timeout>10s</redirector_read_timeout>
  348. <redirector_connect_timeout>1s</redirector_connect_timeout>
  349. <redirector>localhost:8080</redirector>
  350. -->
  351. </module>
  352. <!-- received_rbl -->
  353. <module name="received_rbl">
  354. <symbol>RECEIVED_RBL</symbol>
  355. <rbl>pbl.spamhaus.org</rbl>
  356. <rbl>xbl.spamhaus.org</rbl>
  357. <rbl>insecure-bl.rambler.ru</rbl>
  358. </module>
  359. <!-- whitelist -->
  360. <!-- Example of using HTTP maps for whitelisting
  361. <module name="whitelist">
  362. <ip_whitelist>http://highsecure.ru/grey_whitelist.conf</ip_whitelist>
  363. <symbol_ip>WHITELIST_IP</symbol_ip>
  364. </module>
  365. -->
  366. <!-- chartable -->
  367. <module name="chartable">
  368. <!-- Division of symbols from different charsets to a total number of symbols -->
  369. <threshold>0.3</threshold>
  370. <symbol>R_MIXED_CHARSET</symbol>
  371. </module>
  372. <!-- once_received -->
  373. <module name="once_received">
  374. <good_host>mail</good_host>
  375. <bad_host>static</bad_host>
  376. <bad_host>dynamic</bad_host>
  377. <symbol_strict>ONCE_RECEIVED_STRICT</symbol_strict>
  378. <symbol>ONCE_RECEIVED</symbol>
  379. </module>
  380. <!-- multimap -->
  381. <module name="multimap">
  382. <!--
  383. <rule>type = header, header = To, pattern = @(.+)>?$, map = file:///etc/rspamd/rcpt_test, symbol = R_RCPT_WHITELIST, description = RCPT whitelist</rule>
  384. <rule>type = ip, map = file:///etc/rspamd/ip_test, symbol = R_IP_WHITELIST, description = IP whitelist</rule>
  385. -->
  386. <rule>type = dnsbl, map = pbl.spamhaus.org, symbol = R_IP_PBL, description = PBL dns block list</rule>
  387. </module>
  388. <!-- phishing -->
  389. <module name="phishing">
  390. <symbol>PHISHING</symbol>
  391. <!-- Check phishing only for specified domains
  392. <domains>file://path/to/domains</domains>
  393. -->
  394. <!-- If phishing detected for that domains insert another symbol specified after semicolon symbol
  395. <strict_domains>file://path/to/domains:STRICT_PHISHING</strict_domains>
  396. -->
  397. </module>
  398. <!-- Trie module -->
  399. <!--
  400. <module name="trie">
  401. <rule>TRIE1:bad pattern</rule>
  402. <rule>TRIE2:file:///var/lib/rspamd/bad_patterns.list</rule>
  403. </module>
  404. -->
  405. <!-- Emails blacklist -->
  406. <module name="emails">
  407. <rule>symbol = RAMBLER_EMAILBL, dnsbl = email-bl.rambler.ru, domain_only = false</rule>
  408. </module>
  409. <!-- SPF module setup -->
  410. <module name="spf">
  411. <!-- Cache setup for spf records to accelerate spf checks -->
  412. <spf_cache_size>2048</spf_cache_size>
  413. <spf_cache_expire>1d</spf_cache_expire>
  414. </module>
  415. <!-- DKIM module setup -->
  416. <module name="dkim">
  417. <!-- Cache setup for dkim records to accelerate dkim checks -->
  418. <dkim_cache_size>2048</dkim_cache_size>
  419. <dkim_cache_expire>1d</dkim_cache_expire>
  420. <!-- Domains list can be added, each domain file entry can be in format:
  421. <domain_name> [<score_reject>:<score_allow>]
  422. where scores are multiplier for this domain, if scores are skipped
  423. normal multiplier is used -->
  424. <!-- <domains>file:///some/path</domains> -->
  425. <!-- Whitelist is ip/mask list of whitelisted ips to skip dkim check -->
  426. <!-- <whitelist>file:///some/path</whitelist> -->
  427. <!-- Time jitter is value in seconds to ignore comparing timestamp of signatures -->
  428. <time_jitter>1m</time_jitter>
  429. <!-- Check only trusted domains from 'domains' list -->
  430. <trusted_only>no</trusted_only>
  431. <!-- Skip mails with several DKIM signatures -->
  432. <skip_multi>no</skip_multi>
  433. </module>
  434. <!-- Rstelimit module setup -->
  435. <!-- Disabled by default till servers option is properly set -->
  436. <module name="ratelimit">
  437. <!-- List of servers to store limits in format: host1[:port][,host2[:port]]
  438. port 6379 is used by default, if no servers defined, this module is not enabled -->
  439. <!-- <servers>localhost</servers> -->
  440. <!-- limits description, type:burst:leak_rate -->
  441. <!-- per rcpt limit, 100 messages burst, 2 messages per minute leak rate -->
  442. <limit>to:100:0.033333333</limit>
  443. <!-- per rcpt/ip limit, 30 messages burst, 1.5 messages per minute leak rate -->
  444. <limit>to_ip:30:0.025</limit>
  445. <!-- per rcpt/ip/from limit, 20 messages burst, 1 messages per minute leak rate -->
  446. <limit>to_ip_from:20:0.01666666667</limit>
  447. <!-- per rcpt bounce limit, 10 messages burst, 2 messages per hour leak rate -->
  448. <limit>bounce_to:10:0.000555556</limit>
  449. <!-- per rcpt/ip bounce limit, 5 messages burst, 1 messages per hour leak rate -->
  450. <limit>bounce_to_ip:5:0.000277778</limit>
  451. <!-- Whitelist map -->
  452. <!-- <whitelisted_ip>file:///some/path</whitelisted_ip> -->
  453. <!-- List of whitelisted recipients -->
  454. <whitelisted_rcpts>postmaster,mailer-daemon</whitelisted_rcpts>
  455. <!-- Limit if recipients to check -->
  456. <max_rcpt>5</max_rcpt>
  457. </module>
  458. <!-- Regexp module configuration -->
  459. <module name="regexp">
  460. <!-- Maximum size of text for regexp checks -->
  461. <max_size>1M</max_size>
  462. </module>
  463. <!-- End of modules section -->
  464. <!-- Classifiers section -->
  465. <!--
  466. <classifier type="winnow">
  467. <tokenizer>osb-text</tokenizer>
  468. <metric>default</metric>
  469. <min_tokens>20</min_tokens>
  470. <statfile>
  471. <symbol>WINNOW_HAM</symbol>
  472. <size>100M</size>
  473. <path>/var/lib/rspamd/data.ham</path>
  474. </statfile>
  475. <statfile>
  476. <symbol>WINNOW_SPAM</symbol>
  477. <size>100M</size>
  478. <path>/var/lib/rspamd/data.spam</path>
  479. </statfile>
  480. </classifier>
  481. -->
  482. <!-- Example of slave
  483. <classifier type="bayes">
  484. <tokenizer>osb-text</tokenizer>
  485. <metric>default</metric>
  486. <min_tokens>10</min_tokens>
  487. <learn_threshold>0.2</learn_threshold>
  488. <statfile>
  489. <symbol>BAYES_HAM</symbol>
  490. <size>10M</size>
  491. <path>/var/lib/rspamd/bayes_slave.ham</path>
  492. <binlog_master>localhost:11334</binlog_master>
  493. <binlog>slave</binlog>
  494. </statfile>
  495. <statfile>
  496. <symbol>BAYES_SPAM</symbol>
  497. <size>10M</size>
  498. <path>/var/lib/rspamd/bayes_slave.spam</path>
  499. <binlog>slave</binlog>
  500. <binlog_master>localhost:11334</binlog_master>
  501. </statfile>
  502. </classifier>
  503. -->
  504. <!-- Example of language specific statfiles -->
  505. <!--
  506. <classifier type="bayes">
  507. <tokenizer>osb-text</tokenizer>
  508. <metric>default</metric>
  509. <min_tokens>10</min_tokens>
  510. <max_tokens>1000</max_tokens>
  511. <statfile>
  512. <symbol>BAYES_HAM_RU</symbol>
  513. <size>50M</size>
  514. <path>/var/lib/rspamd/bayes_ru.ham</path>
  515. <param name="language">ru</param>
  516. </statfile>
  517. <statfile>
  518. <symbol>BAYES_SPAM_RU</symbol>
  519. <size>50M</size>
  520. <path>/var/lib/rspamd/bayes_ru.spam</path>
  521. <param name="language">ru</param>
  522. </statfile>
  523. <statfile>
  524. <symbol>BAYES_HAM</symbol>
  525. <size>50M</size>
  526. <path>/var/lib/rspamd/bayes.ham</path>
  527. </statfile>
  528. <statfile>
  529. <symbol>BAYES_SPAM</symbol>
  530. <size>50M</size>
  531. <path>/var/lib/rspamd/bayes.spam</path>
  532. </statfile>
  533. </classifier>
  534. -->
  535. <!-- Ordinary statistic for a small mail system -->
  536. <classifier type="bayes">
  537. <tokenizer>osb-text</tokenizer>
  538. <metric>default</metric>
  539. <min_tokens>10</min_tokens>
  540. <max_tokens>1000</max_tokens>
  541. <statfile>
  542. <symbol>BAYES_HAM</symbol>
  543. <size>20M</size>
  544. <path>/var/lib/rspamd/bayes.ham</path>
  545. </statfile>
  546. <statfile>
  547. <symbol>BAYES_SPAM</symbol>
  548. <size>20M</size>
  549. <path>/var/lib/rspamd/bayes.spam</path>
  550. </statfile>
  551. </classifier>
  552. <!-- Advanced meta-classification statistic -->
  553. <!--
  554. <classifier type="bayes">
  555. <tokenizer>osb-text</tokenizer>
  556. <metric>default</metric>
  557. <min_tokens>6</min_tokens>
  558. <max_tokens>5000</max_tokens>
  559. <statfile>
  560. <symbol>BAYES_HAM</symbol>
  561. <size>50M</size>
  562. <path>/var/lib/rspamd/bayes.ham</path>
  563. <spam>no</spam>
  564. </statfile>
  565. <statfile>
  566. <symbol>BAYES_SPAM</symbol>
  567. <size>50M</size>
  568. <path>/var/lib/rspamd/bayes.spam</path>
  569. <spam>yes</spam>
  570. </statfile>
  571. <statfile>
  572. <symbol>BAYES_HAM_RU</symbol>
  573. <size>50M</size>
  574. <path>/var/lib/rspamd/bayes_ru.ham</path>
  575. <language>ru</language>
  576. <spam>no</spam>
  577. </statfile>
  578. <statfile>
  579. <symbol>BAYES_SPAM_RU</symbol>
  580. <size>50M</size>
  581. <path>/var/lib/rspamd/bayes_ru.spam</path>
  582. <language>ru</language>
  583. <spam>yes</spam>
  584. </statfile>
  585. <statfile>
  586. <symbol>BAYES_SPAM</symbol>
  587. <size>10M</size>
  588. <path>/var/lib/rspamd/bayes_manyrcpt.spam</path>
  589. <spam>yes</spam>
  590. <label>many recipients</label>
  591. </statfile>
  592. <statfile>
  593. <symbol>BAYES_HAM</symbol>
  594. <size>10M</size>
  595. <path>/var/lib/rspamd/bayes_manyrcpt.ham</path>
  596. <spam>no</spam>
  597. <label>many recipients</label>
  598. </statfile>
  599. <statfile>
  600. <symbol>BAYES_SPAM</symbol>
  601. <size>10M</size>
  602. <path>/var/lib/rspamd/bayes_undisclosedrcpt.spam</path>
  603. <spam>yes</spam>
  604. <label>undisclosed recipients</label>
  605. </statfile>
  606. <statfile>
  607. <symbol>BAYES_HAM</symbol>
  608. <size>10M</size>
  609. <path>/var/lib/rspamd/bayes_undisclosedrcpt.ham</path>
  610. <spam>no</spam>
  611. <label>undisclosed recipients</label>
  612. </statfile>
  613. <statfile>
  614. <symbol>BAYES_SPAM</symbol>
  615. <size>10M</size>
  616. <path>/var/lib/rspamd/bayes_maillist.spam</path>
  617. <spam>yes</spam>
  618. <label>maillist</label>
  619. </statfile>
  620. <statfile>
  621. <symbol>BAYES_HAM</symbol>
  622. <size>10M</size>
  623. <path>/var/lib/rspamd/bayes_maillist.ham</path>
  624. <spam>no</spam>
  625. <label>maillist</label>
  626. </statfile>
  627. <statfile>
  628. <symbol>BAYES_SPAM</symbol>
  629. <size>10M</size>
  630. <path>/var/lib/rspamd/bayes_longsubject.spam</path>
  631. <spam>yes</spam>
  632. <label>long subject</label>
  633. </statfile>
  634. <statfile>
  635. <symbol>BAYES_HAM</symbol>
  636. <size>10M</size>
  637. <path>/var/lib/rspamd/bayes_longsubject.ham</path>
  638. <spam>no</spam>
  639. <label>long subject</label>
  640. </statfile>
  641. <statfile>
  642. <symbol>BAYES_SPAM</symbol>
  643. <size>10M</size>
  644. <path>/var/lib/rspamd/bayes_replyto.spam</path>
  645. <spam>yes</spam>
  646. <label>different reply to</label>
  647. </statfile>
  648. <statfile>
  649. <symbol>BAYES_HAM</symbol>
  650. <size>10M</size>
  651. <path>/var/lib/rspamd/bayes_replyto.ham</path>
  652. <spam>no</spam>
  653. <label>different reply to</label>
  654. </statfile>
  655. <statfile>
  656. <symbol>BAYES_SPAM</symbol>
  657. <size>10M</size>
  658. <path>/var/lib/rspamd/bayes_replymessage.spam</path>
  659. <spam>yes</spam>
  660. <label>reply message</label>
  661. </statfile>
  662. <statfile>
  663. <symbol>BAYES_HAM</symbol>
  664. <size>10M</size>
  665. <path>/var/lib/rspamd/bayes_replymessage.ham</path>
  666. <spam>no</spam>
  667. <label>reply message</label>
  668. </statfile>
  669. </classifier>
  670. -->
  671. <!-- End of classifiers section -->
  672. <!-- Modules section -->
  673. <modules>
  674. <path>/etc/rspamd/plugins/lua/</path>
  675. </modules>
  676. <!-- End of modules section -->
  677. </rspamd>