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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  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/lib/rspamd/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>1G</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_FUZZY_DENIED</symbol>
  212. <symbol weight="1.00" description="">R_FUZZY_PROB</symbol>
  213. <symbol weight="1.00" description="">R_FUZZY_WHITE</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="7.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. <!--
  280. <worker>
  281. <type>fuzzy</type>
  282. <bind_socket>localhost:11335</bind_socket>
  283. <count>1</count>
  284. <maxfiles>2048</maxfiles>
  285. <hashfile>/var/lib/rspamd/fuzzy.db</hashfile>
  286. <use_judy>yes</use_judy>
  287. </worker>
  288. -->
  289. <worker>
  290. <type>controller</type>
  291. <bind_socket>localhost:11334</bind_socket>
  292. <count>1</count>
  293. <maxfiles>2048</maxfiles>
  294. <!-- Other params -->
  295. <password>q1</password>
  296. </worker>
  297. <worker>
  298. <type>normal</type>
  299. <bind_socket>*:11333</bind_socket>
  300. <maxfiles>2048</maxfiles>
  301. <!-- Other params -->
  302. </worker>
  303. <!-- Webui worker -->
  304. <worker>
  305. <type>webui</type>
  306. <count>1</count>
  307. <bind_socket>localhost:11336</bind_socket>
  308. <!-- UI password, should be changed to something more secure -->
  309. <password>q1</password>
  310. </worker>
  311. <!-- End of workers section -->
  312. <!-- Modules section -->
  313. <!-- fuzzy_check -->
  314. <module name="fuzzy_check">
  315. <servers>highsecure.ru:11335</servers>
  316. <symbol>R_FUZZY</symbol>
  317. <min_bytes>300</min_bytes>
  318. <max_score>10</max_score>
  319. <mime_types>application/pdf</mime_types>
  320. <fuzzy_map>1:R_FUZZY_DENIED:10,2:R_FUZZY_PROB:5,3:R_FUZZY_WHITE:-2.1</fuzzy_map>
  321. </module>
  322. <!-- forged_recipients -->
  323. <module name="forged_recipients">
  324. <symbol_sender>FORGED_SENDER</symbol_sender>
  325. <symbol_rcpt>FORGED_RECIPIENTS</symbol_rcpt>
  326. </module>
  327. <!-- maillist -->
  328. <module name="maillist">
  329. <symbol>MAILLIST</symbol>
  330. </module>
  331. <!-- surbl -->
  332. <module name="surbl">
  333. <whitelist>file:///etc/rspamd/surbl-whitelist.inc</whitelist>
  334. <exceptions>file:///etc/rspamd/2tld.inc</exceptions>
  335. <bit_64>JP</bit_64>
  336. <bit_32>AB</bit_32>
  337. <bit_16>OB</bit_16>
  338. <bit_8>PH</bit_8>
  339. <bit_4>WS</bit_4>
  340. <bit_2>SC</bit_2>
  341. <suffix_RAMBLER_URIBL>uribl.rambler.ru</suffix_RAMBLER_URIBL>
  342. <option name="suffix_%b_SURBL_MULTI">multi.surbl.org</option>
  343. <suffix_DBL>dbl.spamhaus.org</suffix_DBL>
  344. <!-- Do not send ip urls to this URIBL -->
  345. <options_DBL>noip</options_DBL>
  346. <!-- Redirector sample setup -->
  347. <!--
  348. <redirector_read_timeout>10s</redirector_read_timeout>
  349. <redirector_connect_timeout>1s</redirector_connect_timeout>
  350. <redirector>localhost:8080</redirector>
  351. -->
  352. </module>
  353. <!-- received_rbl -->
  354. <module name="received_rbl">
  355. <symbol>RECEIVED_RBL</symbol>
  356. <rbl>pbl.spamhaus.org</rbl>
  357. <rbl>xbl.spamhaus.org</rbl>
  358. <rbl>insecure-bl.rambler.ru</rbl>
  359. </module>
  360. <!-- whitelist -->
  361. <!-- Example of using HTTP maps for whitelisting
  362. <module name="whitelist">
  363. <ip_whitelist>http://highsecure.ru/grey_whitelist.conf</ip_whitelist>
  364. <symbol_ip>WHITELIST_IP</symbol_ip>
  365. </module>
  366. -->
  367. <!-- chartable -->
  368. <module name="chartable">
  369. <!-- Division of symbols from different charsets to a total number of symbols -->
  370. <threshold>0.3</threshold>
  371. <symbol>R_MIXED_CHARSET</symbol>
  372. </module>
  373. <!-- once_received -->
  374. <module name="once_received">
  375. <good_host>mail</good_host>
  376. <bad_host>static</bad_host>
  377. <bad_host>dynamic</bad_host>
  378. <symbol_strict>ONCE_RECEIVED_STRICT</symbol_strict>
  379. <symbol>ONCE_RECEIVED</symbol>
  380. </module>
  381. <!-- multimap -->
  382. <module name="multimap">
  383. <!--
  384. <rule>type = header, header = To, pattern = @(.+)>?$, map = file:///etc/rspamd/rcpt_test, symbol = R_RCPT_WHITELIST, description = RCPT whitelist</rule>
  385. <rule>type = ip, map = file:///etc/rspamd/ip_test, symbol = R_IP_WHITELIST, description = IP whitelist</rule>
  386. -->
  387. <rule>type = dnsbl, map = pbl.spamhaus.org, symbol = R_IP_PBL, description = PBL dns block list</rule>
  388. </module>
  389. <!-- phishing -->
  390. <module name="phishing">
  391. <symbol>PHISHING</symbol>
  392. <!-- Check phishing only for specified domains
  393. <domains>file://path/to/domains</domains>
  394. -->
  395. <!-- If phishing detected for that domains insert another symbol specified after semicolon symbol
  396. <strict_domains>file://path/to/domains:STRICT_PHISHING</strict_domains>
  397. -->
  398. </module>
  399. <!-- Trie module -->
  400. <!--
  401. <module name="trie">
  402. <rule>TRIE1:bad pattern</rule>
  403. <rule>TRIE2:file:///var/lib/rspamd/bad_patterns.list</rule>
  404. </module>
  405. -->
  406. <!-- Emails blacklist -->
  407. <module name="emails">
  408. <rule>symbol = RAMBLER_EMAILBL, dnsbl = email-bl.rambler.ru, domain_only = false</rule>
  409. </module>
  410. <!-- SPF module setup -->
  411. <module name="spf">
  412. <!-- Cache setup for spf records to accelerate spf checks -->
  413. <spf_cache_size>2048</spf_cache_size>
  414. <spf_cache_expire>1d</spf_cache_expire>
  415. </module>
  416. <!-- DKIM module setup -->
  417. <module name="dkim">
  418. <!-- Cache setup for dkim records to accelerate dkim checks -->
  419. <dkim_cache_size>2048</dkim_cache_size>
  420. <dkim_cache_expire>1d</dkim_cache_expire>
  421. <!-- Domains list can be added, each domain file entry can be in format:
  422. <domain_name> [<score_reject>:<score_allow>]
  423. where scores are multiplier for this domain, if scores are skipped
  424. normal multiplier is used -->
  425. <!-- <domains>file:///some/path</domains> -->
  426. <!-- Whitelist is ip/mask list of whitelisted ips to skip dkim check -->
  427. <!-- <whitelist>file:///some/path</whitelist> -->
  428. <!-- Time jitter is value in seconds to ignore comparing timestamp of signatures -->
  429. <time_jitter>1m</time_jitter>
  430. <!-- Check only trusted domains from 'domains' list -->
  431. <trusted_only>no</trusted_only>
  432. <!-- Skip mails with several DKIM signatures -->
  433. <skip_multi>no</skip_multi>
  434. </module>
  435. <!-- Rstelimit module setup -->
  436. <!-- Disabled by default till servers option is properly set -->
  437. <module name="ratelimit">
  438. <!-- List of servers to store limits in format: host1[:port][,host2[:port]]
  439. port 6379 is used by default, if no servers defined, this module is not enabled -->
  440. <!-- <servers>localhost</servers> -->
  441. <!-- limits description, type:burst:leak_rate -->
  442. <!-- per rcpt limit, 100 messages burst, 2 messages per minute leak rate -->
  443. <limit>to:100:0.033333333</limit>
  444. <!-- per rcpt/ip limit, 30 messages burst, 1.5 messages per minute leak rate -->
  445. <limit>to_ip:30:0.025</limit>
  446. <!-- per rcpt/ip/from limit, 20 messages burst, 1 messages per minute leak rate -->
  447. <limit>to_ip_from:20:0.01666666667</limit>
  448. <!-- per rcpt bounce limit, 10 messages burst, 2 messages per hour leak rate -->
  449. <limit>bounce_to:10:0.000555556</limit>
  450. <!-- per rcpt/ip bounce limit, 5 messages burst, 1 messages per hour leak rate -->
  451. <limit>bounce_to_ip:5:0.000277778</limit>
  452. <!-- Whitelist map -->
  453. <!-- <whitelisted_ip>file:///some/path</whitelisted_ip> -->
  454. <!-- List of whitelisted recipients -->
  455. <whitelisted_rcpts>postmaster,mailer-daemon</whitelisted_rcpts>
  456. <!-- Limit if recipients to check -->
  457. <max_rcpt>5</max_rcpt>
  458. </module>
  459. <!-- Regexp module configuration -->
  460. <module name="regexp">
  461. <!-- Maximum size of text for regexp checks -->
  462. <max_size>1M</max_size>
  463. </module>
  464. <!-- End of modules section -->
  465. <!-- Classifiers section -->
  466. <!--
  467. <classifier type="winnow">
  468. <tokenizer>osb-text</tokenizer>
  469. <metric>default</metric>
  470. <min_tokens>20</min_tokens>
  471. <statfile>
  472. <symbol>WINNOW_HAM</symbol>
  473. <size>100M</size>
  474. <path>/var/lib/rspamd/data.ham</path>
  475. </statfile>
  476. <statfile>
  477. <symbol>WINNOW_SPAM</symbol>
  478. <size>100M</size>
  479. <path>/var/lib/rspamd/data.spam</path>
  480. </statfile>
  481. </classifier>
  482. -->
  483. <!-- Example of slave
  484. <classifier type="bayes">
  485. <tokenizer>osb-text</tokenizer>
  486. <metric>default</metric>
  487. <min_tokens>10</min_tokens>
  488. <learn_threshold>0.2</learn_threshold>
  489. <statfile>
  490. <symbol>BAYES_HAM</symbol>
  491. <size>10M</size>
  492. <path>/var/lib/rspamd/bayes_slave.ham</path>
  493. <binlog_master>localhost:11334</binlog_master>
  494. <binlog>slave</binlog>
  495. </statfile>
  496. <statfile>
  497. <symbol>BAYES_SPAM</symbol>
  498. <size>10M</size>
  499. <path>/var/lib/rspamd/bayes_slave.spam</path>
  500. <binlog>slave</binlog>
  501. <binlog_master>localhost:11334</binlog_master>
  502. </statfile>
  503. </classifier>
  504. -->
  505. <!-- Example of language specific statfiles -->
  506. <!--
  507. <classifier type="bayes">
  508. <tokenizer>osb-text</tokenizer>
  509. <metric>default</metric>
  510. <min_tokens>10</min_tokens>
  511. <max_tokens>1000</max_tokens>
  512. <statfile>
  513. <symbol>BAYES_HAM_RU</symbol>
  514. <size>50M</size>
  515. <path>/var/lib/rspamd/bayes_ru.ham</path>
  516. <param name="language">ru</param>
  517. </statfile>
  518. <statfile>
  519. <symbol>BAYES_SPAM_RU</symbol>
  520. <size>50M</size>
  521. <path>/var/lib/rspamd/bayes_ru.spam</path>
  522. <param name="language">ru</param>
  523. </statfile>
  524. <statfile>
  525. <symbol>BAYES_HAM</symbol>
  526. <size>50M</size>
  527. <path>/var/lib/rspamd/bayes.ham</path>
  528. </statfile>
  529. <statfile>
  530. <symbol>BAYES_SPAM</symbol>
  531. <size>50M</size>
  532. <path>/var/lib/rspamd/bayes.spam</path>
  533. </statfile>
  534. </classifier>
  535. -->
  536. <!-- Ordinary statistic for a small mail system -->
  537. <classifier type="bayes">
  538. <tokenizer>osb-text</tokenizer>
  539. <metric>default</metric>
  540. <min_tokens>10</min_tokens>
  541. <max_tokens>1000</max_tokens>
  542. <statfile>
  543. <symbol>BAYES_HAM</symbol>
  544. <size>20M</size>
  545. <path>/var/lib/rspamd/bayes.ham</path>
  546. </statfile>
  547. <statfile>
  548. <symbol>BAYES_SPAM</symbol>
  549. <size>20M</size>
  550. <path>/var/lib/rspamd/bayes.spam</path>
  551. </statfile>
  552. </classifier>
  553. <!-- Advanced meta-classification statistic -->
  554. <!--
  555. <classifier type="bayes">
  556. <tokenizer>osb-text</tokenizer>
  557. <metric>default</metric>
  558. <min_tokens>6</min_tokens>
  559. <max_tokens>5000</max_tokens>
  560. <statfile>
  561. <symbol>BAYES_HAM</symbol>
  562. <size>50M</size>
  563. <path>/var/lib/rspamd/bayes.ham</path>
  564. <spam>no</spam>
  565. </statfile>
  566. <statfile>
  567. <symbol>BAYES_SPAM</symbol>
  568. <size>50M</size>
  569. <path>/var/lib/rspamd/bayes.spam</path>
  570. <spam>yes</spam>
  571. </statfile>
  572. <statfile>
  573. <symbol>BAYES_HAM_RU</symbol>
  574. <size>50M</size>
  575. <path>/var/lib/rspamd/bayes_ru.ham</path>
  576. <language>ru</language>
  577. <spam>no</spam>
  578. </statfile>
  579. <statfile>
  580. <symbol>BAYES_SPAM_RU</symbol>
  581. <size>50M</size>
  582. <path>/var/lib/rspamd/bayes_ru.spam</path>
  583. <language>ru</language>
  584. <spam>yes</spam>
  585. </statfile>
  586. <statfile>
  587. <symbol>BAYES_SPAM</symbol>
  588. <size>10M</size>
  589. <path>/var/lib/rspamd/bayes_manyrcpt.spam</path>
  590. <spam>yes</spam>
  591. <label>many recipients</label>
  592. </statfile>
  593. <statfile>
  594. <symbol>BAYES_HAM</symbol>
  595. <size>10M</size>
  596. <path>/var/lib/rspamd/bayes_manyrcpt.ham</path>
  597. <spam>no</spam>
  598. <label>many recipients</label>
  599. </statfile>
  600. <statfile>
  601. <symbol>BAYES_SPAM</symbol>
  602. <size>10M</size>
  603. <path>/var/lib/rspamd/bayes_undisclosedrcpt.spam</path>
  604. <spam>yes</spam>
  605. <label>undisclosed recipients</label>
  606. </statfile>
  607. <statfile>
  608. <symbol>BAYES_HAM</symbol>
  609. <size>10M</size>
  610. <path>/var/lib/rspamd/bayes_undisclosedrcpt.ham</path>
  611. <spam>no</spam>
  612. <label>undisclosed recipients</label>
  613. </statfile>
  614. <statfile>
  615. <symbol>BAYES_SPAM</symbol>
  616. <size>10M</size>
  617. <path>/var/lib/rspamd/bayes_maillist.spam</path>
  618. <spam>yes</spam>
  619. <label>maillist</label>
  620. </statfile>
  621. <statfile>
  622. <symbol>BAYES_HAM</symbol>
  623. <size>10M</size>
  624. <path>/var/lib/rspamd/bayes_maillist.ham</path>
  625. <spam>no</spam>
  626. <label>maillist</label>
  627. </statfile>
  628. <statfile>
  629. <symbol>BAYES_SPAM</symbol>
  630. <size>10M</size>
  631. <path>/var/lib/rspamd/bayes_longsubject.spam</path>
  632. <spam>yes</spam>
  633. <label>long subject</label>
  634. </statfile>
  635. <statfile>
  636. <symbol>BAYES_HAM</symbol>
  637. <size>10M</size>
  638. <path>/var/lib/rspamd/bayes_longsubject.ham</path>
  639. <spam>no</spam>
  640. <label>long subject</label>
  641. </statfile>
  642. <statfile>
  643. <symbol>BAYES_SPAM</symbol>
  644. <size>10M</size>
  645. <path>/var/lib/rspamd/bayes_replyto.spam</path>
  646. <spam>yes</spam>
  647. <label>different reply to</label>
  648. </statfile>
  649. <statfile>
  650. <symbol>BAYES_HAM</symbol>
  651. <size>10M</size>
  652. <path>/var/lib/rspamd/bayes_replyto.ham</path>
  653. <spam>no</spam>
  654. <label>different reply to</label>
  655. </statfile>
  656. <statfile>
  657. <symbol>BAYES_SPAM</symbol>
  658. <size>10M</size>
  659. <path>/var/lib/rspamd/bayes_replymessage.spam</path>
  660. <spam>yes</spam>
  661. <label>reply message</label>
  662. </statfile>
  663. <statfile>
  664. <symbol>BAYES_HAM</symbol>
  665. <size>10M</size>
  666. <path>/var/lib/rspamd/bayes_replymessage.ham</path>
  667. <spam>no</spam>
  668. <label>reply message</label>
  669. </statfile>
  670. </classifier>
  671. -->
  672. <!-- End of classifiers section -->
  673. <!-- Modules section -->
  674. <modules>
  675. <path>/etc/rspamd/plugins/lua/</path>
  676. </modules>
  677. <!-- End of modules section -->
  678. </rspamd>