From d406df4269e5f2b20f4c8c9ceec70fcad161809c75f66c3b70c6032ab23b35fe Mon Sep 17 00:00:00 2001 From: Bernhard Wiedemann Date: Thu, 26 Nov 2020 13:16:45 +0000 Subject: [PATCH 1/3] Wait for network to be up before starting OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=51 --- rspamd-after-redis-target.patch | 13 +++++++++---- rspamd.changes | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/rspamd-after-redis-target.patch b/rspamd-after-redis-target.patch index 110954b..8674109 100644 --- a/rspamd-after-redis-target.patch +++ b/rspamd-after-redis-target.patch @@ -1,12 +1,17 @@ -Index: rspamd-1.7.9/rspamd.service +Ensure that network is up when rspamd is started + +otherwise, it can fail to reach remote rspamd hosts + +Index: rspamd-2.6/rspamd.service =================================================================== ---- rspamd-1.7.9.orig/rspamd.service -+++ rspamd-1.7.9/rspamd.service -@@ -1,6 +1,6 @@ +--- rspamd-2.6.orig/rspamd.service ++++ rspamd-2.6/rspamd.service +@@ -1,6 +1,7 @@ [Unit] Description=rapid spam filtering system -After=nss-lookup.target network-online.target +After=nss-lookup.target network-online.target redis.target ++Wants=network-online.target Documentation=https://rspamd.com/doc/ [Service] diff --git a/rspamd.changes b/rspamd.changes index 5e06c8e..3f90932 100644 --- a/rspamd.changes +++ b/rspamd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 26 12:05:28 UTC 2020 - Bernhard Wiedemann + +- Wait for network to be up before starting + ------------------------------------------------------------------- Fri Oct 9 17:51:10 UTC 2020 - Marcus Rueckert From 1f22907b1535dbbb014a338d05b9a1e5d6cccf95f4b2518300e114c528bfd9ba Mon Sep 17 00:00:00 2001 From: Bernhard Wiedemann Date: Fri, 27 Nov 2020 13:28:17 +0000 Subject: [PATCH 2/3] Fix SLE build OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=52 --- rspamd.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rspamd.spec b/rspamd.spec index 8a554cb..a78abe9 100644 --- a/rspamd.spec +++ b/rspamd.spec @@ -66,6 +66,10 @@ Source0: https://github.com/rspamd/rspamd/archive/%{version}/%{name}-%{ve Source1: usr.bin.rspamd Patch0: rspamd-conf.patch Patch1: rspamd-after-redis-target.patch +%if !0%{?is_opensuse} +# because 80-check-malware-scan-clamav triggered in SLE-15-SP2 +BuildRequires: -post-build-checks-malwarescan +%endif BuildRequires: cmake BuildRequires: curl-devel BuildRequires: db-devel From bf6d73295d825bc0777d95a08b2a06e7f3a87e7041b008f04d6a4755f9b5f7ae Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Fri, 8 Jan 2021 21:54:18 +0000 Subject: [PATCH 3/3] Accepting request 861805 from home:stroeder:network update to 2.7 - successfully tested on Tumbleweed x86_64 OBS-URL: https://build.opensuse.org/request/show/861805 OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=53 --- rspamd-2.6.tar.gz | 3 -- rspamd-2.7.tar.gz | 3 ++ rspamd.changes | 96 +++++++++++++++++++++++++++++++++++++++++++++++ rspamd.spec | 39 +++++++++++-------- 4 files changed, 123 insertions(+), 18 deletions(-) delete mode 100644 rspamd-2.6.tar.gz create mode 100644 rspamd-2.7.tar.gz diff --git a/rspamd-2.6.tar.gz b/rspamd-2.6.tar.gz deleted file mode 100644 index f15e278..0000000 --- a/rspamd-2.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:002aee47dc4d6f8c6c0572b58ccb0cbcbb9bb7689442c33a5a5cf893e72506db -size 5079444 diff --git a/rspamd-2.7.tar.gz b/rspamd-2.7.tar.gz new file mode 100644 index 0000000..8b82f58 --- /dev/null +++ b/rspamd-2.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2606c18f0d9b1e7eee86907bd8545e0dcda83b1642ddf58915d5d44a53e3df0 +size 5126227 diff --git a/rspamd.changes b/rspamd.changes index 3f90932..4d11097 100644 --- a/rspamd.changes +++ b/rspamd.changes @@ -1,3 +1,99 @@ +------------------------------------------------------------------- +Fri Jan 8 20:22:15 UTC 2021 - Michael Ströder + +- update to 2.7 + * [Conf] Add R_DKIM_PERMFAIL to the metric + * [CritFix] Dkim: Fix simple canonicalisation if multiple signatures are presented + * [CritFix] Fix controller paths normalisation + * [Feature] Add INVALID_DATE rule + * [Feature] Add controller endpoint for training neural + * [Feature] Add sanity checks for actions thresholds + * [Feature] Add support of '==' and '!=' in Rspamd expressions + * [Feature] Composites: Improve composite atoms parser + * [Feature] Docker: use Debian slim variant + * [Feature] Elastic: Add some missing fields + * [Feature] Extract text from img alt attributes + * [Feature] Improve charset detection logic + * [Feature] Lua_clickhouse: Add optional row callback for large selections + * [Feature] Lua_dns_resolver: Add idna_convert_utf8 method + * [Feature] Lua_mime: Add ability to do multipattern replacement + * [Feature] Lua_trie: Allow to report start of the match + * [Feature] Multimap: support adding map values as extra options + * [Feature] Neural: Move PCA learning to a subprocess + * [Feature] RBL: support matching content/image URLs only + * [Feature] RBL: support use of multiple selectors + * [Feature] Reputation: Allow to specify ip masks + * [Feature] Support SMIME signed messages container + * [Feature] Support multiple conditions for symbols + * [Feature] Support ping in milter mode + * [Feature] Support rspamd_text in selector regexps + * [Feature] Use own daemonization routine + * [Feature] Vadesecure: Implement settings_outbound feature as recommended by Vade + * [Feature] `rspamadm clickhouse` command + * [Feature] allow hyperscan for aarch64 + * [Fix] Allow to set priorities between post init scripts + * [Fix] Allow to use maps for strings that are not zero terminated + * [Fix] Apply max_lua_urls limit for emails as well + * [Fix] Arc: Fix CV check on signing + * [Fix] Arc: Fix signing of the broken ARC chains + * [Fix] Clickhouse: escape carriage return + * [Fix] Composites: Allow partial match + * [Fix] Deduct type of a table methods + * [Fix] Do not load errored hyperscan database + * [Fix] Do not process links in ignored html tags + * [Fix] Fix ClamAV result for cached encrypted file (#3395) + * [Fix] Fix canonicalisation when l= tag is presented + * [Fix] Fix flag shift + * [Fix] Fix handling of skip/skip_process http flags + * [Fix] Fix html attachments checks + * [Fix] Fix issue with pushing binary formats to Lua strings + * [Fix] Fix logging for rspamadm + * [Fix] Fix off-by-one with init check + * [Fix] Fix parsing of escape characters in quoted pairs + * [Fix] Fix pushing ucl strings with \0 inside + * [Fix] Fix quoted-printable soft newlines bugged case + * [Fix] Fix settings in case actions are set to null (#3415) + * [Fix] Fix several issues with auth results producing + * [Fix] Fix smtp comments exclusion + * [Fix] Fix smtp date syntax definition + * [Fix] Fix substring search in case if srchlen == inlen + * [Fix] Fix text selectors + * [Fix] Honour `systemd` setting when logging to console (#3514) + * [Fix] Html: Add entities collisions prevention logic (e.g. for mathml entities) + * [Fix] Lua_auth_results: Quote potentially bad values in AR header + * [Fix] Multimap: Fix flags usage + * [Fix] Multimap: Fix scoring for combined maps + * [Fix] Plug GList * leak in redis pool + * [Fix] RBL: allow for multiple matches of the same label if types are different + * [Fix] Rely on libev checks for file maps + * [Fix] Restore simple dkim canonicalisation mode + * [Fix] Return MimeCharset as we work with emails... + * [Fix] Spamassassin: Fix pcre_only flags + * [Fix] Spamassassin: Preserve 'pcre_only' flag when dealing with regexp replacements + * [Fix] Try to fix GError leak + * [Fix] Try to fix a mess with settings loading by adding priorities + * [Fix] Try to move setings initialisation to a later stage + * [Fix] Use dup fd in milter handler to avoid races with the proxy + * [Fix] Use message pointer to avoid obsolete data to be cached + * [Project] Rbl: Migrate to `checks` + * [Project] Rbl: Move config code outside of the plugin + * [Project] Ressurect empty prefilters as connection filters + * [Project] Support connection filters registration from Lua + * [Rework] Add final cleanup logic + * [Rework] Add preliminary support of hyperscan caching for re maps + * [Rework] Add stale cache removal + * [Rework] Clickhouse: Improve performance + * [Rework] Distinguish between strict config test mode + * [Rework] Furhter logging improvements + * [Rework] Milter_headers: improve extended_headers_rcpt support + * [Rework] Move parsers to a separate lua library + * [Rework] Neural: Skip composite symbols + * [Rework] Rbl: Rework defaults logic + * [Rework] Some tunes to cache saving + * [Rework] Track maps origins + * [Rework] Use full crypto hash for regexp maps + * [Rules] Remove broken rule + ------------------------------------------------------------------- Thu Nov 26 12:05:28 UTC 2020 - Bernhard Wiedemann diff --git a/rspamd.spec b/rspamd.spec index a78abe9..a92bacc 100644 --- a/rspamd.spec +++ b/rspamd.spec @@ -1,8 +1,7 @@ # # spec file for package rspamd # -# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -13,8 +12,10 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # + + %{echo: building for suse: ver:%{suse_version} arch:%{_arch} o:%{is_opensuse} "\n"} %bcond_with split_out_client @@ -56,12 +57,12 @@ %endif Name: rspamd -Version: 2.6 +Version: 2.7 Release: 0 -License: Apache-2.0 Summary: Spam filtering system -Url: https://rspamd.com/ +License: Apache-2.0 Group: Productivity/Networking/Email/Utilities +URL: https://rspamd.com/ Source0: https://github.com/rspamd/rspamd/archive/%{version}/%{name}-%{version}.tar.gz Source1: usr.bin.rspamd Patch0: rspamd-conf.patch @@ -105,24 +106,24 @@ BuildRequires: pkgconfig(libev) %if 0%{?suse_version} >= 1500 BuildRequires: pkgconfig(libnsl) %endif -BuildRequires: pkgconfig(openssl) -BuildRequires: pkgconfig(libsodium) -BuildRequires: pkgconfig(sqlite3) BuildRequires: ragel +BuildRequires: pkgconfig(libsodium) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(sqlite3) %if %{with systemd} BuildRequires: pkgconfig(systemd) %{?systemd_requires} %endif %if 0%{?suse_version} < 1500 -Requires: lua51-LPeg +Requires: lua51-LPeg %else -Requires: lua53-lpeg +Requires: lua53-lpeg %endif %if 0%{?with split_out_client} -Requires: rspamd-client = %{version} +Requires: rspamd-client = %{version} %else -Conflicts: rspamd-client +Conflicts: rspamd-client %endif BuildRequires: apparmor-abstractions Requires: apparmor-abstractions @@ -140,9 +141,10 @@ simultaneously and has a number of features available. %if 0%{?with split_out_client} %package client -Group: Productivity/Networking/Email/Utilities # Summary: Spam filtering system - Client tools +Group: Productivity/Networking/Email/Utilities + %description client Rspamd is a spam filtering system that allows evaluation of messages by a number of rules including regular expressions, statistical analysis and @@ -384,6 +386,7 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo %config(noreplace) %{_sysconfdir}/rspamd/modules.d/greylist.conf %config(noreplace) %{_sysconfdir}/rspamd/modules.d/history_redis.conf %config(noreplace) %{_sysconfdir}/rspamd/modules.d/hfilter.conf +%config(noreplace) %{_sysconfdir}/rspamd/modules.d/http_headers.conf %config(noreplace) %{_sysconfdir}/rspamd/modules.d/maillist.conf %config(noreplace) %{_sysconfdir}/rspamd/modules.d/metadata_exporter.conf %config(noreplace) %{_sysconfdir}/rspamd/modules.d/metric_exporter.conf @@ -415,6 +418,7 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo %dir %{_datadir}/rspamd %{_datadir}/rspamd/effective_tld_names.dat +%{_datadir}/rspamd/http_headers.lua %dir %{_datadir}/rspamd/elastic %{_datadir}/rspamd/elastic/kibana.json @@ -544,6 +548,7 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo %{_datadir}/rspamd/lualib/lua_selectors/transforms.lua %dir %{_datadir}/rspamd/lualib/rspamadm +%{_datadir}/rspamd/lualib/rspamadm/clickhouse.lua %{_datadir}/rspamd/lualib/rspamadm/confighelp.lua %{_datadir}/rspamd/lualib/rspamadm/configgraph.lua %{_datadir}/rspamd/lualib/rspamadm/configwizard.lua @@ -560,6 +565,10 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo %{_datadir}/rspamd/lualib/rspamadm/template.lua %{_datadir}/rspamd/lualib/rspamadm/vault.lua +%dir %{_datadir}/rspamd/lualib/plugins +%{_datadir}/rspamd/lualib/plugins/neural.lua +%{_datadir}/rspamd/lualib/plugins/rbl.lua + %dir %{_datadir}/rspamd/rules %{_datadir}/rspamd/rules/bitcoin.lua %{_datadir}/rspamd/rules/bounce.lua @@ -567,7 +576,6 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo %{_datadir}/rspamd/rules/forwarding.lua %{_datadir}/rspamd/rules/headers_checks.lua %{_datadir}/rspamd/rules/html.lua -%{_datadir}/rspamd/rules/http_headers.lua %{_datadir}/rspamd/rules/mid.lua %{_datadir}/rspamd/rules/misc.lua %{_datadir}/rspamd/rules/rspamd.lua @@ -634,3 +642,4 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo %{_bindir}/rspamadm %{_bindir}/rspamc +%changelog