From 11a6f2600d5017f3c28e53b6ecd08b2a65250d23 Mon Sep 17 00:00:00 2001 From: wrosenauer <> Date: Apr 04 2023 21:05:57 +0000 Subject: Update amavisd-new to version 2.13.0 / rev 79 via SR 1077191 https://build.opensuse.org/request/show/1077191 by user wrosenauer + dimstar_suse --- diff --git a/.files b/.files index 33a5d59..11b1ec1 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index 73522b6..6e9a824 100644 --- a/.rev +++ b/.rev @@ -656,4 +656,12 @@ Please forward to Factory and 13.1 - Remove server:mail/amavisd-new/amavis.service since it results Assignment outside of section warning 979415 + + de16f12a2dcd9433c7b377779b3bfbcc + 2.13.0 + + dimstar_suse + + 1077191 + diff --git a/activate_virus_scanner.diff b/activate_virus_scanner.diff deleted file mode 100644 index 94db1c4..0000000 --- a/activate_virus_scanner.diff +++ /dev/null @@ -1,19 +0,0 @@ -Index: amavisd.conf -=================================================================== ---- a/amavisd.conf.orig 2012-08-30 17:00:16.000000000 +0200 -+++ b/amavisd.conf 2013-10-03 17:55:16.010474859 +0200 -@@ -376,10 +376,10 @@ $banned_filename_re = new_RE( - # settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1 - - # ### http://www.clamav.net/ --# ['ClamAV-clamd', --# \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.sock"], --# qr/\bOK$/m, qr/\bFOUND$/m, --# qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ], -+['ClamAV-clamd', -+ \&ask_daemon, ["CONTSCAN {}\n", "/run/clamav/clamd-socket"], -+ qr/\bOK$/m, qr/\bFOUND$/m, -+ qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ], - # # NOTE: run clamd under the same user as amavisd - or run it under its own - # # uid such as clamav, add user clamav to the amavis group, and then add - # # AllowSupplementaryGroups to clamd.conf; diff --git a/amavis-v2.12.2.tar.bz2 b/amavis-v2.12.2.tar.bz2 deleted file mode 120000 index 2553e38..0000000 --- a/amavis-v2.12.2.tar.bz2 +++ /dev/null @@ -1 +0,0 @@ -/ipfs/bafybeic2wf52ywlfmnpoehbekgwqih7wyml4miejoazjt6mgc3dyon2jfy \ No newline at end of file diff --git a/amavis-v2.13.0.tar.bz2 b/amavis-v2.13.0.tar.bz2 new file mode 120000 index 0000000..e5cee0b --- /dev/null +++ b/amavis-v2.13.0.tar.bz2 @@ -0,0 +1 @@ +/ipfs/bafybeidz454ssyszi7mqexfqq2jnhpxbgfrdmdmzsfnl4miemukemxmqu4 \ No newline at end of file diff --git a/amavisd-new-2.10.1-myhostname.patch b/amavisd-new-2.10.1-myhostname.patch deleted file mode 100644 index e29b73d..0000000 --- a/amavisd-new-2.10.1-myhostname.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Ppru amavisd-new-2.10.1.orig/amavisd amavisd-new-2.10.1/amavisd ---- amavisd-new-2.10.1.orig/amavisd 2014-10-26 01:06:00.000000000 +0200 -+++ amavisd-new-2.10.1/amavisd 2016-01-10 20:29:35.271354344 +0100 -@@ -235,7 +235,7 @@ BEGIN { - MIME::Head MIME::Body MIME::Entity MIME::Parser MIME::Decoder - MIME::Decoder::Base64 MIME::Decoder::Binary MIME::Decoder::QuotedPrint - MIME::Decoder::NBit MIME::Decoder::UU MIME::Decoder::Gzip64 -- Net::LibIDN Net::Server Net::Server::PreFork -+ Net::Domain Net::LibIDN Net::Server Net::Server::PreFork - )); - # with earlier versions of Perl one may need to add additional modules - # to the list, such as: auto::POSIX::setgid auto::POSIX::setuid ... -@@ -981,7 +981,8 @@ BEGIN { - - # $myhostname is used by SMTP server module in the initial SMTP welcome line, - # in inserted Received: lines, Message-ID in notifications, log entries, ... -- $myhostname = (POSIX::uname)[1]; # should be a FQDN ! -+ $ENV{'PATH'} = ""; -+ $myhostname = Net::Domain::hostfqdn(); # should be a FQDN ! - - $snmp_contact = ''; # a value of sysContact OID - $snmp_location = ''; # a value of sysLocation OID diff --git a/amavisd-new-2.3.0-myhostname.patch b/amavisd-new-2.3.0-myhostname.patch new file mode 100644 index 0000000..6a8909a --- /dev/null +++ b/amavisd-new-2.3.0-myhostname.patch @@ -0,0 +1,20 @@ +--- amavis-v2.13.0/lib/Amavis/Conf.pm.orig 2023-03-27 12:13:46.358912246 +0200 ++++ amavis-v2.13.0/lib/Amavis/Conf.pm 2023-03-27 12:15:04.675519360 +0200 +@@ -3,6 +3,7 @@ + package Amavis::Conf; + use strict; + use re 'taint'; ++use Net::Domain; + + # constants; intentionally leave value -1 unassigned for compatibility + use constant D_TEMPFAIL => -4; +@@ -748,7 +749,8 @@ + + # $myhostname is used by SMTP server module in the initial SMTP welcome line, + # in inserted Received: lines, Message-ID in notifications, log entries, ... +- $myhostname = (POSIX::uname)[1]; # should be a FQDN ! ++ $ENV{'PATH'} = ""; ++ $myhostname = Net::Domain::hostfqdn(); # should be a FQDN ! + + $snmp_contact = ''; # a value of sysContact OID + $snmp_location = ''; # a value of sysLocation OID diff --git a/amavisd-new-no-berkeleydb.patch b/amavisd-new-no-berkeleydb.patch index d798c1a..cc59243 100644 --- a/amavisd-new-no-berkeleydb.patch +++ b/amavisd-new-no-berkeleydb.patch @@ -1,11 +1,22 @@ ---- a/amavisd.conf 2021-02-25 10:30:28.234737601 +0100 -+++ b/amavisd.conf 2021-02-25 10:31:25.883474087 +0100 -@@ -44,7 +44,7 @@ $do_syslog = 1; # log via s +--- amavis-v2.13.0/conf/amavisd.conf.orig 2023-03-27 12:19:42.201670731 +0200 ++++ amavis-v2.13.0/conf/amavisd.conf 2023-03-27 12:20:24.698000142 +0200 +@@ -44,7 +44,7 @@ $syslog_facility = 'mail'; # Syslog facility as a string # e.g.: mail, daemon, user, local0, ... local7 -$enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny) -+# $enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny) ++# $enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny) + # $enable_zmq = 1; # enable use of ZeroMQ (SNMP and nanny) + $nanny_details_level = 2; # nanny verbosity: 1: traditional, 2: detailed + $enable_dkim_verification = 1; # enable DKIM signatures verification +--- amavis-v2.13.0/conf/amavisd-docker.conf.orig 2023-03-27 12:19:53.465758049 +0200 ++++ amavis-v2.13.0/conf/amavisd-docker.conf 2023-03-27 12:20:30.186042684 +0200 +@@ -41,7 +41,7 @@ + $syslog_facility = 'mail'; # Syslog facility as a string + # e.g.: mail, daemon, user, local0, ... local7 + +-$enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny) ++# $enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny) # $enable_zmq = 1; # enable use of ZeroMQ (SNMP and nanny) $nanny_details_level = 2; # nanny verbosity: 1: traditional, 2: detailed $enable_dkim_verification = 1; # enable DKIM signatures verification diff --git a/amavisd-new.changes b/amavisd-new.changes index ad64708..784987c 100644 --- a/amavisd-new.changes +++ b/amavisd-new.changes @@ -1,4 +1,60 @@ ------------------------------------------------------------------- +Mon Mar 27 20:27:29 UTC 2023 - Peter Varkoly + +- update to version 2.13.0 + NEW FEATURES + o Add support for new decoder Zstandard + o Switch from Net::LibIDN to Net::LibIDN2. + As Net::LibIDN (based on GNU libidn) supports only IDNA 2003 (and its + upstream declares libidn2 as successor), the newer Net::LibIDN2 (based + on GNU libidn2) supporting IDNA 2008 and TR46 is being used preferred, + if available. + o Recognize 7-Zip.org's command line utility 7zz + o Recognize 'ACE archive' file type. + o Add file(1) short type mapping for MS Office CDF format. + o Add attachment file name information to structured report. + o Introduce option to add an extra header containing the Amavis category. + o Introduce $ip_repu_score_limit option to define an upper limit + for the redis ip reputation score feature. + o Make sanity limit inside macro_tests configurable. + o Add support for SpamAssassin subjprefix keyword. + SpamAssassin 3.4.3 introduced a subjprefix keyword and a + _SUBJPREFIX_ template tag which may be used in SpamAssassin + rules. The template tag is now also injected into Amavis for + usage inside subject_tag related confvars. + o Deprecate $daemon_group confvar by @daemon_groups, which allows + joining multiple supplementary groups when dropping privileges. + The first element of @daemon_groups determines the EGID. + If $daemon_group is defined it will be put ahead implicitly. + If @daemon_groups are empty, they default to the system-provided + groups of $daemon_user. + BUG FIXES + o Ignore [$@]daemon_group(s) settings during config test + when amavis is running unprivileged already. + o Resolve "can't obtain a tainted string" warning. + o Resolve start_SSL fail to set SSL_verifycn_name. + Additionally provide an explicit choice of common names + via %smtp_tls_client_verifycn_name_maps. + OTHER + o Add support for Sophos Protection for Linux on @av_scanners_backup. + o Declare Sanesecurity.Foxhole.Mail_tar infection as false positive. + o Factor out various Amavis packages into own module files. + o Introduce tests via Gitlab CI. + o Convert source to CPAN module file structure. + o Update example scanners and documentation. + o Add IKARUS scan.server configuration example. + o Add contribution guideline. + o Remove IO::Stringy dependency. + o Add a docker-compose testing environment. + o Add support for F-Secure Linux Security 64 on @av_scanners. +- Rebase and rename patch: + amavisd-new-2.10.1-myhostname.patch -> amavisd-new-2.3.0-myhostname.patch +- Remove patch. ClamAV is in new version already avtivated + activate_virus_scanner.diff +- Remove deprecated stuff from spec file. +- Use build method provided by amavis + +------------------------------------------------------------------- Fri May 27 05:21:35 UTC 2022 - Peter Varkoly - amavis fails to start (bsc#1199755) diff --git a/amavisd-new.spec b/amavisd-new.spec index 887fce8..af6cbcb 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ # # spec file for package amavisd-new # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,7 +22,7 @@ %define logmsg logger -t %{name}/rpm Name: amavisd-new -Version: 2.12.2 +Version: 2.13.0 Release: 0 Summary: High-Performance E-Mail Virus Scanner License: GPL-2.0-or-later @@ -32,20 +32,14 @@ Source0: https://gitlab.com/amavis/amavis/-/archive/v%{version}/amavis-v% Source1: sysconfig.amavis Source3: amavisd-new-rpmlintrc Source5: amavis.service -%if 0%{?suse_version} <= 1500 -Source10: system-user-vscan.conf -%endif -Patch1: activate_virus_scanner.diff # PATCH-FIX-UPSTREAM -- detect myhostname via Net::Domain::hostfqdn() -Patch2: amavisd-new-2.10.1-myhostname.patch +Patch2: amavisd-new-2.3.0-myhostname.patch # PATCH-FIX-OPENSUSE -- amavisd-new-no-berkeleydb.patch Patch3: amavisd-new-no-berkeleydb.patch -%if 0%{?suse_version} > 1500 +BuildRequires: perl-App-cpanminus +BuildRequires: perl-Dist-Zilla BuildRequires: group(vscan) BuildRequires: user(vscan) -%else -BuildRequires: sysuser-tools -%endif Requires: file Requires: smtp_daemon Requires: perl(Archive::Zip) >= 1.14 @@ -60,18 +54,14 @@ Requires: perl(MIME::Parser) Requires: perl(Mail::DKIM) >= 0.31 Requires: perl(Mail::Internet) >= 1.58 Requires: perl(Net::Domain) -Requires: perl(Net::LibIDN) +Requires: perl(Net::LibIDN2) Requires: perl(Net::Server) >= 2.0 Requires: perl(Time::HiRes) >= 1.49 Requires: perl(Unix::Syslog) Requires(post): %fillup_prereq Requires(post): %{_bindir}/newaliases -%if 0%{?suse_version} > 1500 Requires(pre): group(vscan) Requires(pre): user(vscan) -%else -Requires(pre): system-user-vscan -%endif Recommends: %{name}-docs = %{version} Recommends: arc Recommends: arj @@ -117,16 +107,6 @@ via (E)SMTP, LMTP. This package contains the documentation and Release-Notes. -%if 0%{?suse_version} <= 1500 -%package -n system-user-vscan -Summary: System user and group vscan -Group: Productivity/Networking/Security -%sysusers_requires - -%description -n system-user-vscan -This package provides the system user 'vscan'. -%endif - %prep %autosetup -n amavis-v%{version} -p1 for i in $(find -maxdepth 1 -name "amavisd*" | sed s#./##); do @@ -143,19 +123,23 @@ done # --------------------------------------------------------------------------- %build -%if 0%{?suse_version} <= 1500 -# Create vscan user -%sysusers_generate_pre %{SOURCE10} vscan -%endif +dzil build --no-tgz --in Amavis +cd Amavis +perl Makefile.PL # --------------------------------------------------------------------------- %install -%if 0%{?suse_version} <= 1500 -mkdir -p %{buildroot}%{_sysusersdir} -mkdir -p %{buildroot}%{avspool} -install -m 644 %{SOURCE10} %{buildroot}%{_sysusersdir}/system-user-vscan.conf -%endif +cd Amavis +make install INSTALLDIRS=vendor \ + INSTALLBIN=/usr/sbin \ + INSTALLSITEBIN=/usr/sbin \ + INSTALLVENDORBIN=/usr/sbin \ + INSTALLSCRIPT=/usr/sbin \ + INSTALLSITESCRIPT=/usr/sbin \ + INSTALLVENDORSCRIPT=/usr/sbin \ + DESTDIR=%{buildroot} + mkdir -p %{buildroot}%{avquarantine} mkdir -p %{buildroot}%{avspool}/{tmp,var} mkdir -p %{buildroot}%{avdb} @@ -163,22 +147,15 @@ mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_fillupdir} mkdir -p %{buildroot}%{_sysconfdir}/openldap/schema mkdir -p %{buildroot}%{perl_vendorlib} +install -m 644 conf/amavisd.conf %{buildroot}%{_sysconfdir}/amavisd.conf install -m 644 $RPM_SOURCE_DIR/sysconfig.amavis %{buildroot}%{_fillupdir} -install -m 755 amavisd %{buildroot}/%{_sbindir}/amavisd -install -m 755 amavisd-agent %{buildroot}/%{_sbindir}/amavisd-agent -install -m 755 amavisd-nanny %{buildroot}/%{_sbindir}/amavisd-nanny -install -m 755 amavisd-release %{buildroot}/%{_sbindir}/amavisd-release -install -m 755 p0f-analyzer.pl %{buildroot}/%{_sbindir}/p0f-analyzer.pl -install -m 644 amavisd.conf %{buildroot}%{_sysconfdir}/amavisd.conf -install -m 644 LDAP.schema %{buildroot}%{_sysconfdir}/openldap/schema/amavisd-new.schema -install -m 644 JpegTester.pm %{buildroot}/%{perl_vendorlib}/JpegTester.pm mkdir -p %{buildroot}%{_unitdir} install -m 644 %{SOURCE5} %{buildroot}%{_unitdir} +install -m 644 contrib/LDAP.schema %{buildroot}%{_sysconfdir}/openldap/schema/amavisd-new.schema +install -m 644 contrib/JpegTester.pm %{buildroot}/%{perl_vendorlib}/JpegTester.pm ln -s service %{buildroot}/%{_sbindir}/rcamavis - -%if 0%{?suse_version} <= 1500 -%pre -n system-user-vscan -f vscan.pre -%endif +rm -rf %{buildroot}/%{perl_archlib}/ +rm -rf %{buildroot}/%{perl_vendorarch}/ %pre %service_add_pre amavis.service @@ -206,7 +183,6 @@ fi %files %license LICENSE %doc AAAREADME.first -%doc LDAP.ldif %dir %{_sysconfdir}/openldap %dir %{_sysconfdir}/openldap/schema %config(noreplace) %{_sysconfdir}/amavisd.conf @@ -214,7 +190,13 @@ fi %{_fillupdir}/sysconfig.amavis %{_sbindir}/* %{perl_vendorlib}/JpegTester.pm +%{perl_vendorlib}/Amavis.pm +%{perl_vendorlib}/Amavis +%{perl_vendorlib}/Mail/SpamAssassin/Logger/Amavislog.pm %{_unitdir}/amavis.service +%dir %{perl_vendorlib}/Mail +%dir %{perl_vendorlib}/Mail/SpamAssassin +%dir %{perl_vendorlib}/Mail/SpamAssassin/Logger %defattr(0750,vscan,vscan,0750) %dir %{avspool}/tmp %dir %{avspool}/db @@ -223,17 +205,9 @@ fi %files docs %defattr(0644,root,root,0755) -%doc RELEASE_NOTES -%doc README_FILES -%doc test-messages -%doc amavisd.conf-* -%doc MANIFEST TODO -%doc test-messages - -%if 0%{?suse_version} <= 1500 -%files -n system-user-vscan -%dir %attr(0750,vscan,vscan) %{avspool} -%{_sysusersdir}/system-user-vscan.conf -%endif +%doc RELEASE_NOTES README_FILES TODO +%doc conf/amavisd-custom.conf conf/amavisd.conf-default conf/amavisd-docker.conf +%doc contrib/LDAP.ldif +/usr/share/man/man3/Amavis::SpamControl::RspamdClient.3pm.gz %changelog diff --git a/system-user-vscan.conf b/system-user-vscan.conf deleted file mode 100644 index ce82f66..0000000 --- a/system-user-vscan.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Type Name ID GECOS [HOME] -g vscan 65 - - -u vscan 65 "Vscan account" /var/spool/amavis