From 824e28d1d6f4ba1474fb4f62377a025ad4594daf Mon Sep 17 00:00:00 2001
From: dstoecker <>
Date: Nov 05 2020 23:27:52 +0000
Subject: Update amavisd-new to version 2.12.0 / rev 71 via SR 846217
https://build.opensuse.org/request/show/846217
by user dstoecker + dimstar_suse
---
diff --git a/.files b/.files
index 0a4b0ae..fc2adfd 100644
Binary files a/.files and b/.files differ
diff --git a/.rev b/.rev
index 4426004..5873733 100644
--- a/.rev
+++ b/.rev
@@ -585,4 +585,12 @@ Please forward to Factory and 13.1
769384
+
+ 3a5aee515b9bc61cb82566e6056b2e7b
+ 2.12.0
+
+ dimstar_suse
+
+ 846217
+
diff --git a/activate_virus_scanner.diff b/activate_virus_scanner.diff
index b3e1684..94db1c4 100644
--- a/activate_virus_scanner.diff
+++ b/activate_virus_scanner.diff
@@ -11,7 +11,7 @@ Index: amavisd.conf
-# qr/\bOK$/m, qr/\bFOUND$/m,
-# qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
+['ClamAV-clamd',
-+ \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd-socket"],
++ \&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
diff --git a/amavis-v2.12.0.tar.bz2 b/amavis-v2.12.0.tar.bz2
new file mode 120000
index 0000000..63ca6d8
--- /dev/null
+++ b/amavis-v2.12.0.tar.bz2
@@ -0,0 +1 @@
+/ipfs/bafybeiel64vbtclpj6374fnoknlv5z3jtavy3ruzohipxv3uqioraosbqu
\ No newline at end of file
diff --git a/amavis.service b/amavis.service
index adb0420..2a0e063 100644
--- a/amavis.service
+++ b/amavis.service
@@ -28,7 +28,6 @@ KillMode=mixed
TimeoutStartSec=1min
TimeoutStopSec=3min
WorkingDirectory=/var/spool/amavis/tmp
-StandardOutput=syslog
SyslogFacility=mail
SyslogIdentifier=amavis
ProtectSystem=full
diff --git a/amavisd-new-2.11.1.tar.bz2 b/amavisd-new-2.11.1.tar.bz2
deleted file mode 120000
index ecd8ede..0000000
--- a/amavisd-new-2.11.1.tar.bz2
+++ /dev/null
@@ -1 +0,0 @@
-/ipfs/bafybeigz4clmfd32l6xexpdcfc44ce5la4ahsxfytg6qr5vog3lnv2mpxa
\ No newline at end of file
diff --git a/amavisd-new.changes b/amavisd-new.changes
index cff7f61..ff1f3d6 100644
--- a/amavisd-new.changes
+++ b/amavisd-new.changes
@@ -1,4 +1,32 @@
-------------------------------------------------------------------
+Mon Oct 26 21:43:51 UTC 2020 - Arjen de Korte
+
+- update to version 2.12.0
+ * Upstream changed to GitLab
+ * Introduce Rspamd client extension
+ With this extension, Amavis can use Rspamd either running on the same
+ server or remotely. Connections are made using HTTP/HTTPS depending on
+ configuration, the latter requiring a HTTPS-capable proxy (like NGINX or
+ Apache) for Rspamd, which does not natively support HTTPS. Basic
+ authentication with name/password pairs is also available.
+ * Treat "not an OLE file" as a successful result
+ Amavis supports calling the ripOLE program to extract embedded objects
+ from Microsoft OLE documents. However, not all Microsoft documents
+ contain said objects, and the underlying file format changes when they
+ do. Since Amavis can't tell the difference, it passes everything to
+ ripOLE unconditionally. Amavis now treats the "not an OLE file" error
+ code of ripOLE as a successful result, proceeds normally and scans the
+ file as a whole.
+ * Fix unix socket path extraction that has prevented a socket based
+ policy bank to be loaded;
+ * Fix DKIM signing for outbound messages (remove dkim-signing.diff)
+ * Fix unescaped left brace regex warning in run_av() subroutine.
+ * Mention default value for $myprogram_name in minimal amavisd.conf.
+- cleanup spec
+ * remove unused rc.amavis SysV initscript
+ * remove unused /usr/lib/tmpfiles.d
+
+-------------------------------------------------------------------
Sun Feb 2 08:19:17 UTC 2020 - Thorsten Kukuk
- pwdutils is gone since ages
diff --git a/amavisd-new.spec b/amavisd-new.spec
index 3e60be7..cf99465 100644
--- a/amavisd-new.spec
+++ b/amavisd-new.spec
@@ -16,28 +16,21 @@
#
-#Compat macro for new _fillupdir macro introduced in Nov 2017
-%if ! %{defined _fillupdir}
- %define _fillupdir /var/adm/fillup-templates
-%endif
-%define _buildshell /bin/bash
-
-%define avspool /var/spool/amavis
-%define avdb /var/spool/amavis/db
-%define avquarantine /var/spool/amavis/virusmails
+%define avspool %{_localstatedir}/spool/amavis
+%define avdb %{_localstatedir}/spool/amavis/db
+%define avquarantine %{_localstatedir}/spool/amavis/virusmails
%define logmsg logger -t %{name}/rpm
%define avuser vscan
%define avgroup vscan
Name: amavisd-new
-Version: 2.11.1
+Version: 2.12.0
Release: 0
Summary: High-Performance E-Mail Virus Scanner
License: GPL-2.0-or-later
Group: Productivity/Networking/Security
-URL: https://amavis.org/
-Source0: https://amavis.org/%{name}-%{version}.tar.bz2
+URL: https://gitlab.com/amavis/amavis/
+Source0: https://gitlab.com/amavis/amavis/-/archive/v%{version}/amavis-v%{version}.tar.bz2
Source1: sysconfig.amavis
-Source2: rc.amavis
Source3: amavisd-new-rpmlintrc
Source4: amavisd-milter-1.6.1.tar.gz
Source5: amavis.service
@@ -45,11 +38,10 @@ Source6: amavisd-milter.sh
Patch1: activate_virus_scanner.diff
# PATCH-FIX-UPSTREAM -- detect myhostname via Net::Domain::hostfqdn()
Patch2: amavisd-new-2.10.1-myhostname.patch
-# PATCH-FIX-UPSTREAM -- originating was not recognized for DKIM signing
-Patch3: dkim-signing.diff
BuildRequires: sed
BuildRequires: sendmail
BuildRequires: sendmail-devel
+BuildRequires: systemd-rpm-macros
BuildRequires: xz
Requires: bzip2
Requires: file
@@ -57,10 +49,8 @@ Requires: gzip
Requires: perl-Archive-Tar
Requires: perl-Archive-Zip
Requires: perl-BerkeleyDB
-Requires: perl-Compress-Zlib
Requires: perl-Convert-BinHex
Requires: perl-Convert-TNEF
-Requires: perl-Convert-UUlib
Requires: perl-IO-stringy
Requires: perl-MIME-tools
Requires: perl-Mail-DKIM
@@ -73,26 +63,25 @@ Requires: sharutils
Requires: smtp_daemon
Requires: spamassassin
Requires: zoo
-Recommends: unar
-Recommends: clamav perl-spamassassin
-Recommends: perl-DBI
-Recommends: perl-ldap
-Recommends: perl-Authen-SASL
-Recommends: perl-Mail-ClamAV
-Recommends: p7zip
-Recommends: binutils
-Recommends: %{name}-docs = %{version}
-Requires(pre): util-linux-systemd
-Requires(post): util-linux-systemd
-Requires(pre): shadow
Requires(post): %fillup_prereq
Requires(post): grep
-OrderWithRequires(post): /usr/bin/newaliases
-BuildRequires: systemd-rpm-macros
+Requires(post): util-linux-systemd
+Requires(pre): shadow
+Requires(pre): util-linux-systemd
+Recommends: %{name}-docs = %{version}
+Recommends: binutils
+Recommends: clamav
+Recommends: p7zip
+Recommends: perl-Authen-SASL
+Recommends: perl-DBI
+Recommends: perl-Mail-ClamAV
+Recommends: perl-ldap
+Recommends: perl-spamassassin
+Recommends: unar
+Provides: amavisd-milter = 1.6.1
+Obsoletes: amavisd-milter < 1.6.1
+OrderWithRequires(post): %{_bindir}/newaliases
%{?systemd_ordering}
-Provides: amavisd-milter = 1.6.0
-Obsoletes: amavisd-milter <= 1.5.0
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Amavisd-new is a high-performance interface between mailer (MTA) and
@@ -104,7 +93,6 @@ following MTAs:
- sendmail (sendmail-milter)
- exim
-
%package docs
Summary: Documentation for the High-Performance E-Mail Virus Scanner
Group: Documentation/Other
@@ -118,10 +106,9 @@ via (E)SMTP, LMTP.
This package contains the documentation and Release-Notes.
%prep
-%setup -q -a 4
+%setup -q -n amavis-v%{version} -a 4
%patch1 -p1
%patch2 -p1
-%patch3 -p1
for i in $(find -maxdepth 1 -name "amavisd*" | sed s#./##); do
if [[ $i == *patch ]] ; then continue; fi
if [[ $i == *patch ]] ; then continue; fi
@@ -141,7 +128,7 @@ done
%build
cd amavisd-milter*
%configure --localstatedir="%{avspool}"
-make %{?_smp_mflags}
+%make_build
# ---------------------------------------------------------------------------
@@ -151,22 +138,21 @@ mkdir -p %{buildroot}%{avspool}/{tmp,var}
mkdir -p %{buildroot}%{avdb}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_fillupdir}
-mkdir -p %{buildroot}/etc/openldap/schema
+mkdir -p %{buildroot}%{_sysconfdir}/openldap/schema
mkdir -p %{buildroot}%{perl_vendorlib}
-mkdir -p %{buildroot}/usr/lib/tmpfiles.d
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}/etc/amavisd.conf
-install -m 644 LDAP.schema %{buildroot}/etc/openldap/schema/amavisd-new.schema
+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 %{S:5} %{buildroot}%{_unitdir}
+install -m 644 %{SOURCE5} %{buildroot}%{_unitdir}
ln -s service %{buildroot}/%{_sbindir}/rcamavis
-install -m 755 %{S:6} %{buildroot}%{_sbindir}/
+install -m 755 %{SOURCE6} %{buildroot}%{_sbindir}/
cd amavisd-milter*
%make_install
@@ -195,7 +181,7 @@ else
if [ -r etc/aliases ]; then
if ! grep -q "^virusalert:" etc/aliases; then
echo "virusalert: root" >> etc/aliases
- %{logmsg} "Added alias for user virusalert to /etc/aliases"
+ %{logmsg} "Added alias for user virusalert to %{_sysconfdir}/aliases"
if [ -x usr/bin/newaliases ]; then
usr/bin/newaliases >/dev/null 2>&1 || true
else
@@ -209,17 +195,13 @@ fi
%service_del_postun amavis.service
%files
-%defattr(-,root,root)
-%doc AAAREADME.first LICENSE
+%license LICENSE
+%doc AAAREADME.first
%doc LDAP.ldif
-%dir /etc/openldap
-%dir /etc/openldap/schema
-%dir /usr/lib/tmpfiles.d
-%if 0%{?suse_version} < 1230
-%config /etc/init.d/amavis
-%endif
-%config(noreplace) /etc/amavisd.conf
-%config(noreplace) /etc/openldap/schema/amavisd-new.schema
+%dir %{_sysconfdir}/openldap
+%dir %{_sysconfdir}/openldap/schema
+%config(noreplace) %{_sysconfdir}/amavisd.conf
+%config(noreplace) %{_sysconfdir}/openldap/schema/amavisd-new.schema
%{_fillupdir}/sysconfig.amavis
%{_sbindir}/*
%{perl_vendorlib}/JpegTester.pm
@@ -240,6 +222,6 @@ fi
%doc amavisd.conf-*
%doc MANIFEST TODO
%doc test-messages
-%doc %{_mandir}/man8/amavisd-milter*
+%{_mandir}/man8/amavisd-milter*
%changelog
diff --git a/dkim-signing.diff b/dkim-signing.diff
deleted file mode 100644
index b0ffab5..0000000
--- a/dkim-signing.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/amavisd b/amavisd
-index 7f93194..3ff4028 100755
---- a/amavisd
-+++ b/amavisd
-@@ -34338,6 +34338,7 @@ sub collect_some_dkim_info($) {
- $sig_ind++;
- }
- Amavis::load_policy_bank($_,$msginfo) for @bank_names;
-+ $msginfo->originating(c('originating'));
- $msginfo->dkim_signatures_valid(\@signatures_valid) if @signatures_valid;
- # if (ll(5) && $sig_ind > 0) {
- # # show which header fields are covered by which signature
diff --git a/rc.amavis b/rc.amavis
deleted file mode 100644
index d1bda5b..0000000
--- a/rc.amavis
+++ /dev/null
@@ -1,176 +0,0 @@
-#! /bin/sh
-# Copyright (c) 2008 SuSE Linux AG Nuernberg, Germany.
-#
-# Author: Carsten Hoeger , 2003
-#
-# /etc/init.d/amavis
-# and its symbolic link
-# /usr/sbin/rcamavis
-#
-### BEGIN INIT INFO
-# Provides: amavis
-# Required-Start: $remote_fs
-# Should-Start: $named clamd
-# Should-Stop: $named clamd
-# Required-Stop: $remote_fs
-# Default-Start: 3 5
-# Default-Stop: 0 1 2 6
-# Short-Description: Start amavisd-new
-# Description: Amavisd-new is a high-performance interface between mailer (MTA) and
-# content checkers: virus scanners or SpamAssassin. It talks to the MTA
-# via (E)SMTP, LMTP, or by using helper programs.
-### END INIT INFO
-
-AMAVISD_BIN=/usr/sbin/amavisd
-AMAVIS_MILTER_BIN=/usr/sbin/amavisd-milter
-AMAVIS_SYSCONFIG=/etc/sysconfig/amavis
-AMAVIS_CONF=/etc/amavisd.conf
-AMAVIS_PID=/var/spool/amavis/amavisd.pid
-AMAVIS_MILTER_PID=/var/spool/amavis/amavisd-milter.pid
-AMAVIS_MILTER_SOCK=local:/var/spool/amavis/amavis-milter.sock
-# Use local TCP socket
-# AMAVIS_MILTER_SOCK=inet:10024@localhost
-
-# it's like checkproc, but works for scripts too:
-checkproc_script()
-{
- if [ "${1}" = "-p" ]; then
- if [ -z "${2}" -o -z "${3}" ]; then
- return 101
- fi
- CHECK_PID=`cat "${2}"`;
- if [ -e /proc/"${CHECK_PID}" ]; then
- CHECK_EXE="${3}";
- FOUND=`cat /proc/"${CHECK_PID}"/cmdline | grep "${CHECK_EXE}"`
- if [ -n "${FOUND}" ]; then
- return 0;
- else
- return 1;
- fi
- else
- return 3;
- fi
- elif [ -z "${2}" ]; then
- CHECK_EXE="${1}";
- FOUND=`ps auxwww | grep "${CHECK_EXE}"`
- if [ -n "${FOUND}" ]; then
- return 0;
- else
- return 7;
- fi
- fi
-
- return 101;
-}
-
-# Check for missing binaries (stale symlinks should not happen)
-# Note: Special treatment of stop for LSB conformance
-test -x $AMAVISD_BIN || { echo "$AMAVIS_BIN not installed";
- if [ "$1" = "stop" ]; then exit 0;
- else exit 5; fi; }
-
-test -x $AMAVIS_MILTER_BIN || { echo "$AMAVIS_MILTER_BIN not installed";
- if [ "$1" = "stop" ]; then exit 0;
- else exit 5; fi; }
-
-# Check for existence of needed config file and read it
-test -r $AMAVIS_SYSCONFIG || { echo "$AMAVIS_SYSCONFIG not existing";
- if [ "$1" = "stop" ]; then exit 0;
- else exit 6; fi; }
-
-test -r $AMAVIS_CONF || { echo "$AMAVIS_CONF not existing";
- if [ "$1" = "stop" ]; then exit 0;
- else exit 6; fi; }
-
-# Read config
-. $AMAVIS_SYSCONFIG
-
-# Shell functions sourced from /etc/rc.status
-. /etc/rc.status
-
-# First reset status of this service
-rc_reset
-
-case "$1" in
- start)
- # ZMI 20100428 check for stale pid file
- if test -f $AMAVIS_PID ; then
- checkproc_script -p $AMAVIS_PID $AMAVISD_BIN
- if test $? -ge 1 ; then
- # pid file is stale, remove it
- echo -n "(stale amavisd pid file $AMAVIS_PID found, removing. Did amavisd crash?)"
- rm -f $AMAVIS_PID
- fi
- fi
- echo -n "Starting virus-scanner (amavisd-new): "
- $AMAVISD_BIN start
- if ! checkproc_script $AMAVISD_BIN; then
- rc_failed 7
- fi
- rc_status -v
- if [ "$AMAVIS_SENDMAIL_MILTER" == "yes" ]; then
- rc_reset
- echo -n "Starting amavisd-milter:"
- startproc -u vscan $AMAVIS_MILTER_BIN -s $AMAVIS_MILTER_SOCK \
- -p $AMAVIS_MILTER_PID > /dev/null 2>&1
- rc_status -v
- fi
- ;;
- stop)
- echo -n "Shutting down virus-scanner (amavisd-new): "
- if checkproc_script $AMAVISD_BIN; then
- rc_reset
- $AMAVISD_BIN stop
- else
- rc_reset
- fi
- rc_status -v
- if [ "$AMAVIS_SENDMAIL_MILTER" == "yes" ]; then
- rc_reset
- echo -n "Shutting down amavis-milter: "
- killproc -TERM $AMAVIS_MILTER_BIN
- rc_status -v
- fi
- ;;
- try-restart)
- $0 status >/dev/null && $0 restart
- rc_status
- ;;
- restart)
- $0 stop
- $0 start
- rc_status
- ;;
- force-reload)
- echo -n "Reload virus-scanner (amavisd-new): "
- $AMAVISD_BIN reload 2>/dev/null
- rc_status -v
- ;;
- reload)
- echo -n "Reload virus-scanner (amavisd-new): "
- $AMAVISD_BIN reload 2>/dev/null
- rc_status -v
- ;;
- status)
- echo -n "Checking for service amavis (amavisd-new): "
- checkproc_script -p $AMAVIS_PID $AMAVISD_BIN
- rc_status -v
- if [ "$AMAVIS_SENDMAIL_MILTER" == "yes" ]; then
- rc_reset
- echo -n "Checking for service amavis-milter: "
- checkproc_script $AMAVIS_MILTER_BIN
- rc_status -v
- fi
- ;;
- probe)
- ## Optional: Probe for the necessity of a reload, print out the
- ## argument to this init script which is required for a reload.
- test $AMAVIS_CONF -nt /var/spool/amavis/amavisd.pid && echo reload
- ;;
- *)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
- exit 1
- ;;
-esac
-# Inform the caller not only verbosely and set an exit status.
-rc_exit