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.spec 9.1KB

10 vuotta sitten
10 vuotta sitten
Release 1.1.0 * Incompatible change: sqlite3 and per_user behaviour: Now both redis and sqlite3 follows the common principles for per-user statistics: 1) If per-user statistics is enabled check per-user tokens ONLY 2) If per-user statistics is not enabled then check common tokens ONLY If you need old behaviour, then you'd need to use separate classifier for per-user statistics. * Implement redis statistics backend and cache * Implement autolearning for statistics * Reworked statistics architecture from scratch * Add hyperscan (https://github.com/01org/hyperscan) engine for regular expressions: - add lazy loader for hyperscan databases - rework regexp cache to have joint pcre/hyperscan scanning - implement hyperscan pre-filter support - add compilation guards for bad expressions - implement `rspamadm control recompile` command - implement hyperscan cache monitoring - slides: <https://highsecure.ru/rspamd-hyperscan.pdf> * Implement flexible task logging * Rework fuzzy worker: - it is now possible to run multiple fuzzy workers; - implement lazy writing as sqlite3 is bad at concurrent writing; - add retries for simple sql commands in fuzzy backend; - use fine-grained transactions for fuzzy; - implement new multi-pubkeys mode; - allow encrypted only storages; - rework statistics for fuzzy; - add `rspamadm control fuzzystat` command for extended statistics; - implement human readable output for the previous command; - add condition script for learning fuzzy storage; * Various fixes to SPF: - fix `redirect` records; - fix domains when parsing mx/ptr/a records in includes/redirects; - fix issues with multiple addresses in SPF records; - ignore SPF results in case of DNS failure; - adjust TTL of records when resolving subelements of SPF records; - always select `v=spf1` line if it is available - do not cache records with DNS failure in subrequests; - ignore records with temporary fails during subrequests resolving; - fix `RDNS_RC_NOREC` support; * Add clang plugin for static analysis: - implement static checks for `rspamd_printf` format strings; * Add 'allow_raw_input' option for non-mime messages * Recognize types using libmagic * Fix parsing of IPv6 received headers * Add new interface of communication between workers in rspamd * Add support for named socketpairs * Don't write URLs by default as it is too verbose * Set status for HTTP replies * Try load `rspamd.conf.override` * Implement words decaying for text parts to limit many checks * Improve support of SA rules and plugins: - add check_for_shifted_date and check_for_missing_to_header eval rules; - add 'check_relays_unparseable' support; - add `check_for_mime('mime_attachement')` function; - use new re_cache interface for all SA rules; - add support for `Mail::SpamAssassin::Plugin::MIMEHeader`; - add support of 'special' SA headers to `exists` function; - fix issue when SA metas contain other metas; - fix freemail rules; * Many fixes to the URL parser * Match any newline character in regexps * Fix resolving of upstreams and detection of poor IPv6 configurations * Parse upstreams selection algorithm from the configuration line * Add `reresolve` command to the control interface * Generate fuzzy hashes from task metadata (URLs and headers) * Add method to check if IP is local and `local_addrs` option * Implement forced timeout for delayed filters * Disable fast path of pcre-jit as it seems to be broken * Bayes fixes: - new normalizer function; - really use weights of tokens from the OSB algorithm; - restore multiple classifiers support; * Rules changes: - add `R_SUSPICIOUS_URL` rule that detects obfuscated URL's; - improve empty image rule; - rework `FORGED_RECIPIENTS` rule; - reduce weight of `SUSPICIOUS_RECIPS`; - fix `*_NORESOLVE_MX` symbols in hfilter; - add `SUBJ_ALL_CAPS` rule with support of UTF8 - add spamhaus SBL to uribl - fix `SUSPICIOUS_RECIPS` and `SORTED_RECIPS` rules - remove `R_TO_SEEMS_AUTO` as it generates a lot of FP; - add new Message-ID regexp for Thunderbird (by @moisseev); * Plugins changes: - allow ratelimit plugin to set symbol instead of pre-result - support IP DNS black lists for URIBL (e.g spamhaus SBL); - drop deprecated SURBL bits (by @fatalbanana) - rename `JP_SURBL_MULTI` to `ABUSE_SURBL` (by @fatalbanana) - add `SURBL_BLOCKED` (by @fatalbanana) - add `CR_SURBL` - SURBL: allow fallthrough to default symbol (by @fatalbanana) - Settings: fix IP match (by @fatalbanana) - SURBL: add missing symbols to metric (by @fatalbanana) - allow processing images urls for SURBL - unconditionally disable SPF for authenticated users and local networks * Rework ratelimit plugin - switch to `rates` instead of old and stupid strings to setup; - check if a bucket is zero and disable the corresponding limits' - turn off all buckets by default; - check either `rcpt` or `user` buckets, not all together' - document new `rates` and `symbol` options; - inform user about what buckets are used in the configuration; * Add neural network **experimental** plugin * Add a sample script to learn neural network from rspamd logs * Add documentation strings support to rspamd: - add strings for the main configuration options; - document workers options; - add internal plugin options; - create `rspamadm confighelp` routine; - implement human readable output for the previous command; - add subtree search support; - add keyword search support; * Documentation improvements, tutorials section, statistics description * Many other minor and major bugfixes not noted here Signed-off-by: Vsevolod Stakhov <vsevolod@highsecure.ru>
8 vuotta sitten
9 vuotta sitten
10 vuotta sitten
9 vuotta sitten
9 vuotta sitten
10 vuotta sitten
9 vuotta sitten
10 vuotta sitten
9 vuotta sitten
9 vuotta sitten
9 vuotta sitten
9 vuotta sitten
9 vuotta sitten
10 vuotta sitten
9 vuotta sitten
9 vuotta sitten
10 vuotta sitten
10 vuotta sitten
9 vuotta sitten
9 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
9 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
9 vuotta sitten
10 vuotta sitten
10 vuotta sitten
9 vuotta sitten
10 vuotta sitten
10 vuotta sitten
9 vuotta sitten
10 vuotta sitten
10 vuotta sitten
9 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
9 vuotta sitten
8 vuotta sitten
10 vuotta sitten
9 vuotta sitten
9 vuotta sitten
9 vuotta sitten
9 vuotta sitten
9 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
10 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. %define rspamd_user _rspamd
  2. %define rspamd_group %{rspamd_user}
  3. %define rspamd_home %{_localstatedir}/lib/rspamd
  4. %define rspamd_logdir %{_localstatedir}/log/rspamd
  5. %define rspamd_confdir %{_sysconfdir}/rspamd
  6. %define rspamd_pluginsdir %{_datadir}/rspamd
  7. %define rspamd_rulesdir %{_datadir}/rspamd/rules
  8. %define rspamd_wwwdir %{_datadir}/rspamd/www
  9. Name: rspamd
  10. Version: 1.1.0
  11. Release: 1
  12. Summary: Rapid spam filtering system
  13. Group: System Environment/Daemons
  14. License: ASL 2.0
  15. URL: https://rspamd.com
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
  17. BuildRequires: glib2-devel,libevent-devel,openssl-devel,pcre-devel
  18. BuildRequires: cmake,gmime-devel,file-devel,ragel,libunwind-devel
  19. %if 0%{?el6}
  20. BuildRequires: perl
  21. %else
  22. BuildRequires: perl-Digest-MD5
  23. %endif
  24. %if 0%{?suse_version} || 0%{?el7} || 0%{?fedora}
  25. BuildRequires: systemd
  26. Requires(pre): systemd
  27. Requires(post): systemd
  28. Requires(preun): systemd
  29. Requires(postun): systemd
  30. %endif
  31. %if 0%{?suse_version}
  32. BuildRequires: sqlite3-devel
  33. Requires(pre): shadow
  34. %else
  35. BuildRequires: sqlite-devel
  36. Requires(pre): shadow-utils
  37. %endif
  38. %if 0%{?fedora_version} >= 22 || 0%{?suse_version} >= 1320
  39. BuildRequires: luajit-devel
  40. %else
  41. BuildRequires: lua-devel
  42. %endif
  43. Requires: logrotate
  44. %if 0%{?el6}
  45. Requires(post): chkconfig
  46. Requires(preun): chkconfig, initscripts
  47. Requires(postun): initscripts
  48. Source1: %{name}.init
  49. Source2: %{name}.logrotate
  50. %else
  51. Source2: %{name}.logrotate.systemd
  52. %endif
  53. Source0: https://rspamd.com/downloads/%{name}-%{version}.tar.xz
  54. Source3: 80-rspamd.preset
  55. %description
  56. Rspamd is a rapid, modular and lightweight spam filter. It is designed to work
  57. with big amount of mail and can be easily extended with own filters written in
  58. lua.
  59. %prep
  60. %setup -q
  61. %build
  62. %{__cmake} \
  63. -DCMAKE_C_OPT_FLAGS="%{optflags}" \
  64. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
  65. -DCONFDIR=%{_sysconfdir}/rspamd \
  66. -DMANDIR=%{_mandir} \
  67. -DDBDIR=%{_localstatedir}/lib/rspamd \
  68. -DRUNDIR=%{_localstatedir}/run/rspamd \
  69. %if 0%{?el6}
  70. -DWANT_SYSTEMD_UNITS=OFF \
  71. -DDISABLE_PTHREAD_MUTEX=1 \
  72. %else
  73. -DWANT_SYSTEMD_UNITS=ON \
  74. -DSYSTEMDDIR=%{_unitdir} \
  75. %endif
  76. %if 0%{?suse_version}
  77. -DCMAKE_SKIP_INSTALL_RPATH=ON \
  78. %endif
  79. %if 0%{?fedora_version} >= 22 || 0%{?suse_version} >= 1320
  80. -DENABLE_LUAJIT=ON \
  81. %else
  82. -DENABLE_LUAJIT=OFF \
  83. %endif
  84. -DLOGDIR=%{_localstatedir}/log/rspamd \
  85. -DEXAMPLESDIR=%{_datadir}/examples/rspamd \
  86. -DPLUGINSDIR=%{_datadir}/rspamd \
  87. -DLIBDIR=%{_libdir}/rspamd/ \
  88. -DINCLUDEDIR=%{_includedir} \
  89. -DNO_SHARED=ON \
  90. -DDEBIAN_BUILD=1 \
  91. -DRSPAMD_GROUP=%{rspamd_group} \
  92. -DRSPAMD_USER=%{rspamd_user} \
  93. -DENABLE_LIBUNWIND=ON
  94. %{__make} %{?jobs:-j%jobs}
  95. %install
  96. %{__make} install DESTDIR=%{buildroot} INSTALLDIRS=vendor
  97. %{__install} -p -D -m 0644 %{SOURCE3} %{buildroot}%{_presetdir}/80-rspamd.preset
  98. %if 0%{?el6}
  99. %{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
  100. %{__install} -d -p -m 0755 %{buildroot}%{_localstatedir}/run/rspamd
  101. %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
  102. %{__install} -d -p -m 0755 %{buildroot}%{rspamd_logdir}
  103. %else
  104. %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
  105. %{__install} -d -p -m 0755 %{buildroot}%{rspamd_logdir}
  106. %endif
  107. %{__install} -d -p -m 0755 %{buildroot}%{rspamd_home}
  108. %{__install} -p -D -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/local.d/
  109. %{__install} -p -D -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/override.d/
  110. %clean
  111. rm -rf %{buildroot}
  112. %pre
  113. %{_sbindir}/groupadd -r %{rspamd_group} 2>/dev/null || :
  114. %{_sbindir}/useradd -g %{rspamd_group} -c "Rspamd user" -s /bin/false -r -d %{rspamd_home} %{rspamd_user} 2>/dev/null || :
  115. %if 0%{?suse_version}
  116. %service_add_pre %{name}.service
  117. %endif
  118. %post
  119. #to allow easy upgrade from 0.8.1
  120. %{__chown} -R %{rspamd_user}:%{rspamd_group} %{rspamd_home}
  121. %if 0%{?suse_version}
  122. %service_add_post %{name}.service
  123. %endif
  124. %if 0%{?fedora} || 0%{?el7}
  125. #Macro is not used as we want to do this on upgrade
  126. #%systemd_post %{name}.service
  127. systemctl --no-reload preset %{name}.service >/dev/null 2>&1 || :
  128. %endif
  129. %if 0%{?el6}
  130. /sbin/chkconfig --add %{name}
  131. %else
  132. %{__chown} %{rspamd_user}:%{rspamd_group} %{rspamd_logdir}
  133. %endif
  134. %preun
  135. %if 0%{?suse_version}
  136. %service_del_preun %{name}.service
  137. %endif
  138. %if 0%{?fedora} || 0%{?el7}
  139. %systemd_preun %{name}.service
  140. %endif
  141. %if 0%{?el6}
  142. if [ $1 = 0 ]; then
  143. /sbin/service %{name} stop >/dev/null 2>&1
  144. /sbin/chkconfig --del %{name}
  145. fi
  146. %endif
  147. %postun
  148. %if 0%{?suse_version}
  149. %service_del_postun %{name}.service
  150. %endif
  151. %if 0%{?fedora} || 0%{?el7}
  152. %systemd_postun_with_restart %{name}.service
  153. %endif
  154. %if 0%{?el6}
  155. if [ $1 -ge 1 ]; then
  156. /sbin/service %{name} condrestart > /dev/null 2>&1 || :
  157. fi
  158. %endif
  159. %files
  160. %defattr(-,root,root,-)
  161. %if 0%{?suse_version} || 0%{?fedora} || 0%{?el7}
  162. %{_unitdir}/%{name}.service
  163. %{_presetdir}/80-rspamd.preset
  164. %endif
  165. %if 0%{?el6}
  166. %{_initrddir}/%{name}
  167. %dir %{_localstatedir}/run/rspamd
  168. %endif
  169. %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
  170. %dir %{rspamd_logdir}
  171. %{_mandir}/man8/%{name}.*
  172. %{_mandir}/man1/rspamc.*
  173. %{_mandir}/man1/rspamadm.*
  174. %{_bindir}/rspamd
  175. %{_bindir}/rspamd_stats
  176. %{_bindir}/rspamc
  177. %{_bindir}/rspamadm
  178. %config(noreplace) %{rspamd_confdir}/%{name}.conf
  179. %config(noreplace) %{rspamd_confdir}/composites.conf
  180. %config(noreplace) %{rspamd_confdir}/metrics.conf
  181. %config(noreplace) %{rspamd_confdir}/mime_types.inc
  182. %config(noreplace) %{rspamd_confdir}/modules.conf
  183. %config(noreplace) %{rspamd_confdir}/statistic.conf
  184. %config(noreplace) %{rspamd_confdir}/common.conf
  185. %config(noreplace) %{rspamd_confdir}/logging.inc
  186. %config(noreplace) %{rspamd_confdir}/options.inc
  187. %config(noreplace) %{rspamd_confdir}/redirectors.inc
  188. %config(noreplace) %{rspamd_confdir}/worker-controller.inc
  189. %config(noreplace) %{rspamd_confdir}/worker-fuzzy.inc
  190. %config(noreplace) %{rspamd_confdir}/worker-normal.inc
  191. %config(noreplace) %{rspamd_confdir}/modules.d/*
  192. %attr(-, %{rspamd_user}, %{rspamd_group}) %dir %{rspamd_home}
  193. %dir %{rspamd_rulesdir}/regexp
  194. %dir %{rspamd_rulesdir}
  195. %dir %{rspamd_confdir}
  196. %dir %{rspamd_confdir}/modules.d
  197. %dir %{rspamd_confdir}/local.d
  198. %dir %{rspamd_confdir}/override.d
  199. %dir %{rspamd_pluginsdir}/lua
  200. %dir %{rspamd_pluginsdir}
  201. %dir %{rspamd_wwwdir}
  202. %dir %{_libdir}/rspamd
  203. %config(noreplace) %{rspamd_confdir}/2tld.inc
  204. %config(noreplace) %{rspamd_confdir}/surbl-whitelist.inc
  205. %config(noreplace) %{rspamd_confdir}/spf_dkim_whitelist.inc
  206. %config(noreplace) %{rspamd_confdir}/dmarc_whitelist.inc
  207. %{rspamd_pluginsdir}/lib/*.lua
  208. %{rspamd_pluginsdir}/lua/*.lua
  209. %{rspamd_rulesdir}/regexp/*.lua
  210. %{rspamd_rulesdir}/*.lua
  211. %{rspamd_wwwdir}/*
  212. %{_libdir}/rspamd/*
  213. %{_datadir}/rspamd/effective_tld_names.dat
  214. %changelog
  215. * Thu Sep 17 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 1.0.0-1
  216. - Update to 1.0.0
  217. * Fri May 29 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.9.9-1
  218. - Update to 0.9.9
  219. * Thu May 21 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.9.4-1
  220. - Update to 0.9.4
  221. * Tue May 19 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.9.3-1
  222. - Update to 0.9.3
  223. * Tue May 19 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.9.2-1
  224. - Update to 0.9.2
  225. * Sun May 17 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.9.1-1
  226. - Update to 0.9.1
  227. * Wed May 13 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.9.0-1
  228. - Update to 0.9.0
  229. * Fri Mar 13 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.8.3-1
  230. - Update to 0.8.3
  231. * Tue Mar 10 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.8.2-1
  232. - Update to 0.8.2
  233. * Fri Jan 23 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.8.1-1
  234. - Update to 0.8.1
  235. * Fri Jan 02 2015 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.8.0-1
  236. - Update to 0.8.0
  237. * Mon Nov 24 2014 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.7.6-1
  238. - Update to 0.7.6
  239. * Mon Nov 17 2014 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.7.5-1
  240. - Update to 0.7.5
  241. * Sat Nov 08 2014 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.7.4-1
  242. - Update to 0.7.4
  243. * Mon Nov 03 2014 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.7.3-1
  244. - Update to 0.7.3
  245. * Wed Oct 15 2014 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.7.2-1
  246. - Update to 0.7.2
  247. * Tue Sep 30 2014 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.7.1-1
  248. - Update to 0.7.1
  249. * Mon Sep 1 2014 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.7.0-1
  250. - Update to 0.7.0
  251. * Fri Jan 10 2014 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.6.7-1
  252. - Update to 0.6.7.
  253. * Fri Dec 27 2013 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.6.6-1
  254. - Update to 0.6.6.
  255. * Fri Dec 20 2013 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.6.5-1
  256. - Update to 0.6.5.
  257. * Wed Dec 18 2013 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.6.4-1
  258. - Update to 0.6.4.
  259. * Tue Dec 10 2013 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.6.3-1
  260. - Update to 0.6.3.
  261. * Fri Dec 06 2013 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.6.2-1
  262. - Update to 0.6.2.
  263. * Tue Nov 19 2013 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.6.0-1
  264. - Update to 0.6.0.
  265. * Mon Jun 10 2013 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.5.6-1
  266. - Update to 0.5.6.
  267. * Sat May 25 2013 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.5.5-1
  268. - Initial spec version.