From 42db5a92bb6c519104f7ce3390b22b2a4ed57adb Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Thu, 13 Feb 2014 11:03:50 +0100 Subject: [PATCH 01/45] Update to version 2.8.1, add systemd service units and minor fixes. - Update to version 2.8.1 - Add systemd service units - Add missing dependencies - Start clamd using instantiated service - Place tmpfiles conf in _tmpfilesdir - Use _localstatedir macro --- .gitignore | 1 + README.fedora | 17 +++--- amavis-clamd.init | 7 --- amavis-clamd.sysconfig | 3 -- amavisd-new.spec | 117 +++++++++++++++++++---------------------- amavisd-snmp.init | 67 ----------------------- amavisd-snmp.service | 16 ++++++ amavisd.service | 18 +++++++ sources | 2 +- 9 files changed, 97 insertions(+), 151 deletions(-) delete mode 100644 amavis-clamd.init delete mode 100644 amavis-clamd.sysconfig delete mode 100644 amavisd-snmp.init create mode 100644 amavisd-snmp.service create mode 100644 amavisd.service diff --git a/.gitignore b/.gitignore index dbef4e0..f9a91ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ amavisd-new-2.8.0.tar.gz +/amavisd-new-2.8.1.tar.gz diff --git a/README.fedora b/README.fedora index 494e34e..34ce8c5 100644 --- a/README.fedora +++ b/README.fedora @@ -11,20 +11,17 @@ optional components for amavisd-new. Next, configure amavisd-new to start on boot: - chkconfig --level 2345 amavisd on + systemctl enable amavisd.service -If you want to use the Clam Antivirus daemon (recommended), set it to -start on boot as well: +When you are ready, start the amavisd service, it will also start +a clamd instance if available. - chkconfig --level 2345 clamd.amavisd on + systemctl start amavisd.service -When you are ready, start the clamd.amavisd (optional but recommended) -and amavisd services: +Check /var/log/maillog for startup messages of amavisd and clamd. +You can also check the journal. - service clamd.amavisd start - service amavisd start - -Check /var/log/maillog for startup messages from both daemons. + journalctl -a -u amavisd -u clamd@amavisd The next step is to integrate amavisd with your MTA. diff --git a/amavis-clamd.init b/amavis-clamd.init deleted file mode 100644 index 27a6f87..0000000 --- a/amavis-clamd.init +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# chkconfig: - 78 32 -# description: The clamd server running for amavisd - -CLAMD_SERVICE=amavisd -. /usr/share/clamav/clamd-wrapper diff --git a/amavis-clamd.sysconfig b/amavis-clamd.sysconfig deleted file mode 100644 index 55fb40a..0000000 --- a/amavis-clamd.sysconfig +++ /dev/null @@ -1,3 +0,0 @@ -CLAMD_CONFIGFILE=/etc/clamd.d/amavisd.conf -CLAMD_SOCKET=/var/spool/amavisd/clamd.sock -CLAMD_OPTIONS= diff --git a/amavisd-new.spec b/amavisd-new.spec index 491f45a..a9fb647 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -2,21 +2,20 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new -Version: 2.8.0 -Release: 8%{?prerelease:.%{prerelease}}%{?dist} +Version: 2.8.1 +Release: 1%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System URL: http://www.ijs.si/software/amavisd/ Source0: http://www.ijs.si/software/amavisd/amavisd-new-%{version}%{?prerelease:-%{prerelease}}.tar.gz -Source1: amavis-clamd.init Source2: amavis-clamd.conf -Source3: amavis-clamd.sysconfig Source4: README.fedora Source5: README.quarantine Source6: amavisd.cron -Source7: amavisd-snmp.init Source8: amavisd-new-tmpfiles.conf +Source9: amavisd.service +Source10: amavisd-snmp.service Patch0: amavisd-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch @@ -26,7 +25,10 @@ Patch2: amavisd-condrestart.patch # sent upstream to amavis-users ML 2013-05-10. -adamw Patch3: amavisd-new-2.8.0-init_network.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: /usr/sbin/clamd, /etc/clamd.d +BuildArch: noarch +BuildRequires: systemd +Requires: clamav-server +Requires: clamav-server-systemd Requires: /usr/sbin/tmpwatch, /etc/cron.daily Requires: /usr/bin/ar Requires: altermime @@ -76,23 +78,25 @@ Requires: perl(Mail::SpamAssassin) Requires: perl(Net::DNS) Requires: perl(Net::LDAP) Requires: perl(Net::SSLeay) +Requires: perl(Net::Server) Requires: perl(NetAddr::IP) Requires: perl(Razor2::Client::Version) Requires: perl(Socket6) +Requires: perl(Unix::Syslog) Requires: perl(URI) Requires(pre): shadow-utils -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/service, /sbin/chkconfig -Requires(postun): /sbin/service -BuildArch: noarch +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %package snmp Group: Applications/System Summary: Exports amavisd SNMP data Requires: %{name} = %{version}-%{release} -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/service, /sbin/chkconfig -Requires(postun): /sbin/service +Requires: perl(NetSNMP::OID) +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %description amavisd-new is a high-performance and reliable interface between mailer @@ -122,7 +126,7 @@ alerting purposes. %patch3 -p1 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ -sed -e 's,/var/amavis/amavisd.sock\>,/var/spool/amavisd/amavisd.sock,' -i amavisd-release +sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/spool/amavisd/amavisd.sock,' -i amavisd-release %build @@ -131,26 +135,23 @@ rm -rf $RPM_BUILD_ROOT install -D -p -m 755 amavisd $RPM_BUILD_ROOT%{_sbindir}/amavisd install -D -p -m 755 amavisd-snmp-subagent $RPM_BUILD_ROOT%{_sbindir}/amavisd-snmp-subagent -ln -sf clamd $RPM_BUILD_ROOT%{_sbindir}/clamd.amavisd mkdir -p $RPM_BUILD_ROOT%{_bindir} install -p -m 755 amavisd-{agent,nanny,release} $RPM_BUILD_ROOT%{_bindir}/ -install -D -p -m 755 amavisd_init.sh $RPM_BUILD_ROOT%{_initrddir}/amavisd -install -D -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/clamd.amavisd -install -D -p -m 755 %{SOURCE7} $RPM_BUILD_ROOT%{_initrddir}/amavisd-snmp +install -D -p -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_unitdir}/amavisd.service +install -D -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}/amavisd-snmp.service install -D -p -m 644 amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavisd/amavisd.conf install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.conf -install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamd.amavisd install -D -p -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/amavisd -mkdir -p $RPM_BUILD_ROOT/var/spool/amavisd/{tmp,db,quarantine} -touch $RPM_BUILD_ROOT/var/spool/amavisd/clamd.sock -mkdir -p $RPM_BUILD_ROOT/var/run/{amavisd,clamd.amavisd} +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/amavisd/{tmp,db,quarantine} +touch $RPM_BUILD_ROOT%{_localstatedir}/spool/amavisd/clamd.sock +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/amavisd -%if 0%{?fedora}%{?rhel} > 6 -install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/amavisd-new.conf +%if 0%{?fedora} > 17 +install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_tmpfilesdir}/amavisd-new.conf %endif %clean @@ -158,75 +159,65 @@ rm -rf $RPM_BUILD_ROOT %pre getent group amavis > /dev/null || %{_sbindir}/groupadd -r amavis -getent passwd amavis > /dev/null || %{_sbindir}/useradd -r -g amavis -d /var/spool/amavisd -s /sbin/nologin -c "User for amavisd-new" amavis +getent passwd amavis > /dev/null || \ + %{_sbindir}/useradd -r -g amavis -d %{_localstatedir}/spool/amavisd -s /sbin/nologin \ + -c "User for amavisd-new" amavis +exit 0 %preun -if [ $1 -eq 0 ]; then - /sbin/service amavisd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del amavisd - /sbin/service clamd.amavisd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del clamd.amavisd -fi +%systemd_preun amavisd.service %preun snmp -if [ $1 -eq 0 ]; then - /sbin/service amavisd-snmp stop > /dev/null 2>&1 || : - /sbin/chkconfig --del amavisd-snmp -fi +%systemd_preun amavisd-snmp.service %post -/sbin/chkconfig --add clamd.amavisd -/sbin/chkconfig --add amavisd +%systemd_post amavisd.service %post snmp -/sbin/chkconfig --add amavisd-snmp +%systemd_post amavisd-snmp.service %postun -if [ $1 -ne 0 ]; then - /sbin/service clamd.amavisd condrestart > /dev/null 2>&1 || : - /sbin/service amavisd condrestart > /dev/null 2>&1 || : -fi +%systemd_postun_with_restart amavisd.service %postun snmp -if [ $1 -ne 0 ]; then - /sbin/service amavisd-snmp condrestart > /dev/null 2>&1 || : -fi +%systemd_postun_with_restart amavisd-snmp.service %files %defattr(-,root,root,-) %doc AAAREADME.first LDAP.schema LDAP.ldif LICENSE RELEASE_NOTES %doc README_FILES test-messages amavisd.conf-* %dir %{_sysconfdir}/amavisd/ -%attr(755,root,root) %{_initrddir}/amavisd -%attr(755,root,root) %{_initrddir}/clamd.amavisd +%{_unitdir}/amavisd.service %config(noreplace) %{_sysconfdir}/amavisd/amavisd.conf %config(noreplace) %{_sysconfdir}/clamd.d/amavisd.conf -%config(noreplace) %{_sysconfdir}/sysconfig/clamd.amavisd %config(noreplace) %{_sysconfdir}/cron.daily/amavisd %{_sbindir}/amavisd -%{_sbindir}/clamd.amavisd %{_bindir}/amavisd-* -%dir %attr(710,amavis,amavis) /var/spool/amavisd -%dir %attr(700,amavis,amavis) /var/spool/amavisd/tmp -%dir %attr(700,amavis,amavis) /var/spool/amavisd/db -%dir %attr(700,amavis,amavis) /var/spool/amavisd/quarantine -%ghost /var/spool/amavisd/clamd.sock -%if 0%{?fedora}%{?rhel} > 6 -%attr(644,root,root) %{_sysconfdir}/tmpfiles.d/amavisd-new.conf -%ghost %dir %attr(755,amavis,amavis) /var/run/amavisd -%ghost %dir %attr(755,amavis,amavis) /var/run/clamd.amavisd -%else -%dir %attr(755,amavis,amavis) /var/run/amavisd -%dir %attr(755,amavis,amavis) /var/run/clamd.amavisd +%dir %attr(710,amavis,amavis) %{_localstatedir}/spool/amavisd +%dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/tmp +%dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/db +%dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine +%ghost %{_localstatedir}/spool/amavisd/clamd.sock +%if 0%{?fedora} > 17 +%attr(644,root,root) %{_tmpfilesdir}/amavisd-new.conf %endif +%dir %attr(755,amavis,amavis) %{_localstatedir}/run/amavisd %files snmp %defattr(-,root,root,-) %doc AMAVIS-MIB.txt -%attr(755,root,root) %{_initrddir}/amavisd-snmp +%{_unitdir}/amavisd-snmp.service %{_sbindir}/amavisd-snmp-subagent %changelog +* Wed Feb 12 2014 Juan Orti Alcaine 2.8.1-1 +- Update to version 2.8.1 +- Add systemd service units +- Add missing dependencies +- Start clamd using instantiated service +- Place tmpfiles conf in _tmpfilesdir +- Use _localstatedir macro + * Mon Dec 02 2013 Robert Scheck 2.8.0-8 - Commented ripole(1) decoder as the binary is not packaged - Commented tnef(1) decoder as the perl module is a dependency @@ -289,7 +280,7 @@ fi - Update to 2.6.2. - Drop smtpdaemon dependency (BZ# 438078). -* Wed Jul 15 2008 Steven Pritchard 2.6.1-1 +* Tue Jul 15 2008 Steven Pritchard 2.6.1-1 - Update to 2.6.1. - Require Crypt::OpenSSL::RSA, Digest::SHA, Digest::SHA1, IO::Socket::SSL, Mail::DKIM, Net::SSLeay, NetAddr::IP, and Socket6. diff --git a/amavisd-snmp.init b/amavisd-snmp.init deleted file mode 100644 index 8ce2369..0000000 --- a/amavisd-snmp.init +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# -# amavisd-snmp: Init script for amavisd-snmp-subagent -# -# chkconfig: - 79 31 -# description: Exports amavisd SNMP data -# pidfile: /var/run/amavisd-snmp-subagent.pid - -# Source function library. -. /etc/init.d/functions - -RETVAL=0 - -start() { - echo -n $"Starting amavisd-snmp-subagent: " - [ $RETVAL -eq 0 ] && { daemon amavisd-snmp-subagent -P /var/run/amavisd-snmp-subagent.pid; RETVAL=$?; }; - [ $RETVAL -eq 0 ] && { touch /var/lock/subsys/amavisd-snmp-subagent; RETVAL=$?; }; - [ $RETVAL -eq 0 ] && echo_success || echo_failure - echo -} - -stop() { - echo -n $"Shutting down amavisd-snmp-subagent: " - kill $( cat /var/run/amavisd-snmp-subagent.pid ) || RETVAL=1 - [ $RETVAL -eq 0 ] && { rm -f /var/lock/subsys/amavisd-snmp-subagent; RETVAL=$?; }; - [ $RETVAL -eq 0 ] && echo_success || echo_failure - echo -} - -restart() { - stop - start -} - -# See how we were called. -case "$1" in - start) - start - ;; - - stop) - stop - ;; - - status) - status amavisd-snmp-subagent - ;; - - reload) - restart - ;; - - restart) - restart - ;; - - condrestart) - [ -f /var/lock/subsys/amavisd-snmp-subagent ] && restart || : - ;; - - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart}" - exit 1 -esac - -exit $RETVAL - diff --git a/amavisd-snmp.service b/amavisd-snmp.service new file mode 100644 index 0000000..955b88c --- /dev/null +++ b/amavisd-snmp.service @@ -0,0 +1,16 @@ +[Unit] +Description=Exports amavisd SNMP data +After=network.target amavisd.service + +[Service] +Type=forking +User=amavis +Group=amavis +PIDFile=/var/run/amavisd/amavisd-snmp-subagent.pid +ExecStart=/usr/sbin/amavisd-snmp-subagent -D /var/spool/amavisd/db -P /var/run/amavisd/amavisd-snmp-subagent.pid +Restart=on-failure +PrivateTmp=true +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target diff --git a/amavisd.service b/amavisd.service new file mode 100644 index 0000000..3acd93e --- /dev/null +++ b/amavisd.service @@ -0,0 +1,18 @@ +[Unit] +Description=Amavisd-new is an interface between MTA and content checkers. +Documentation=http://www.ijs.si/software/amavisd/#doc +After=syslog.target network.target +Wants=clamd@amavisd.service + +[Service] +Type=forking +User=amavis +Group=amavis +PIDFile=/var/run/amavisd/amavisd.pid +ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf +Restart=on-failure +PrivateTmp=true +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target diff --git a/sources b/sources index 3c85930..5cf05b1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9851ce19f0c8fcab36f254c4e0251618 amavisd-new-2.8.0.tar.gz +f6f9abd1aac05521bdcb3754d09f5314 amavisd-new-2.8.1.tar.gz From 07c1a82b541e40cd02acd8f9e1872babc3c75548 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Mon, 17 Feb 2014 09:21:16 +0100 Subject: [PATCH 02/45] Move clamd socket to /var/run/clamd.amavisd/clamd.sock Move clamd socket and allow freshclam to notify the running daemon --- amavis-clamd.conf | 4 ++-- amavisd-conf.patch | 2 +- amavisd-new-tmpfiles.conf | 2 +- amavisd-new.spec | 11 +++++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/amavis-clamd.conf b/amavis-clamd.conf index 0449325..a84b8ef 100644 --- a/amavis-clamd.conf +++ b/amavis-clamd.conf @@ -7,7 +7,7 @@ LogFacility LOG_MAIL # This option allows you to save a process identifier of the listening # daemon (main thread). -PidFile /var/run/amavisd/clamd.pid +PidFile /var/run/clamd.amavisd/clamd.pid # Remove stale socket after unclean shutdown. # Default: disabled @@ -17,4 +17,4 @@ FixStaleSocket yes User amavis # Path to a local socket file the daemon will listen on. -LocalSocket /var/spool/amavisd/clamd.sock +LocalSocket /var/run/clamd.amavisd/clamd.sock diff --git a/amavisd-conf.patch b/amavisd-conf.patch index ef1b7a1..5cb5e23 100644 --- a/amavisd-conf.patch +++ b/amavisd-conf.patch @@ -92,7 +92,7 @@ -# # this entry; when running chrooted one may prefer a socket under $MYHOME. + ### http://www.clamav.net/ + ['ClamAV-clamd', -+ \&ask_daemon, ["CONTSCAN {}\n", "/var/spool/amavisd/clamd.sock"], ++ \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamd.amavisd/clamd.sock"], + 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/amavisd-new-tmpfiles.conf b/amavisd-new-tmpfiles.conf index 082b271..fac3b2f 100644 --- a/amavisd-new-tmpfiles.conf +++ b/amavisd-new-tmpfiles.conf @@ -1,2 +1,2 @@ d /var/run/amavisd 755 amavis amavis - -d /var/run/clamd.amavisd 755 amavis amavis - +d /var/run/clamd.amavisd 770 amavis clamupdate - diff --git a/amavisd-new.spec b/amavisd-new.spec index a9fb647..e56caf7 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.8.1 -Release: 1%{?prerelease:.%{prerelease}}%{?dist} +Release: 2%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -147,8 +147,7 @@ install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.co install -D -p -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/amavisd mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/amavisd/{tmp,db,quarantine} -touch $RPM_BUILD_ROOT%{_localstatedir}/spool/amavisd/clamd.sock -mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/amavisd +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/{clamd.amavisd,amavisd} %if 0%{?fedora} > 17 install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_tmpfilesdir}/amavisd-new.conf @@ -197,11 +196,11 @@ exit 0 %dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/tmp %dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/db %dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine -%ghost %{_localstatedir}/spool/amavisd/clamd.sock %if 0%{?fedora} > 17 %attr(644,root,root) %{_tmpfilesdir}/amavisd-new.conf %endif %dir %attr(755,amavis,amavis) %{_localstatedir}/run/amavisd +%dir %attr(770,amavis,clamupdate) %{_localstatedir}/run/clamd.amavisd %files snmp %defattr(-,root,root,-) @@ -210,6 +209,10 @@ exit 0 %{_sbindir}/amavisd-snmp-subagent %changelog +* Mon Feb 17 2014 Juan Orti Alcaine 2.8.1-2 +- Move clamd socket to /var/run/clamd.amavisd +- Add permissions to clamupdate to notify clamd + * Wed Feb 12 2014 Juan Orti Alcaine 2.8.1-1 - Update to version 2.8.1 - Add systemd service units From dde04c229566976adc4789155be268ff08f289c7 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Tue, 29 Apr 2014 13:31:43 +0200 Subject: [PATCH 03/45] Use systemd timer units instead of cronjobs and use PrivateDevices --- amavisd-clean-quarantine.service | 8 ++++++ amavisd-clean-quarantine.timer | 9 +++++++ amavisd-clean-tmp.service | 8 ++++++ amavisd-clean-tmp.timer | 9 +++++++ amavisd-new.spec | 43 ++++++++++++++++++++++++-------- amavisd.cron | 2 -- amavisd.service | 3 ++- 7 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 amavisd-clean-quarantine.service create mode 100644 amavisd-clean-quarantine.timer create mode 100644 amavisd-clean-tmp.service create mode 100644 amavisd-clean-tmp.timer delete mode 100644 amavisd.cron diff --git a/amavisd-clean-quarantine.service b/amavisd-clean-quarantine.service new file mode 100644 index 0000000..62c01cd --- /dev/null +++ b/amavisd-clean-quarantine.service @@ -0,0 +1,8 @@ +[Unit] +Description=Clean amavisd quarantine folder + +[Service] +Type=oneshot +User=amavis +Group=amavis +ExecStart=/usr/sbin/tmpwatch -d 720 /var/spool/amavisd/quarantine diff --git a/amavisd-clean-quarantine.timer b/amavisd-clean-quarantine.timer new file mode 100644 index 0000000..1afedc1 --- /dev/null +++ b/amavisd-clean-quarantine.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Amavisd clean quarantine timer + +[Timer] +OnBootSec=5min +OnUnitActiveSec=24h + +[Install] +WantedBy=timers.target diff --git a/amavisd-clean-tmp.service b/amavisd-clean-tmp.service new file mode 100644 index 0000000..ff5073f --- /dev/null +++ b/amavisd-clean-tmp.service @@ -0,0 +1,8 @@ +[Unit] +Description=Clean amavisd tmp folder + +[Service] +Type=oneshot +User=amavis +Group=amavis +ExecStart=/usr/sbin/tmpwatch 24 /var/spool/amavisd/tmp diff --git a/amavisd-clean-tmp.timer b/amavisd-clean-tmp.timer new file mode 100644 index 0000000..75878a2 --- /dev/null +++ b/amavisd-clean-tmp.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Amavisd clean tmp timer + +[Timer] +OnBootSec=5min +OnUnitActiveSec=24h + +[Install] +WantedBy=timers.target diff --git a/amavisd-new.spec b/amavisd-new.spec index e56caf7..716defd 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.8.1 -Release: 2%{?prerelease:.%{prerelease}}%{?dist} +Release: 3%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -12,10 +12,13 @@ Source0: http://www.ijs.si/software/amavisd/amavisd-new-%{version}%{?prer Source2: amavis-clamd.conf Source4: README.fedora Source5: README.quarantine -Source6: amavisd.cron Source8: amavisd-new-tmpfiles.conf Source9: amavisd.service Source10: amavisd-snmp.service +Source11: amavisd-clean-tmp.service +Source12: amavisd-clean-tmp.timer +Source13: amavisd-clean-quarantine.service +Source14: amavisd-clean-quarantine.timer Patch0: amavisd-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch @@ -29,8 +32,8 @@ BuildArch: noarch BuildRequires: systemd Requires: clamav-server Requires: clamav-server-systemd -Requires: /usr/sbin/tmpwatch, /etc/cron.daily -Requires: /usr/bin/ar +Requires: tmpwatch +Requires: binutils Requires: altermime Requires: arj Requires: bzip2 @@ -141,17 +144,18 @@ install -p -m 755 amavisd-{agent,nanny,release} $RPM_BUILD_ROOT%{_bindir}/ install -D -p -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_unitdir}/amavisd.service install -D -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}/amavisd-snmp.service +install -D -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-tmp.service +install -D -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-tmp.timer +install -D -p -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-quarantine.service +install -D -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-quarantine.timer install -D -p -m 644 amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavisd/amavisd.conf install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.conf -install -D -p -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/amavisd mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/amavisd/{tmp,db,quarantine} mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/{clamd.amavisd,amavisd} -%if 0%{?fedora} > 17 install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_tmpfilesdir}/amavisd-new.conf -%endif %clean rm -rf $RPM_BUILD_ROOT @@ -165,18 +169,30 @@ exit 0 %preun %systemd_preun amavisd.service +%systemd_preun amavisd-clean-tmp.service +%systemd_preun amavisd-clean-tmp.timer +%systemd_preun amavisd-clean-quarantine.service +%systemd_preun amavisd-clean-quarantine.timer %preun snmp %systemd_preun amavisd-snmp.service %post %systemd_post amavisd.service +%systemd_post amavisd-clean-tmp.service +%systemd_post amavisd-clean-tmp.timer +%systemd_post amavisd-clean-quarantine.service +%systemd_post amavisd-clean-quarantine.timer %post snmp %systemd_post amavisd-snmp.service %postun %systemd_postun_with_restart amavisd.service +%systemd_postun_with_restart amavisd-clean-tmp.service +%systemd_postun_with_restart amavisd-clean-tmp.timer +%systemd_postun_with_restart amavisd-clean-quarantine.service +%systemd_postun_with_restart amavisd-clean-quarantine.timer %postun snmp %systemd_postun_with_restart amavisd-snmp.service @@ -187,18 +203,19 @@ exit 0 %doc README_FILES test-messages amavisd.conf-* %dir %{_sysconfdir}/amavisd/ %{_unitdir}/amavisd.service +%{_unitdir}/amavisd-clean-tmp.service +%{_unitdir}/amavisd-clean-tmp.timer +%{_unitdir}/amavisd-clean-quarantine.service +%{_unitdir}/amavisd-clean-quarantine.timer %config(noreplace) %{_sysconfdir}/amavisd/amavisd.conf %config(noreplace) %{_sysconfdir}/clamd.d/amavisd.conf -%config(noreplace) %{_sysconfdir}/cron.daily/amavisd %{_sbindir}/amavisd %{_bindir}/amavisd-* %dir %attr(710,amavis,amavis) %{_localstatedir}/spool/amavisd %dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/tmp %dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/db %dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine -%if 0%{?fedora} > 17 -%attr(644,root,root) %{_tmpfilesdir}/amavisd-new.conf -%endif +%{_tmpfilesdir}/amavisd-new.conf %dir %attr(755,amavis,amavis) %{_localstatedir}/run/amavisd %dir %attr(770,amavis,clamupdate) %{_localstatedir}/run/clamd.amavisd @@ -209,6 +226,10 @@ exit 0 %{_sbindir}/amavisd-snmp-subagent %changelog +* Wed Mar 19 2014 Juan Orti Alcaine 2.8.1-3 +- Use systemd timer units instead of cronjobs +- Add PrivateDevices to service unit + * Mon Feb 17 2014 Juan Orti Alcaine 2.8.1-2 - Move clamd socket to /var/run/clamd.amavisd - Add permissions to clamupdate to notify clamd diff --git a/amavisd.cron b/amavisd.cron deleted file mode 100644 index 3e408d9..0000000 --- a/amavisd.cron +++ /dev/null @@ -1,2 +0,0 @@ -/usr/sbin/tmpwatch 24 /var/spool/amavisd/tmp -/usr/sbin/tmpwatch -d 720 /var/spool/amavisd/quarantine diff --git a/amavisd.service b/amavisd.service index 3acd93e..fc3e928 100644 --- a/amavisd.service +++ b/amavisd.service @@ -1,7 +1,7 @@ [Unit] Description=Amavisd-new is an interface between MTA and content checkers. Documentation=http://www.ijs.si/software/amavisd/#doc -After=syslog.target network.target +After=network.target Wants=clamd@amavisd.service [Service] @@ -12,6 +12,7 @@ PIDFile=/var/run/amavisd/amavisd.pid ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf Restart=on-failure PrivateTmp=true +PrivateDevices=true NoNewPrivileges=true [Install] From c6bb948ef4681359664ef680f65b3129c95f27ae Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Mon, 12 May 2014 10:48:22 +0200 Subject: [PATCH 04/45] Update to upstream 2.9.0 - Update to upstream 2.9.0 - Enable and start timer units - Rework amavisd-conf.patch --- .gitignore | 1 + ...conf.patch => amavisd-new-2.9.0-conf.patch | 70 +++++++++++-------- amavisd-new.spec | 18 +++-- sources | 2 +- 4 files changed, 57 insertions(+), 34 deletions(-) rename amavisd-conf.patch => amavisd-new-2.9.0-conf.patch (86%) diff --git a/.gitignore b/.gitignore index f9a91ae..13a6681 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ amavisd-new-2.8.0.tar.gz /amavisd-new-2.8.1.tar.gz +/amavisd-new-2.9.0.tar.xz diff --git a/amavisd-conf.patch b/amavisd-new-2.9.0-conf.patch similarity index 86% rename from amavisd-conf.patch rename to amavisd-new-2.9.0-conf.patch index 5cb5e23..54cfc35 100644 --- a/amavisd-conf.patch +++ b/amavisd-new-2.9.0-conf.patch @@ -1,6 +1,40 @@ ---- amavisd-new-2.8.0/amavisd.conf 2012-06-30 23:33:32.000000000 +0200 -+++ amavisd-new-2.8.0/amavisd.conf.conf 2013-12-02 16:24:05.000000000 +0100 -@@ -14,25 +14,25 @@ +commit 44707666dd30b5196e75002f1661da6b77e360f8 +Author: Juan Orti Alcaine +Date: Mon May 12 09:59:27 2014 +0200 + + amavisd-conf.patch + +diff --git a/amavisd-agent b/amavisd-agent +index 1ebe2bb..b8271a3 100755 +--- a/amavisd-agent ++++ b/amavisd-agent +@@ -53,7 +53,7 @@ use BerkeleyDB; + + my($dbfile) = 'snmp.db'; + my($db_home) = # DB databases directory +- defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/amavis/db'; ++ defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/spool/amavisd/db'; + + my($wakeuptime) = 10; # -w, sleep time in seconds, may be fractional + my($repeatcount); # -c, repeat count (when defined) +diff --git a/amavisd-nanny b/amavisd-nanny +index 80b84dc..164549f 100755 +--- a/amavisd-nanny ++++ b/amavisd-nanny +@@ -61,7 +61,7 @@ my($activettl) = 10*60; # stuck active children are sent a SIGTERM + + my($dbfile) = 'nanny.db'; + my($db_home) = # DB databases directory +- defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/amavis/db'; ++ defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/spool/amavisd/db'; + my($wakeuptime) = 2; # -w, sleep time in seconds, may be fractional + my($repeatcount); # -c, repeat count (when defined) + +diff --git a/amavisd.conf b/amavisd.conf +index a09597f..25db750 100644 +--- a/amavisd.conf ++++ b/amavisd.conf +@@ -14,25 +14,25 @@ use strict; # $bypass_decode_parts = 1; # controls running of decoders&dearchivers $max_servers = 2; # num of pre-forked children (2..30 is common), -m @@ -33,7 +67,7 @@ #NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually $log_level = 0; # verbosity 0..5, -d -@@ -113,11 +113,11 @@ +@@ -116,11 +116,11 @@ $sa_local_tests_only = 0; # only tests which do not require internet access? # $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP; # defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16) @@ -49,7 +83,7 @@ $mailfrom_to_quarantine = ''; # null return path; uses original sender if undef @addr_extension_virus_maps = ('virus'); -@@ -151,10 +151,10 @@ +@@ -154,10 +154,10 @@ $defang_by_ccat{CC_BADH.",6"} = 1; # header field syntax error # $notify_method = 'smtp:[127.0.0.1]:10025'; # $forward_method = 'smtp:[127.0.0.1]:10025'; # set to undef with milter! @@ -64,7 +98,7 @@ # $bad_header_quarantine_method = undef; # $os_fingerprint_method = 'p0f:*:2345'; # to query p0f-analyzer.pl -@@ -335,9 +335,9 @@ +@@ -338,9 +338,9 @@ $banned_filename_re = new_RE( ['arj', \&do_unarj, ['unarj', 'arj'] ], ['arc', \&do_arc, ['nomarch', 'arc'] ], ['zoo', \&do_zoo, ['zoo', 'unzoo'] ], @@ -76,7 +110,7 @@ ['tnef', \&do_tnef], # ['lha', \&do_lha, 'lha'], # not safe, use 7z instead # ['sit', \&do_unstuff, 'unstuff'], # not safe -@@ -375,16 +375,16 @@ +@@ -378,16 +378,16 @@ $banned_filename_re = new_RE( # qr/^(?:310|420)[,\s]*(?:.* <<< )?(.+?)(?: ; |$)/m ], # settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1 @@ -103,25 +137,3 @@ # ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred) # # note that Mail::ClamAV requires perl to be build with threading! ---- amavisd-new-2.8.0/amavisd-nanny 2009-06-25 19:57:13.000000000 +0200 -+++ amavisd-new-2.8.0/amavisd-nanny.conf 2012-07-08 01:00:58.000000000 +0200 -@@ -58,7 +58,7 @@ - - my($dbfile) = 'nanny.db'; - my($db_home) = # DB databases directory -- defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/amavis/db'; -+ defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/spool/amavisd/db'; - my($wakeuptime) = 2; # -w, sleep time in seconds, may be fractional - my($repeatcount); # -c, repeat count (when defined) - ---- amavisd-new-2.8.0/amavisd-agent 2009-06-18 21:17:30.000000000 +0200 -+++ amavisd-new-2.8.0/amavisd-agent.conf 2012-07-08 01:03:16.000000000 +0200 -@@ -50,7 +50,7 @@ - - my($dbfile) = 'snmp.db'; - my($db_home) = # DB databases directory -- defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/amavis/db'; -+ defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/spool/amavisd/db'; - - my($wakeuptime) = 10; # -w, sleep time in seconds, may be fractional - my($repeatcount); # -c, repeat count (when defined) diff --git a/amavisd-new.spec b/amavisd-new.spec index 716defd..c5ae3cf 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -2,13 +2,13 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new -Version: 2.8.1 -Release: 3%{?prerelease:.%{prerelease}}%{?dist} +Version: 2.9.0 +Release: 1%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System URL: http://www.ijs.si/software/amavisd/ -Source0: http://www.ijs.si/software/amavisd/amavisd-new-%{version}%{?prerelease:-%{prerelease}}.tar.gz +Source0: http://www.ijs.si/software/amavisd/amavisd-new-%{version}%{?prerelease:-%{prerelease}}.tar.xz Source2: amavis-clamd.conf Source4: README.fedora Source5: README.quarantine @@ -19,7 +19,7 @@ Source11: amavisd-clean-tmp.service Source12: amavisd-clean-tmp.timer Source13: amavisd-clean-quarantine.service Source14: amavisd-clean-quarantine.timer -Patch0: amavisd-conf.patch +Patch0: amavisd-new-2.9.0-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch # Don't source /etc/sysconfig/network in init script; the network check @@ -184,6 +184,11 @@ exit 0 %systemd_post amavisd-clean-quarantine.service %systemd_post amavisd-clean-quarantine.timer +systemctl enable amavisd-clean-tmp.timer >/dev/null 2>&1 || : +systemctl start amavisd-clean-tmp.timer >/dev/null 2>&1 || : +systemctl enable amavisd-clean-quarantine.timer >/dev/null 2>&1 || : +systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : + %post snmp %systemd_post amavisd-snmp.service @@ -226,6 +231,11 @@ exit 0 %{_sbindir}/amavisd-snmp-subagent %changelog +* Sun May 11 2014 Juan Orti Alcaine 2.9.0-1 +- Update to version 2.9.0 +- Rework amavisd-conf.patch +- Enable and start timer units + * Wed Mar 19 2014 Juan Orti Alcaine 2.8.1-3 - Use systemd timer units instead of cronjobs - Add PrivateDevices to service unit diff --git a/sources b/sources index 5cf05b1..a793937 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f6f9abd1aac05521bdcb3754d09f5314 amavisd-new-2.8.1.tar.gz +085518062e9df802f806230b800e075e amavisd-new-2.9.0.tar.xz From 0fcfaa5af9aa7529ba357a7d49fe7cf6a2a72323 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Mon, 12 May 2014 11:24:54 +0200 Subject: [PATCH 05/45] Service unit files hardening --- amavisd-clean-quarantine.service | 4 ++++ amavisd-clean-tmp.service | 4 ++++ amavisd-new.spec | 5 ++++- amavisd-snmp.service | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/amavisd-clean-quarantine.service b/amavisd-clean-quarantine.service index 62c01cd..2bb8b3f 100644 --- a/amavisd-clean-quarantine.service +++ b/amavisd-clean-quarantine.service @@ -5,4 +5,8 @@ Description=Clean amavisd quarantine folder Type=oneshot User=amavis Group=amavis +PrivateTmp=true +PrivateDevices=true +PrivateNetwork=true +NoNewPrivileges=true ExecStart=/usr/sbin/tmpwatch -d 720 /var/spool/amavisd/quarantine diff --git a/amavisd-clean-tmp.service b/amavisd-clean-tmp.service index ff5073f..70fcffc 100644 --- a/amavisd-clean-tmp.service +++ b/amavisd-clean-tmp.service @@ -5,4 +5,8 @@ Description=Clean amavisd tmp folder Type=oneshot User=amavis Group=amavis +PrivateTmp=true +PrivateDevices=true +PrivateNetwork=true +NoNewPrivileges=true ExecStart=/usr/sbin/tmpwatch 24 /var/spool/amavisd/tmp diff --git a/amavisd-new.spec b/amavisd-new.spec index c5ae3cf..b1a0a5a 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.9.0 -Release: 1%{?prerelease:.%{prerelease}}%{?dist} +Release: 2%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -231,6 +231,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Mon May 12 2014 Juan Orti Alcaine 2.9.0-2 +- Service unit files hardening + * Sun May 11 2014 Juan Orti Alcaine 2.9.0-1 - Update to version 2.9.0 - Rework amavisd-conf.patch diff --git a/amavisd-snmp.service b/amavisd-snmp.service index 955b88c..94b3537 100644 --- a/amavisd-snmp.service +++ b/amavisd-snmp.service @@ -10,6 +10,7 @@ PIDFile=/var/run/amavisd/amavisd-snmp-subagent.pid ExecStart=/usr/sbin/amavisd-snmp-subagent -D /var/spool/amavisd/db -P /var/run/amavisd/amavisd-snmp-subagent.pid Restart=on-failure PrivateTmp=true +PrivateDevices=true NoNewPrivileges=true [Install] From 3c2982c4f544c7ed0aebb66a44dbdd6675f29ce9 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 6 Jun 2014 19:35:09 -0500 Subject: [PATCH 06/45] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- amavisd-new.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index b1a0a5a..be1fad7 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.9.0 -Release: 2%{?prerelease:.%{prerelease}}%{?dist} +Release: 3%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -231,6 +231,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 2.9.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Mon May 12 2014 Juan Orti Alcaine 2.9.0-2 - Service unit files hardening From 2587ac26574cee8fb97eb80f090cbbec7ea6a283 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Fri, 27 Jun 2014 14:43:52 +0200 Subject: [PATCH 07/45] Change permissions of /var/spool/amavisd folders to 750. Fix bug #906396 --- amavisd-new.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index be1fad7..74c1830 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.9.0 -Release: 3%{?prerelease:.%{prerelease}}%{?dist} +Release: 4%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -216,10 +216,10 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/clamd.d/amavisd.conf %{_sbindir}/amavisd %{_bindir}/amavisd-* -%dir %attr(710,amavis,amavis) %{_localstatedir}/spool/amavisd -%dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/tmp -%dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/db -%dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine +%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd +%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/tmp +%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/db +%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine %{_tmpfilesdir}/amavisd-new.conf %dir %attr(755,amavis,amavis) %{_localstatedir}/run/amavisd %dir %attr(770,amavis,clamupdate) %{_localstatedir}/run/clamd.amavisd @@ -231,6 +231,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Fri Jun 27 2014 Juan Orti Alcaine 2.9.0-4 +- Change permissions of /var/spool/amavisd folders to 750. Fix bug #906396 + * Sat Jun 07 2014 Fedora Release Engineering - 2.9.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From c6901188cbcd3cace4421f9152efeb7d18a55f6a Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Sat, 28 Jun 2014 15:21:23 +0200 Subject: [PATCH 08/45] New version 2.9.1 --- .gitignore | 1 + amavisd-new.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 13a6681..9b70741 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ amavisd-new-2.8.0.tar.gz /amavisd-new-2.8.1.tar.gz /amavisd-new-2.9.0.tar.xz +/amavisd-new-2.9.1.tar.xz diff --git a/amavisd-new.spec b/amavisd-new.spec index 74c1830..01e00f1 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -2,8 +2,8 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new -Version: 2.9.0 -Release: 4%{?prerelease:.%{prerelease}}%{?dist} +Version: 2.9.1 +Release: 1%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -231,6 +231,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Sat Jun 28 2014 Juan Orti Alcaine 2.9.1-1 +- New version 2.9.1 + * Fri Jun 27 2014 Juan Orti Alcaine 2.9.0-4 - Change permissions of /var/spool/amavisd folders to 750. Fix bug #906396 diff --git a/sources b/sources index a793937..d81113a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -085518062e9df802f806230b800e075e amavisd-new-2.9.0.tar.xz +2b83d60b49855943c297743db0029218 amavisd-new-2.9.1.tar.xz From 6595b8b39fe05aadb6df98abfc77a25cf3a74377 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Sun, 3 Aug 2014 23:15:43 +0200 Subject: [PATCH 09/45] Add patch to fix releasing mail from sql quarantine --- ...9.1-release_mail_from_sql_quarantine.patch | 51 +++++++++++++++++++ amavisd-new.spec | 9 +++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch diff --git a/amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch b/amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch new file mode 100644 index 0000000..fe5fc04 --- /dev/null +++ b/amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch @@ -0,0 +1,51 @@ +diff --git a/amavisd b/amavisd +index f721756..2a2c418 100755 +--- a/amavisd ++++ b/amavisd +@@ -20208,7 +20208,7 @@ sub preprocess_policy_query($$) { + new_am_id('rel-'.$msginfo->mail_id) if $releasing; + if ($releasing && $quar_type eq 'Q') { # releasing from SQL + do_log(5, "preprocess_policy_query: opening in sql: %s", +- $msginfo->mail_id); ++ $msginfo->parent_mail_id); + my $obj = $Amavis::sql_storage; + $Amavis::extra_code_sql_quar && $obj + or die "SQL quarantine code not enabled (3)"; +@@ -20218,31 +20218,31 @@ sub preprocess_policy_query($$) { + if (!defined($msginfo->partition_tag) && + defined($sel_msg) && $sel_msg ne '') { + do_log(5, "preprocess_policy_query: missing partition_tag in request,". +- " fetching msgs record for mail_id=%s", $msginfo->mail_id); ++ " fetching msgs record for mail_id=%s", $msginfo->parent_mail_id); + # find a corresponding partition_tag if missing from a release request + $conn_h->begin_work_nontransaction; #(re)connect if necessary +- $conn_h->execute($sel_msg, untaint($msginfo->mail_id)); ++ $conn_h->execute($sel_msg, untaint($msginfo->parent_mail_id)); + my $a_ref; my $cnt = 0; my $partition_tag; + while ( defined($a_ref=$conn_h->fetchrow_arrayref($sel_msg)) ) { + $cnt++; + $partition_tag = $a_ref->[0] if !defined $partition_tag; + ll(5) && do_log(5, "release: got msgs record for mail_id=%s: %s", +- $msginfo->mail_id, join(', ',@$a_ref)); ++ $msginfo->parent_mail_id, join(', ',@$a_ref)); + } + $conn_h->finish($sel_msg) if defined $a_ref; # only if not all read + $cnt <= 1 or die "Multiple ($cnt) records with same mail_id exist, ". + "specify a partition_tag in the AM.PDP request"; + if ($cnt < 1) { + do_log(0, "release: no records with msgs.mail_id=%s in a database, ". +- "trying to read from a quar. anyway", $msginfo->mail_id); ++ "trying to read from a quar. anyway", $msginfo->parent_mail_id); + } + $msginfo->partition_tag($partition_tag); # could still be undef/NULL ! + } + ll(5) && do_log(5, "release: opening mail_id=%s, partition_tag=%s", +- $msginfo->mail_id, $msginfo->partition_tag); ++ $msginfo->parent_mail_id, $msginfo->partition_tag); + $conn_h->begin_work_nontransaction; # (re)connect if not connected + $fh = Amavis::IO::SQL->new; +- $fh->open($conn_h, $sel_quar, untaint($msginfo->mail_id), ++ $fh->open($conn_h, $sel_quar, untaint($msginfo->parent_mail_id), + 'r', untaint($msginfo->partition_tag)) + or die "Can't open sql obj for reading: $!"; 1; + } else { # mail checking or releasing from a file diff --git a/amavisd-new.spec b/amavisd-new.spec index 01e00f1..1771fbb 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.9.1 -Release: 1%{?prerelease:.%{prerelease}}%{?dist} +Release: 2%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -27,6 +27,9 @@ Patch2: amavisd-condrestart.patch # and it can't be relied upon to exist in recent Fedora builds. Mail # sent upstream to amavis-users ML 2013-05-10. -adamw Patch3: amavisd-new-2.8.0-init_network.patch +# Fix bug #1121552 +# http://lists.amavis.org/pipermail/amavis-users/2014-June/002957.html +Patch4: amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: systemd @@ -127,6 +130,7 @@ alerting purposes. %patch1 -p1 %patch2 -p0 %patch3 -p1 +%patch4 -p1 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/spool/amavisd/amavisd.sock,' -i amavisd-release @@ -231,6 +235,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Sun Aug 03 2014 Juan Orti Alcaine 2.9.1-2 +- Add patch to fix releasing mail from sql quarantine + * Sat Jun 28 2014 Juan Orti Alcaine 2.9.1-1 - New version 2.9.1 From 20d69c4539ce726f49247eae723dca7cb9454012 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Wed, 20 Aug 2014 15:09:46 +0200 Subject: [PATCH 10/45] Add ExecReload and Wants=postfix.service to systemd unit --- amavisd-new.spec | 5 ++++- amavisd.service | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 1771fbb..44d996a 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.9.1 -Release: 2%{?prerelease:.%{prerelease}}%{?dist} +Release: 3%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -235,6 +235,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Wed Aug 20 2014 Juan Orti Alcaine 2.9.1-3 +- Add ExecReload and Wants=postfix.service to systemd unit + * Sun Aug 03 2014 Juan Orti Alcaine 2.9.1-2 - Add patch to fix releasing mail from sql quarantine diff --git a/amavisd.service b/amavisd.service index fc3e928..b7d15bd 100644 --- a/amavisd.service +++ b/amavisd.service @@ -3,6 +3,7 @@ Description=Amavisd-new is an interface between MTA and content checkers. Documentation=http://www.ijs.si/software/amavisd/#doc After=network.target Wants=clamd@amavisd.service +Wants=postfix.service [Service] Type=forking @@ -10,6 +11,7 @@ User=amavis Group=amavis PIDFile=/var/run/amavisd/amavisd.pid ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf +ExecReload=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf reload Restart=on-failure PrivateTmp=true PrivateDevices=true From 260a13ba446746e6e724503385ed06e1f4fe2da0 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Mon, 20 Oct 2014 10:22:35 +0200 Subject: [PATCH 11/45] Update to 2.10.0-rc2 --- .gitignore | 1 + ....0-conf.patch => amavisd-new-2.10.0-conf.patch | 14 +++++++------- amavisd-new.spec | 15 +++++++-------- sources | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) rename amavisd-new-2.9.0-conf.patch => amavisd-new-2.10.0-conf.patch (95%) diff --git a/.gitignore b/.gitignore index 9b70741..6ebf46e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ amavisd-new-2.8.0.tar.gz /amavisd-new-2.8.1.tar.gz /amavisd-new-2.9.0.tar.xz /amavisd-new-2.9.1.tar.xz +/amavisd-new-2.10.0-rc2.tar.xz diff --git a/amavisd-new-2.9.0-conf.patch b/amavisd-new-2.10.0-conf.patch similarity index 95% rename from amavisd-new-2.9.0-conf.patch rename to amavisd-new-2.10.0-conf.patch index 54cfc35..fc4d197 100644 --- a/amavisd-new-2.9.0-conf.patch +++ b/amavisd-new-2.10.0-conf.patch @@ -1,8 +1,8 @@ -commit 44707666dd30b5196e75002f1661da6b77e360f8 -Author: Juan Orti Alcaine -Date: Mon May 12 09:59:27 2014 +0200 +commit f7532ce0714440ed6649a7794eb97c9f6191789e +Author: Juan Orti Alcaine +Date: Mon Oct 20 10:15:29 2014 +0200 - amavisd-conf.patch + amavisd-new-2.10.0-conf.patch diff --git a/amavisd-agent b/amavisd-agent index 1ebe2bb..b8271a3 100755 @@ -31,7 +31,7 @@ index 80b84dc..164549f 100755 my($repeatcount); # -c, repeat count (when defined) diff --git a/amavisd.conf b/amavisd.conf -index a09597f..25db750 100644 +index d023e10..eecd17d 100644 --- a/amavisd.conf +++ b/amavisd.conf @@ -14,25 +14,25 @@ use strict; @@ -98,7 +98,7 @@ index a09597f..25db750 100644 # $bad_header_quarantine_method = undef; # $os_fingerprint_method = 'p0f:*:2345'; # to query p0f-analyzer.pl -@@ -338,9 +338,9 @@ $banned_filename_re = new_RE( +@@ -339,9 +339,9 @@ $banned_filename_re = new_RE( ['arj', \&do_unarj, ['unarj', 'arj'] ], ['arc', \&do_arc, ['nomarch', 'arc'] ], ['zoo', \&do_zoo, ['zoo', 'unzoo'] ], @@ -110,7 +110,7 @@ index a09597f..25db750 100644 ['tnef', \&do_tnef], # ['lha', \&do_lha, 'lha'], # not safe, use 7z instead # ['sit', \&do_unstuff, 'unstuff'], # not safe -@@ -378,16 +378,16 @@ $banned_filename_re = new_RE( +@@ -379,16 +379,16 @@ $banned_filename_re = new_RE( # qr/^(?:310|420)[,\s]*(?:.* <<< )?(.+?)(?: ; |$)/m ], # settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1 diff --git a/amavisd-new.spec b/amavisd-new.spec index 44d996a..e559eaf 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,9 +1,9 @@ -#%%define prerelease rc2 +%global prerelease rc2 Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new -Version: 2.9.1 -Release: 3%{?prerelease:.%{prerelease}}%{?dist} +Version: 2.10.0 +Release: 0.1%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -19,7 +19,7 @@ Source11: amavisd-clean-tmp.service Source12: amavisd-clean-tmp.timer Source13: amavisd-clean-quarantine.service Source14: amavisd-clean-quarantine.timer -Patch0: amavisd-new-2.9.0-conf.patch +Patch0: amavisd-new-2.10.0-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch # Don't source /etc/sysconfig/network in init script; the network check @@ -27,9 +27,6 @@ Patch2: amavisd-condrestart.patch # and it can't be relied upon to exist in recent Fedora builds. Mail # sent upstream to amavis-users ML 2013-05-10. -adamw Patch3: amavisd-new-2.8.0-init_network.patch -# Fix bug #1121552 -# http://lists.amavis.org/pipermail/amavis-users/2014-June/002957.html -Patch4: amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: systemd @@ -130,7 +127,6 @@ alerting purposes. %patch1 -p1 %patch2 -p0 %patch3 -p1 -%patch4 -p1 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/spool/amavisd/amavisd.sock,' -i amavisd-release @@ -235,6 +231,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Mon Oct 20 2014 Juan Orti Alcaine 2.10.0-0.1.rc2 +- Update to 2.10.0-rc2 + * Wed Aug 20 2014 Juan Orti Alcaine 2.9.1-3 - Add ExecReload and Wants=postfix.service to systemd unit diff --git a/sources b/sources index d81113a..77899e4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2b83d60b49855943c297743db0029218 amavisd-new-2.9.1.tar.xz +f43dbf102e3f028e43b6d2b7d2f5cc03 amavisd-new-2.10.0-rc2.tar.xz From 2d3042c8b3fe436271673792c8ede865c871a702 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Thu, 23 Oct 2014 12:33:47 +0200 Subject: [PATCH 12/45] Update to 2.10.0 and several fixes - Update to 2.10.0 - Replace IO::Socket::INET6 with IO::Socket::IP - Review perl dependencies minimum version - Add subpackages amavisd-new-zeromq and amavisd-new-snmp-zeromq --- .gitignore | 1 + amavis-mc.service | 19 +++++++ amavisd-new.spec | 109 +++++++++++++++++++++++++++++++++++---- amavisd-snmp-zmq.service | 19 +++++++ sources | 2 +- 5 files changed, 138 insertions(+), 12 deletions(-) create mode 100644 amavis-mc.service create mode 100644 amavisd-snmp-zmq.service diff --git a/.gitignore b/.gitignore index 6ebf46e..32bff5c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ amavisd-new-2.8.0.tar.gz /amavisd-new-2.9.0.tar.xz /amavisd-new-2.9.1.tar.xz /amavisd-new-2.10.0-rc2.tar.xz +/amavisd-new-2.10.0.tar.xz diff --git a/amavis-mc.service b/amavis-mc.service new file mode 100644 index 0000000..4dcdc1d --- /dev/null +++ b/amavis-mc.service @@ -0,0 +1,19 @@ +[Unit] +Description=Amavisd-new master supervisor process for communicating through 0MQ sockets +Documentation=http://www.ijs.si/software/amavisd/#doc +After=network.target +Before=amavisd.service + +[Service] +Type=forking +User=amavis +Group=amavis +PIDFile=/var/run/amavisd/amavis-mc.pid +ExecStart=/usr/sbin/amavis-mc -P /var/run/amavisd/amavis-mc.pid +Restart=on-failure +PrivateTmp=true +PrivateDevices=true +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target diff --git a/amavisd-new.spec b/amavisd-new.spec index e559eaf..d3ea75b 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,9 +1,9 @@ -%global prerelease rc2 +#%%global prerelease rc2 Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.10.0 -Release: 0.1%{?prerelease:.%{prerelease}}%{?dist} +Release: 1%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -19,6 +19,8 @@ Source11: amavisd-clean-tmp.service Source12: amavisd-clean-tmp.timer Source13: amavisd-clean-quarantine.service Source14: amavisd-clean-quarantine.timer +Source15: amavis-mc.service +Source16: amavisd-snmp-zmq.service Patch0: amavisd-new-2.10.0-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch @@ -51,19 +53,23 @@ Requires: unzoo # We probably should parse the fetch_modules() code in amavisd for this list. # These are just the dependencies that don't get picked up otherwise. Requires: perl(Archive::Tar) -Requires: perl(Archive::Zip) +Requires: perl(Archive::Zip) >= 1.14 Requires: perl(Authen::SASL) Requires: perl(Compress::Zlib) >= 1.35 +Requires: perl(Compress::Raw::Zlib) >= 2.017 Requires: perl(Convert::TNEF) Requires: perl(Convert::UUlib) Requires: perl(Crypt::OpenSSL::RSA) Requires: perl(DBD::SQLite) Requires: perl(DBI) +Requires: perl(Digest::MD5) >= 2.22 Requires: perl(Digest::SHA) Requires: perl(Digest::SHA1) -Requires: perl(IO::Socket::INET6) +Requires: perl(File::LibMagic) +Requires: perl(IO::Socket::IP) Requires: perl(IO::Socket::SSL) Requires: perl(IO::Stringy) +Requires: perl(MIME::Base64) Requires: perl(MIME::Body) Requires: perl(MIME::Decoder::Base64) Requires: perl(MIME::Decoder::Binary) @@ -72,19 +78,22 @@ Requires: perl(MIME::Decoder::NBit) Requires: perl(MIME::Decoder::QuotedPrint) Requires: perl(MIME::Decoder::UU) Requires: perl(MIME::Head) -Requires: perl(Mail::DKIM) +Requires: perl(MIME::Parser) +Requires: perl(Mail::DKIM) >= 0.31 Requires: perl(Mail::Field) Requires: perl(Mail::Header) -Requires: perl(Mail::Internet) +Requires: perl(Mail::Internet) >= 1.58 Requires: perl(Mail::SPF) Requires: perl(Mail::SpamAssassin) Requires: perl(Net::DNS) Requires: perl(Net::LDAP) +Requires: perl(Net::LibIDN) Requires: perl(Net::SSLeay) -Requires: perl(Net::Server) +Requires: perl(Net::Server) >= 2.0 Requires: perl(NetAddr::IP) Requires: perl(Razor2::Client::Version) Requires: perl(Socket6) +Requires: perl(Time::HiRes) >= 1.49 Requires: perl(Unix::Syslog) Requires: perl(URI) Requires(pre): shadow-utils @@ -101,6 +110,25 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd +%package zeromq +Group: Applications/System +Summary: Support for communicating through 0MQ sockets +Requires: %{name} = %{version}-%{release} +Requires: perl(ZMQ::Constants) +Requires: perl(ZMQ::LibZMQ3) +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%package snmp-zeromq +Group: Applications/System +Summary: Exports amavisd SNMP data and communicates through 0MQ sockets +Requires: %{name}-zeromq = %{version}-%{release} +Requires: perl(NetSNMP::OID) +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + %description amavisd-new is a high-performance and reliable interface between mailer (MTA) and one or more content checkers: virus scanners, and/or @@ -121,6 +149,22 @@ exports data to a SNMP server running on a host (same or remote), making them available to SNMP clients (such a Cacti or mrtg) for monitoring or alerting purposes. +%description zeromq +This package adds support for monitoring and communicating with amavisd +and auxiliary services among themselves through 0MQ sockets (also called ZMQ +or ZeroMQ, or Crossroads I/O or XS). This method offers similar features +as current services amavisd-nanny, amavisd-agent and amavisd-snmp-subagent, +but use message passing paradigm instead of communicating through a shared +Berkeley database. This avoids locking contention, so the gain can be +significant for a busy amavisd setup with lots of child processes. + +%description snmp-zeromq +This package contains the program amavisd-snmp-subagent-zmq, which can be +used as a SNMP AgentX, exporting amavisd statistical counters database +(snmp.db) as well as a child process status database (nanny.db) to a +SNMP daemon supporting the AgentX protocol (RFC 2741), such as NET-SNMP. +It supports communicating through 0MQ sockets. + %prep %setup -q -n %{name}-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 @@ -138,9 +182,12 @@ rm -rf $RPM_BUILD_ROOT install -D -p -m 755 amavisd $RPM_BUILD_ROOT%{_sbindir}/amavisd install -D -p -m 755 amavisd-snmp-subagent $RPM_BUILD_ROOT%{_sbindir}/amavisd-snmp-subagent +install -D -p -m 755 amavisd-snmp-subagent-zmq $RPM_BUILD_ROOT%{_sbindir}/amavisd-snmp-subagent-zmq mkdir -p $RPM_BUILD_ROOT%{_bindir} -install -p -m 755 amavisd-{agent,nanny,release} $RPM_BUILD_ROOT%{_bindir}/ +install -p -m 755 amavisd-{agent,nanny,release,signer,status,submit} $RPM_BUILD_ROOT%{_bindir}/ +install -p -m 755 amavis-mc $RPM_BUILD_ROOT%{_sbindir}/ +install -p -m 755 amavis-services $RPM_BUILD_ROOT%{_bindir}/ install -D -p -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_unitdir}/amavisd.service install -D -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}/amavisd-snmp.service @@ -148,6 +195,8 @@ install -D -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-tmp.se install -D -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-tmp.timer install -D -p -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-quarantine.service install -D -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-quarantine.timer +install -D -p -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_unitdir}/amavis-mc.service +install -D -p -m 644 %{SOURCE16} $RPM_BUILD_ROOT%{_unitdir}/amavisd-snmp-zmq.service install -D -p -m 644 amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavisd/amavisd.conf install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.conf @@ -177,6 +226,12 @@ exit 0 %preun snmp %systemd_preun amavisd-snmp.service +%preun zeromq +%systemd_preun amavis-mc.service + +%preun snmp-zeromq +%systemd_preun amavisd-snmp-zmq.service + %post %systemd_post amavisd.service %systemd_post amavisd-clean-tmp.service @@ -192,6 +247,12 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %post snmp %systemd_post amavisd-snmp.service +%post zeromq +%systemd_post amavis-mc.service + +%post snmp-zeromq +%systemd_post amavisd-snmp-zmq.service + %postun %systemd_postun_with_restart amavisd.service %systemd_postun_with_restart amavisd-clean-tmp.service @@ -202,10 +263,16 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %postun snmp %systemd_postun_with_restart amavisd-snmp.service +%postun zeromq +%systemd_postun_with_restart amavis-mc.service + +%postun snmp-zeromq +%systemd_postun_with_restart amavisd-snmp-zmq.service + %files %defattr(-,root,root,-) -%doc AAAREADME.first LDAP.schema LDAP.ldif LICENSE RELEASE_NOTES -%doc README_FILES test-messages amavisd.conf-* +%doc AAAREADME.first LDAP.schema LDAP.ldif LICENSE RELEASE_NOTES TODO INSTALL +%doc README_FILES test-messages amavisd.conf-* amavisd-custom.conf %dir %{_sysconfdir}/amavisd/ %{_unitdir}/amavisd.service %{_unitdir}/amavisd-clean-tmp.service @@ -215,7 +282,11 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/amavisd/amavisd.conf %config(noreplace) %{_sysconfdir}/clamd.d/amavisd.conf %{_sbindir}/amavisd -%{_bindir}/amavisd-* +%{_bindir}/amavisd-agent +%{_bindir}/amavisd-nanny +%{_bindir}/amavisd-release +%{_bindir}/amavisd-signer +%{_bindir}/amavisd-submit %dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd %dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/tmp %dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/db @@ -230,7 +301,23 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_unitdir}/amavisd-snmp.service %{_sbindir}/amavisd-snmp-subagent +%files zeromq +%{_unitdir}/amavis-mc.service +%{_sbindir}/amavis-mc +%{_bindir}/amavisd-status +%{_bindir}/amavis-services + +%files snmp-zeromq +%{_unitdir}/amavisd-snmp-zmq.service +%{_sbindir}/amavisd-snmp-subagent-zmq + %changelog +* Thu Oct 23 2014 Juan Orti Alcaine 2.10.0-1 +- Update to 2.10.0 +- Replace IO::Socket::INET6 with IO::Socket::IP +- Review perl dependencies minimum version +- Add subpackages amavisd-new-zeromq and amavisd-new-snmp-zeromq + * Mon Oct 20 2014 Juan Orti Alcaine 2.10.0-0.1.rc2 - Update to 2.10.0-rc2 diff --git a/amavisd-snmp-zmq.service b/amavisd-snmp-zmq.service new file mode 100644 index 0000000..d3faae3 --- /dev/null +++ b/amavisd-snmp-zmq.service @@ -0,0 +1,19 @@ +[Unit] +Description=Exports amavisd SNMP data and communicates through 0MQ sockets +After=network.target +After=amavis-mc.service +After=amavisd.service + +[Service] +Type=forking +User=amavis +Group=amavis +PIDFile=/var/run/amavisd/amavisd-snmp-subagent-zmq.pid +ExecStart=/usr/sbin/amavisd-snmp-subagent-zmq -P /var/run/amavisd/amavisd-snmp-subagent-zmq.pid +Restart=on-failure +PrivateTmp=true +PrivateDevices=true +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target diff --git a/sources b/sources index 77899e4..bfb0a64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f43dbf102e3f028e43b6d2b7d2f5cc03 amavisd-new-2.10.0-rc2.tar.xz +a343a5201663b26519f3db53b6d8be3c amavisd-new-2.10.0.tar.xz From 10b6fdb4006a9c8a2434b8d627664807649daf5e Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Sat, 25 Oct 2014 23:08:35 +0200 Subject: [PATCH 13/45] Fix imports when SQL is used and improve conf patch --- amavisd-new-2.10.0-conf.patch | 44 ++++++++++++++++++- ....0-missing_import_when_sql_is_in_use.patch | 14 ++++++ amavisd-new.spec | 9 +++- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch diff --git a/amavisd-new-2.10.0-conf.patch b/amavisd-new-2.10.0-conf.patch index fc4d197..a98823e 100644 --- a/amavisd-new-2.10.0-conf.patch +++ b/amavisd-new-2.10.0-conf.patch @@ -1,6 +1,46 @@ -commit f7532ce0714440ed6649a7794eb97c9f6191789e +commit 45e7e93efb71dfe3d1f1ca93636c592e17689b09 Author: Juan Orti Alcaine -Date: Mon Oct 20 10:15:29 2014 +0200 +Date: Sat Oct 25 22:48:40 2014 +0200 + + Fix running user in amavis-mc and amavisd-signer + +diff --git a/amavis-mc b/amavis-mc +index 88d9701..f6f8081 100755 +--- a/amavis-mc ++++ b/amavis-mc +@@ -70,10 +70,10 @@ use vars qw(@path @services $daemon_user $daemon_group $pid_file $log_level + + ### USER CONFIGURABLE: + +-$daemon_user = 'vscan'; +-$daemon_group = 'vscan'; ++$daemon_user = 'amavis'; ++$daemon_group = 'amavis'; + +-$pid_file = '/var/amavis/amavis-mc.pid'; ++$pid_file = '/var/run/amavisd/amavis-mc.pid'; + + $log_level = 0; + $syslog_ident = 'amavis-mc'; +diff --git a/amavisd-signer b/amavisd-signer +index f154646..3042b7c 100755 +--- a/amavisd-signer ++++ b/amavisd-signer +@@ -86,8 +86,8 @@ $VERSION = 1.001; # 20100730 + # Please adjust the following settings as necessary: + # + +-$daemon_user = 'vscan'; +-$daemon_group = 'vscan'; ++$daemon_user = 'amavis'; ++$daemon_group = 'amavis'; + # $daemon_chroot_dir = '/var/amavis'; # chroot directory or undef + + # $daemonize = 1; + +commit 587b25f96031ab8ef4d8eab78065c2fa2a469df9 +Author: Juan Orti Alcaine +Date: Sat Oct 25 22:44:00 2014 +0200 amavisd-new-2.10.0-conf.patch diff --git a/amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch b/amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch new file mode 100644 index 0000000..009f123 --- /dev/null +++ b/amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch @@ -0,0 +1,14 @@ +diff --git a/amavisd b/amavisd +index 278f0dd..97e3204 100755 +--- a/amavisd ++++ b/amavisd +@@ -26474,7 +26474,8 @@ BEGIN { + import Amavis::rfc2821_2822_Tools; + import Amavis::Util qw(ll do_log do_log_safe min max minmax add_entropy + untaint untaint_inplace format_time_interval +- truncate_utf_8 orcpt_encode idn_to_ascii ++ truncate_utf_8 orcpt_encode ++ idn_to_utf8 idn_to_ascii mail_addr_idn_to_ascii + safe_encode safe_encode_utf8 safe_decode_mime + snmp_count ccat_split ccat_maj); + import Amavis::Lookup qw(lookup lookup2); diff --git a/amavisd-new.spec b/amavisd-new.spec index d3ea75b..b81d8b1 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.10.0 -Release: 1%{?prerelease:.%{prerelease}}%{?dist} +Release: 2%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -29,6 +29,8 @@ Patch2: amavisd-condrestart.patch # and it can't be relied upon to exist in recent Fedora builds. Mail # sent upstream to amavis-users ML 2013-05-10. -adamw Patch3: amavisd-new-2.8.0-init_network.patch +# Patch5: http://lists.amavis.org/pipermail/amavis-users/2014-October/003259.html +Patch5: amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: systemd @@ -171,6 +173,7 @@ It supports communicating through 0MQ sockets. %patch1 -p1 %patch2 -p0 %patch3 -p1 +%patch5 -p1 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/spool/amavisd/amavisd.sock,' -i amavisd-release @@ -312,6 +315,10 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Sat Oct 25 2014 Juan Orti Alcaine 2.10.0-2 +- Improve conf patch to fix amavis-mc daemon +- Add patch to fix imports when SQL is used + * Thu Oct 23 2014 Juan Orti Alcaine 2.10.0-1 - Update to 2.10.0 - Replace IO::Socket::INET6 with IO::Socket::IP From 4dbc21cc696663c77f51f77fe03de1bc344e44c2 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Mon, 27 Oct 2014 11:08:16 +0100 Subject: [PATCH 14/45] Update to 2.10.1 --- .gitignore | 1 + ...-2.10.0-missing_import_when_sql_is_in_use.patch | 14 -------------- amavisd-new.spec | 11 ++++++----- sources | 2 +- 4 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch diff --git a/.gitignore b/.gitignore index 32bff5c..90cd2fb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ amavisd-new-2.8.0.tar.gz /amavisd-new-2.9.1.tar.xz /amavisd-new-2.10.0-rc2.tar.xz /amavisd-new-2.10.0.tar.xz +/amavisd-new-2.10.1.tar.xz diff --git a/amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch b/amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch deleted file mode 100644 index 009f123..0000000 --- a/amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/amavisd b/amavisd -index 278f0dd..97e3204 100755 ---- a/amavisd -+++ b/amavisd -@@ -26474,7 +26474,8 @@ BEGIN { - import Amavis::rfc2821_2822_Tools; - import Amavis::Util qw(ll do_log do_log_safe min max minmax add_entropy - untaint untaint_inplace format_time_interval -- truncate_utf_8 orcpt_encode idn_to_ascii -+ truncate_utf_8 orcpt_encode -+ idn_to_utf8 idn_to_ascii mail_addr_idn_to_ascii - safe_encode safe_encode_utf8 safe_decode_mime - snmp_count ccat_split ccat_maj); - import Amavis::Lookup qw(lookup lookup2); diff --git a/amavisd-new.spec b/amavisd-new.spec index b81d8b1..c847021 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -2,8 +2,8 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new -Version: 2.10.0 -Release: 2%{?prerelease:.%{prerelease}}%{?dist} +Version: 2.10.1 +Release: 1%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -29,8 +29,6 @@ Patch2: amavisd-condrestart.patch # and it can't be relied upon to exist in recent Fedora builds. Mail # sent upstream to amavis-users ML 2013-05-10. -adamw Patch3: amavisd-new-2.8.0-init_network.patch -# Patch5: http://lists.amavis.org/pipermail/amavis-users/2014-October/003259.html -Patch5: amavisd-new-2.10.0-missing_import_when_sql_is_in_use.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: systemd @@ -173,7 +171,6 @@ It supports communicating through 0MQ sockets. %patch1 -p1 %patch2 -p0 %patch3 -p1 -%patch5 -p1 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/spool/amavisd/amavisd.sock,' -i amavisd-release @@ -315,6 +312,10 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Mon Oct 27 2014 Juan Orti Alcaine 2.10.1-1 +- Update to 2.10.1 +- Patch5 merged upstream + * Sat Oct 25 2014 Juan Orti Alcaine 2.10.0-2 - Improve conf patch to fix amavis-mc daemon - Add patch to fix imports when SQL is used diff --git a/sources b/sources index bfb0a64..434a13e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a343a5201663b26519f3db53b6d8be3c amavisd-new-2.10.0.tar.xz +adb0c64ac6a91249ddeb4ed97747d755 amavisd-new-2.10.1.tar.xz From feca78178de73b7b2fa33d2fca905faf5973a2d3 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Thu, 26 Feb 2015 12:57:09 +0100 Subject: [PATCH 15/45] Replaced requirement to cpio by pax (upstream recommendation) Amavisd-New reports otherwise: WARN: Using cpio instead of pax can be a security risk; please add: $pax='pax'; to amavisd.conf and check that the pax(1) utility is available on the system! --- amavisd-new.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index c847021..5013f94 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.10.1 -Release: 1%{?prerelease:.%{prerelease}}%{?dist} +Release: 2%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -40,7 +40,7 @@ Requires: altermime Requires: arj Requires: bzip2 Requires: cabextract -Requires: cpio +Requires: pax Requires: file Requires: freeze Requires: gzip @@ -312,6 +312,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Thu Feb 26 2015 Robert Scheck 2.10.1-1 +- Replaced requirement to cpio by pax (upstream recommendation) + * Mon Oct 27 2014 Juan Orti Alcaine 2.10.1-1 - Update to 2.10.1 - Patch5 merged upstream From 9b6eff661d7755f57327d3875115c7a6697a34e9 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Thu, 9 Apr 2015 20:18:49 +0200 Subject: [PATCH 16/45] Use license macro --- amavisd-new.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 5013f94..c17f90a 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.10.1 -Release: 2%{?prerelease:.%{prerelease}}%{?dist} +Release: 3%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -271,8 +271,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %files %defattr(-,root,root,-) -%doc AAAREADME.first LDAP.schema LDAP.ldif LICENSE RELEASE_NOTES TODO INSTALL +%doc AAAREADME.first LDAP.schema LDAP.ldif RELEASE_NOTES TODO INSTALL %doc README_FILES test-messages amavisd.conf-* amavisd-custom.conf +%license LICENSE %dir %{_sysconfdir}/amavisd/ %{_unitdir}/amavisd.service %{_unitdir}/amavisd-clean-tmp.service @@ -312,7 +313,10 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog -* Thu Feb 26 2015 Robert Scheck 2.10.1-1 +* Thu Apr 09 2015 Juan Orti Alcaine 2.10.1-3 +- Use license macro + +* Thu Feb 26 2015 Robert Scheck 2.10.1-2 - Replaced requirement to cpio by pax (upstream recommendation) * Mon Oct 27 2014 Juan Orti Alcaine 2.10.1-1 From 8708bcdb5e69d5b872fd4fca0e7497d93d8fa6c8 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Mon, 27 Apr 2015 12:49:31 +0200 Subject: [PATCH 17/45] Move amavisd socket to /var/run/amavisd --- ...onf.patch => amavisd-new-2.10.1-conf.patch | 54 ++++++++++--------- amavisd-new.spec | 7 ++- 2 files changed, 33 insertions(+), 28 deletions(-) rename amavisd-new-2.10.0-conf.patch => amavisd-new-2.10.1-conf.patch (91%) diff --git a/amavisd-new-2.10.0-conf.patch b/amavisd-new-2.10.1-conf.patch similarity index 91% rename from amavisd-new-2.10.0-conf.patch rename to amavisd-new-2.10.1-conf.patch index a98823e..54eb252 100644 --- a/amavisd-new-2.10.0-conf.patch +++ b/amavisd-new-2.10.1-conf.patch @@ -1,8 +1,8 @@ -commit 45e7e93efb71dfe3d1f1ca93636c592e17689b09 +commit f866c3623452349bfb6e7c505e44b4ed0f444c54 Author: Juan Orti Alcaine -Date: Sat Oct 25 22:48:40 2014 +0200 +Date: Mon Apr 27 12:37:24 2015 +0200 - Fix running user in amavis-mc and amavisd-signer + amavisd-new-2.10.1-conf.patch diff --git a/amavis-mc b/amavis-mc index 88d9701..f6f8081 100755 @@ -22,28 +22,6 @@ index 88d9701..f6f8081 100755 $log_level = 0; $syslog_ident = 'amavis-mc'; -diff --git a/amavisd-signer b/amavisd-signer -index f154646..3042b7c 100755 ---- a/amavisd-signer -+++ b/amavisd-signer -@@ -86,8 +86,8 @@ $VERSION = 1.001; # 20100730 - # Please adjust the following settings as necessary: - # - --$daemon_user = 'vscan'; --$daemon_group = 'vscan'; -+$daemon_user = 'amavis'; -+$daemon_group = 'amavis'; - # $daemon_chroot_dir = '/var/amavis'; # chroot directory or undef - - # $daemonize = 1; - -commit 587b25f96031ab8ef4d8eab78065c2fa2a469df9 -Author: Juan Orti Alcaine -Date: Sat Oct 25 22:44:00 2014 +0200 - - amavisd-new-2.10.0-conf.patch - diff --git a/amavisd-agent b/amavisd-agent index 1ebe2bb..b8271a3 100755 --- a/amavisd-agent @@ -70,8 +48,23 @@ index 80b84dc..164549f 100755 my($wakeuptime) = 2; # -w, sleep time in seconds, may be fractional my($repeatcount); # -c, repeat count (when defined) +diff --git a/amavisd-signer b/amavisd-signer +index f154646..3042b7c 100755 +--- a/amavisd-signer ++++ b/amavisd-signer +@@ -86,8 +86,8 @@ $VERSION = 1.001; # 20100730 + # Please adjust the following settings as necessary: + # + +-$daemon_user = 'vscan'; +-$daemon_group = 'vscan'; ++$daemon_user = 'amavis'; ++$daemon_group = 'amavis'; + # $daemon_chroot_dir = '/var/amavis'; # chroot directory or undef + + # $daemonize = 1; diff --git a/amavisd.conf b/amavisd.conf -index d023e10..eecd17d 100644 +index d023e10..2ce88ff 100644 --- a/amavisd.conf +++ b/amavisd.conf @@ -14,25 +14,25 @@ use strict; @@ -107,6 +100,15 @@ index d023e10..eecd17d 100644 #NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually $log_level = 0; # verbosity 0..5, -d +@@ -52,7 +52,7 @@ $enable_dkim_signing = 1; # load DKIM signing code, keys defined by dkim_key + @mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10 + 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 ); + +-$unix_socketname = "$MYHOME/amavisd.sock"; # amavisd-release or amavis-milter ++$unix_socketname = "/var/run/amavisd/amavisd.sock"; # amavisd-release or amavis-milter + # option(s) -p overrides $inet_socket_port and $unix_socketname + + $inet_socket_port = 10024; # listen on this local TCP port(s) @@ -116,11 +116,11 @@ $sa_local_tests_only = 0; # only tests which do not require internet access? # $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP; # defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16) diff --git a/amavisd-new.spec b/amavisd-new.spec index c17f90a..c33bb34 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.10.1 -Release: 3%{?prerelease:.%{prerelease}}%{?dist} +Release: 4%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -21,7 +21,7 @@ Source13: amavisd-clean-quarantine.service Source14: amavisd-clean-quarantine.timer Source15: amavis-mc.service Source16: amavisd-snmp-zmq.service -Patch0: amavisd-new-2.10.0-conf.patch +Patch0: amavisd-new-2.10.1-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch # Don't source /etc/sysconfig/network in init script; the network check @@ -313,6 +313,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Mon Apr 27 2015 Juan Orti Alcaine 2.10.1-4 +- Move amavisd socket to /var/run/amavisd + * Thu Apr 09 2015 Juan Orti Alcaine 2.10.1-3 - Use license macro From d1307c05c4ad1f3fb9158ed7e2da06bf3c1a6d3a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 16 Jun 2015 23:50:47 +0000 Subject: [PATCH 18/45] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- amavisd-new.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index c33bb34..79b1ef0 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.10.1 -Release: 4%{?prerelease:.%{prerelease}}%{?dist} +Release: 5%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -313,6 +313,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Tue Jun 16 2015 Fedora Release Engineering - 2.10.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Apr 27 2015 Juan Orti Alcaine 2.10.1-4 - Move amavisd socket to /var/run/amavisd From 7810b92cd5bb2442e89364459b619fc8a0ba5b00 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Mon, 23 Nov 2015 16:42:49 +0100 Subject: [PATCH 19/45] Make clamav a weak dependency and co-own /etc/clamd.d --- amavisd-new.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 79b1ef0..1078c4c 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.10.1 -Release: 5%{?prerelease:.%{prerelease}}%{?dist} +Release: 6%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -32,8 +32,7 @@ Patch3: amavisd-new-2.8.0-init_network.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: systemd -Requires: clamav-server -Requires: clamav-server-systemd +Recommends: clamav-server-systemd Requires: tmpwatch Requires: binutils Requires: altermime @@ -198,6 +197,7 @@ install -D -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-quaran install -D -p -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_unitdir}/amavis-mc.service install -D -p -m 644 %{SOURCE16} $RPM_BUILD_ROOT%{_unitdir}/amavisd-snmp-zmq.service +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d install -D -p -m 644 amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavisd/amavisd.conf install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.conf @@ -280,6 +280,7 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_unitdir}/amavisd-clean-tmp.timer %{_unitdir}/amavisd-clean-quarantine.service %{_unitdir}/amavisd-clean-quarantine.timer +%dir %{_sysconfdir}/clamd.d %config(noreplace) %{_sysconfdir}/amavisd/amavisd.conf %config(noreplace) %{_sysconfdir}/clamd.d/amavisd.conf %{_sbindir}/amavisd @@ -313,6 +314,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Mon Nov 23 2015 Juan Orti Alcaine 2.10.1-6 +- Make clamav a weak dependency and co-own /etc/clamd.d (RHBZ#1265922) + * Tue Jun 16 2015 Fedora Release Engineering - 2.10.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From f67ebb4923cfe150d6e058b25262642134ff40c4 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Tue, 26 Jan 2016 13:08:27 +0100 Subject: [PATCH 20/45] Remove %defattr --- amavisd-new.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 1078c4c..5275bb3 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -270,7 +270,6 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %systemd_postun_with_restart amavisd-snmp-zmq.service %files -%defattr(-,root,root,-) %doc AAAREADME.first LDAP.schema LDAP.ldif RELEASE_NOTES TODO INSTALL %doc README_FILES test-messages amavisd.conf-* amavisd-custom.conf %license LICENSE @@ -298,7 +297,6 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %dir %attr(770,amavis,clamupdate) %{_localstatedir}/run/clamd.amavisd %files snmp -%defattr(-,root,root,-) %doc AMAVIS-MIB.txt %{_unitdir}/amavisd-snmp.service %{_sbindir}/amavisd-snmp-subagent From 2e4d4d23eedc472a99f041da71bcf5738afecd89 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 3 Feb 2016 16:08:46 +0000 Subject: [PATCH 21/45] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- amavisd-new.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 5275bb3..c62cb40 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.10.1 -Release: 6%{?prerelease:.%{prerelease}}%{?dist} +Release: 7%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -312,6 +312,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Wed Feb 03 2016 Fedora Release Engineering - 2.10.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Mon Nov 23 2015 Juan Orti Alcaine 2.10.1-6 - Make clamav a weak dependency and co-own /etc/clamd.d (RHBZ#1265922) From 2b823c86aef0707e63869d3b8284b6f49e3970c8 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Wed, 27 Apr 2016 12:28:44 +0200 Subject: [PATCH 22/45] Version 2.11.0 (RHBZ#1330781) --- .gitignore | 1 + amavisd-new.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 90cd2fb..719bd90 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ amavisd-new-2.8.0.tar.gz /amavisd-new-2.10.0-rc2.tar.xz /amavisd-new-2.10.0.tar.xz /amavisd-new-2.10.1.tar.xz +/amavisd-new-2.11.0.tar.xz diff --git a/amavisd-new.spec b/amavisd-new.spec index c62cb40..2b30c8c 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -2,8 +2,8 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new -Version: 2.10.1 -Release: 7%{?prerelease:.%{prerelease}}%{?dist} +Version: 2.11.0 +Release: 1%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -312,6 +312,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Wed Apr 27 2016 Juan Orti Alcaine 2.11.0-1 +- Version 2.11.0 (RHBZ#1330781) + * Wed Feb 03 2016 Fedora Release Engineering - 2.10.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 434a13e..4dc5ca2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -adb0c64ac6a91249ddeb4ed97747d755 amavisd-new-2.10.1.tar.xz +4642d63c5d3f0daafbcacb9bb553e6f3 amavisd-new-2.11.0.tar.xz From 166a1a2f80e4470794ffd986527aa4273967f3f9 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Mon, 20 Jun 2016 21:33:25 +0200 Subject: [PATCH 23/45] Remove NoNewPrivileges from service unit (RHBZ#1346766) --- amavisd-new.spec | 5 ++++- amavisd.service | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 2b30c8c..a265df0 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 1%{?prerelease:.%{prerelease}}%{?dist} +Release: 2%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -312,6 +312,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Mon Jun 20 2016 Juan Orti Alcaine 2.11.0-2 +- Remove NoNewPrivileges from service unit (RHBZ#1346766) + * Wed Apr 27 2016 Juan Orti Alcaine 2.11.0-1 - Version 2.11.0 (RHBZ#1330781) diff --git a/amavisd.service b/amavisd.service index b7d15bd..a8735f9 100644 --- a/amavisd.service +++ b/amavisd.service @@ -15,7 +15,6 @@ ExecReload=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf reload Restart=on-failure PrivateTmp=true PrivateDevices=true -NoNewPrivileges=true [Install] WantedBy=multi-user.target From 134d56bda25853ef1689b8608715c595237fe377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 24 Jun 2016 10:48:20 +0200 Subject: [PATCH 24/45] Mandatory Perl build-requires added --- amavisd-new.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/amavisd-new.spec b/amavisd-new.spec index a265df0..773db38 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -31,6 +31,7 @@ Patch2: amavisd-condrestart.patch Patch3: amavisd-new-2.8.0-init_network.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch +BuildRequires: perl-generators BuildRequires: systemd Recommends: clamav-server-systemd Requires: tmpwatch From 6d3d0c2d8bb7d82f8e01e945180e45f0f68fef75 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Thu, 30 Jun 2016 09:03:24 +0200 Subject: [PATCH 25/45] Additional systemd hardening (RHBZ#1351354) --- amavis-mc.service | 4 +++- amavisd-clean-quarantine.service | 4 +++- amavisd-clean-tmp.service | 4 +++- amavisd-new.spec | 5 ++++- amavisd-snmp-zmq.service | 4 +++- amavisd-snmp.service | 4 +++- amavisd.service | 3 +++ 7 files changed, 22 insertions(+), 6 deletions(-) diff --git a/amavis-mc.service b/amavis-mc.service index 4dcdc1d..04241b9 100644 --- a/amavis-mc.service +++ b/amavis-mc.service @@ -13,7 +13,9 @@ ExecStart=/usr/sbin/amavis-mc -P /var/run/amavisd/amavis-mc.pid Restart=on-failure PrivateTmp=true PrivateDevices=true -NoNewPrivileges=true +CapabilityBoundingSet= +ProtectSystem=full +ProtectHome=true [Install] WantedBy=multi-user.target diff --git a/amavisd-clean-quarantine.service b/amavisd-clean-quarantine.service index 2bb8b3f..10bb01e 100644 --- a/amavisd-clean-quarantine.service +++ b/amavisd-clean-quarantine.service @@ -8,5 +8,7 @@ Group=amavis PrivateTmp=true PrivateDevices=true PrivateNetwork=true -NoNewPrivileges=true +CapabilityBoundingSet= +ProtectSystem=full +ProtectHome=true ExecStart=/usr/sbin/tmpwatch -d 720 /var/spool/amavisd/quarantine diff --git a/amavisd-clean-tmp.service b/amavisd-clean-tmp.service index 70fcffc..9a64b0d 100644 --- a/amavisd-clean-tmp.service +++ b/amavisd-clean-tmp.service @@ -8,5 +8,7 @@ Group=amavis PrivateTmp=true PrivateDevices=true PrivateNetwork=true -NoNewPrivileges=true +CapabilityBoundingSet= +ProtectSystem=full +ProtectHome=true ExecStart=/usr/sbin/tmpwatch 24 /var/spool/amavisd/tmp diff --git a/amavisd-new.spec b/amavisd-new.spec index 773db38..0207fe9 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 2%{?prerelease:.%{prerelease}}%{?dist} +Release: 3%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -313,6 +313,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Thu Jun 30 2016 Juan Orti Alcaine 2.11.0-3 +- Additional systemd hardening (RHBZ#1351354) + * Mon Jun 20 2016 Juan Orti Alcaine 2.11.0-2 - Remove NoNewPrivileges from service unit (RHBZ#1346766) diff --git a/amavisd-snmp-zmq.service b/amavisd-snmp-zmq.service index d3faae3..5093087 100644 --- a/amavisd-snmp-zmq.service +++ b/amavisd-snmp-zmq.service @@ -13,7 +13,9 @@ ExecStart=/usr/sbin/amavisd-snmp-subagent-zmq -P /var/run/amavisd/amavisd-snmp-s Restart=on-failure PrivateTmp=true PrivateDevices=true -NoNewPrivileges=true +CapabilityBoundingSet= +ProtectSystem=full +ProtectHome=true [Install] WantedBy=multi-user.target diff --git a/amavisd-snmp.service b/amavisd-snmp.service index 94b3537..b311ba6 100644 --- a/amavisd-snmp.service +++ b/amavisd-snmp.service @@ -11,7 +11,9 @@ ExecStart=/usr/sbin/amavisd-snmp-subagent -D /var/spool/amavisd/db -P /var/run/a Restart=on-failure PrivateTmp=true PrivateDevices=true -NoNewPrivileges=true +CapabilityBoundingSet= +ProtectSystem=full +ProtectHome=true [Install] WantedBy=multi-user.target diff --git a/amavisd.service b/amavisd.service index a8735f9..f39d860 100644 --- a/amavisd.service +++ b/amavisd.service @@ -15,6 +15,9 @@ ExecReload=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf reload Restart=on-failure PrivateTmp=true PrivateDevices=true +CapabilityBoundingSet= +ProtectSystem=full +ProtectHome=true [Install] WantedBy=multi-user.target From c0d08bde3a741174a51e9fe68a5a7636b2c3171f Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Thu, 18 Aug 2016 11:28:42 +0200 Subject: [PATCH 26/45] Add patch to fix detection of originating emails (RHBZ#1364730) --- ...-new-2.11.0-detect_originating_email.patch | 24 +++++++++++++++++++ amavisd-new.spec | 8 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 amavisd-new-2.11.0-detect_originating_email.patch diff --git a/amavisd-new-2.11.0-detect_originating_email.patch b/amavisd-new-2.11.0-detect_originating_email.patch new file mode 100644 index 0000000..80cf481 --- /dev/null +++ b/amavisd-new-2.11.0-detect_originating_email.patch @@ -0,0 +1,24 @@ +From giovanni at paclan.it Fri Jul 1 09:35:49 2016 +From: giovanni at paclan.it (Giovanni) +Date: Fri, 1 Jul 2016 07:35:49 +0000 (UTC) +Subject: dkim not working after upgrading to 2.11.0 +Message-ID: + +Hi, +after upgrading to 2.11.0, DKIM signing does not work anymore because +the email is no more detected as ORIGINATING. +This diff fixes the issue. + Cheers + Giovanni + + +--- amavisd.orig Tue Apr 26 21:24:33 2016 ++++ amavisd Fri Jul 1 01:03:15 2016 +@@ -34338,6 +34329,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/amavisd-new.spec b/amavisd-new.spec index 0207fe9..85e4435 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 3%{?prerelease:.%{prerelease}}%{?dist} +Release: 4%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -29,6 +29,8 @@ Patch2: amavisd-condrestart.patch # and it can't be relied upon to exist in recent Fedora builds. Mail # sent upstream to amavis-users ML 2013-05-10. -adamw Patch3: amavisd-new-2.8.0-init_network.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1364730 +Patch4: amavisd-new-2.11.0-detect_originating_email.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl-generators @@ -171,6 +173,7 @@ It supports communicating through 0MQ sockets. %patch1 -p1 %patch2 -p0 %patch3 -p1 +%patch4 -p0 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/spool/amavisd/amavisd.sock,' -i amavisd-release @@ -313,6 +316,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent-zmq %changelog +* Thu Aug 18 2016 Juan Orti Alcaine 2.11.0-4 +- Add patch to fix detection of originating emails (RHBZ#1364730) + * Thu Jun 30 2016 Juan Orti Alcaine 2.11.0-3 - Additional systemd hardening (RHBZ#1351354) From 0a962695bdc4db688a5e6ffa9dbbefc3b3cce3b8 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Wed, 30 Nov 2016 23:35:43 +0100 Subject: [PATCH 27/45] Drop subpackages which depend on the deprecated ZMQ::LibZMQ3 library (RHBZ#1394697) --- amavis-mc.service | 21 ---------- amavisd-new.spec | 87 +++++----------------------------------- amavisd-snmp-zmq.service | 21 ---------- 3 files changed, 9 insertions(+), 120 deletions(-) delete mode 100644 amavis-mc.service delete mode 100644 amavisd-snmp-zmq.service diff --git a/amavis-mc.service b/amavis-mc.service deleted file mode 100644 index 04241b9..0000000 --- a/amavis-mc.service +++ /dev/null @@ -1,21 +0,0 @@ -[Unit] -Description=Amavisd-new master supervisor process for communicating through 0MQ sockets -Documentation=http://www.ijs.si/software/amavisd/#doc -After=network.target -Before=amavisd.service - -[Service] -Type=forking -User=amavis -Group=amavis -PIDFile=/var/run/amavisd/amavis-mc.pid -ExecStart=/usr/sbin/amavis-mc -P /var/run/amavisd/amavis-mc.pid -Restart=on-failure -PrivateTmp=true -PrivateDevices=true -CapabilityBoundingSet= -ProtectSystem=full -ProtectHome=true - -[Install] -WantedBy=multi-user.target diff --git a/amavisd-new.spec b/amavisd-new.spec index 85e4435..7c6d81b 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 4%{?prerelease:.%{prerelease}}%{?dist} +Release: 5%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -19,8 +19,6 @@ Source11: amavisd-clean-tmp.service Source12: amavisd-clean-tmp.timer Source13: amavisd-clean-quarantine.service Source14: amavisd-clean-quarantine.timer -Source15: amavis-mc.service -Source16: amavisd-snmp-zmq.service Patch0: amavisd-new-2.10.1-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch @@ -99,37 +97,16 @@ Requires: perl(Time::HiRes) >= 1.49 Requires: perl(Unix::Syslog) Requires: perl(URI) Requires(pre): shadow-utils -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +%{?systemd_requires} +Obsoletes: amavisd-new-zeromq <= 2.11.0-5 +Obsoletes: amavisd-new-snmp-zeromq <= 2.11.0-5 %package snmp Group: Applications/System Summary: Exports amavisd SNMP data Requires: %{name} = %{version}-%{release} Requires: perl(NetSNMP::OID) -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd - -%package zeromq -Group: Applications/System -Summary: Support for communicating through 0MQ sockets -Requires: %{name} = %{version}-%{release} -Requires: perl(ZMQ::Constants) -Requires: perl(ZMQ::LibZMQ3) -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd - -%package snmp-zeromq -Group: Applications/System -Summary: Exports amavisd SNMP data and communicates through 0MQ sockets -Requires: %{name}-zeromq = %{version}-%{release} -Requires: perl(NetSNMP::OID) -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +%{?systemd_requires} %description amavisd-new is a high-performance and reliable interface between mailer @@ -151,22 +128,6 @@ exports data to a SNMP server running on a host (same or remote), making them available to SNMP clients (such a Cacti or mrtg) for monitoring or alerting purposes. -%description zeromq -This package adds support for monitoring and communicating with amavisd -and auxiliary services among themselves through 0MQ sockets (also called ZMQ -or ZeroMQ, or Crossroads I/O or XS). This method offers similar features -as current services amavisd-nanny, amavisd-agent and amavisd-snmp-subagent, -but use message passing paradigm instead of communicating through a shared -Berkeley database. This avoids locking contention, so the gain can be -significant for a busy amavisd setup with lots of child processes. - -%description snmp-zeromq -This package contains the program amavisd-snmp-subagent-zmq, which can be -used as a SNMP AgentX, exporting amavisd statistical counters database -(snmp.db) as well as a child process status database (nanny.db) to a -SNMP daemon supporting the AgentX protocol (RFC 2741), such as NET-SNMP. -It supports communicating through 0MQ sockets. - %prep %setup -q -n %{name}-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 @@ -185,12 +146,9 @@ rm -rf $RPM_BUILD_ROOT install -D -p -m 755 amavisd $RPM_BUILD_ROOT%{_sbindir}/amavisd install -D -p -m 755 amavisd-snmp-subagent $RPM_BUILD_ROOT%{_sbindir}/amavisd-snmp-subagent -install -D -p -m 755 amavisd-snmp-subagent-zmq $RPM_BUILD_ROOT%{_sbindir}/amavisd-snmp-subagent-zmq mkdir -p $RPM_BUILD_ROOT%{_bindir} -install -p -m 755 amavisd-{agent,nanny,release,signer,status,submit} $RPM_BUILD_ROOT%{_bindir}/ -install -p -m 755 amavis-mc $RPM_BUILD_ROOT%{_sbindir}/ -install -p -m 755 amavis-services $RPM_BUILD_ROOT%{_bindir}/ +install -p -m 755 amavisd-{agent,nanny,release,signer,submit} $RPM_BUILD_ROOT%{_bindir}/ install -D -p -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_unitdir}/amavisd.service install -D -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}/amavisd-snmp.service @@ -198,8 +156,6 @@ install -D -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-tmp.se install -D -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-tmp.timer install -D -p -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-quarantine.service install -D -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-quarantine.timer -install -D -p -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_unitdir}/amavis-mc.service -install -D -p -m 644 %{SOURCE16} $RPM_BUILD_ROOT%{_unitdir}/amavisd-snmp-zmq.service mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d install -D -p -m 644 amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavisd/amavisd.conf @@ -230,12 +186,6 @@ exit 0 %preun snmp %systemd_preun amavisd-snmp.service -%preun zeromq -%systemd_preun amavis-mc.service - -%preun snmp-zeromq -%systemd_preun amavisd-snmp-zmq.service - %post %systemd_post amavisd.service %systemd_post amavisd-clean-tmp.service @@ -251,12 +201,6 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %post snmp %systemd_post amavisd-snmp.service -%post zeromq -%systemd_post amavis-mc.service - -%post snmp-zeromq -%systemd_post amavisd-snmp-zmq.service - %postun %systemd_postun_with_restart amavisd.service %systemd_postun_with_restart amavisd-clean-tmp.service @@ -267,12 +211,6 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %postun snmp %systemd_postun_with_restart amavisd-snmp.service -%postun zeromq -%systemd_postun_with_restart amavis-mc.service - -%postun snmp-zeromq -%systemd_postun_with_restart amavisd-snmp-zmq.service - %files %doc AAAREADME.first LDAP.schema LDAP.ldif RELEASE_NOTES TODO INSTALL %doc README_FILES test-messages amavisd.conf-* amavisd-custom.conf @@ -305,17 +243,10 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_unitdir}/amavisd-snmp.service %{_sbindir}/amavisd-snmp-subagent -%files zeromq -%{_unitdir}/amavis-mc.service -%{_sbindir}/amavis-mc -%{_bindir}/amavisd-status -%{_bindir}/amavis-services - -%files snmp-zeromq -%{_unitdir}/amavisd-snmp-zmq.service -%{_sbindir}/amavisd-snmp-subagent-zmq - %changelog +* Wed Nov 30 2016 Juan Orti Alcaine 2.11.0-5 +- Drop subpackages which depend on the deprecated ZMQ::LibZMQ3 library (RHBZ#1394697) + * Thu Aug 18 2016 Juan Orti Alcaine 2.11.0-4 - Add patch to fix detection of originating emails (RHBZ#1364730) diff --git a/amavisd-snmp-zmq.service b/amavisd-snmp-zmq.service deleted file mode 100644 index 5093087..0000000 --- a/amavisd-snmp-zmq.service +++ /dev/null @@ -1,21 +0,0 @@ -[Unit] -Description=Exports amavisd SNMP data and communicates through 0MQ sockets -After=network.target -After=amavis-mc.service -After=amavisd.service - -[Service] -Type=forking -User=amavis -Group=amavis -PIDFile=/var/run/amavisd/amavisd-snmp-subagent-zmq.pid -ExecStart=/usr/sbin/amavisd-snmp-subagent-zmq -P /var/run/amavisd/amavisd-snmp-subagent-zmq.pid -Restart=on-failure -PrivateTmp=true -PrivateDevices=true -CapabilityBoundingSet= -ProtectSystem=full -ProtectHome=true - -[Install] -WantedBy=multi-user.target From c09d9fade1291c09ac2adc89082db5f6f18598cb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 05:55:33 +0000 Subject: [PATCH 28/45] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- amavisd-new.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 7c6d81b..368b848 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 5%{?prerelease:.%{prerelease}}%{?dist} +Release: 6%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -244,6 +244,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 2.11.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Wed Nov 30 2016 Juan Orti Alcaine 2.11.0-5 - Drop subpackages which depend on the deprecated ZMQ::LibZMQ3 library (RHBZ#1394697) From c11edb06af512f56bbc54929f5627616652186db Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Sat, 22 Jul 2017 09:54:29 +0200 Subject: [PATCH 29/45] PrivateDevices=true was causing problems with SELinux transitions --- amavisd-clean-quarantine.service | 1 - amavisd-clean-tmp.service | 1 - amavisd-new.spec | 5 ++++- amavisd-snmp.service | 1 - amavisd.service | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/amavisd-clean-quarantine.service b/amavisd-clean-quarantine.service index 10bb01e..bb6ccdc 100644 --- a/amavisd-clean-quarantine.service +++ b/amavisd-clean-quarantine.service @@ -6,7 +6,6 @@ Type=oneshot User=amavis Group=amavis PrivateTmp=true -PrivateDevices=true PrivateNetwork=true CapabilityBoundingSet= ProtectSystem=full diff --git a/amavisd-clean-tmp.service b/amavisd-clean-tmp.service index 9a64b0d..b091108 100644 --- a/amavisd-clean-tmp.service +++ b/amavisd-clean-tmp.service @@ -6,7 +6,6 @@ Type=oneshot User=amavis Group=amavis PrivateTmp=true -PrivateDevices=true PrivateNetwork=true CapabilityBoundingSet= ProtectSystem=full diff --git a/amavisd-new.spec b/amavisd-new.spec index 368b848..39dc4bf 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 6%{?prerelease:.%{prerelease}}%{?dist} +Release: 7%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -244,6 +244,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Sat Jul 08 2017 Juan Orti Alcaine 2.11.0-7 +- PrivateDevices=true was causing problems with SELinux transitions + * Fri Feb 10 2017 Fedora Release Engineering - 2.11.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/amavisd-snmp.service b/amavisd-snmp.service index b311ba6..167b7e0 100644 --- a/amavisd-snmp.service +++ b/amavisd-snmp.service @@ -10,7 +10,6 @@ PIDFile=/var/run/amavisd/amavisd-snmp-subagent.pid ExecStart=/usr/sbin/amavisd-snmp-subagent -D /var/spool/amavisd/db -P /var/run/amavisd/amavisd-snmp-subagent.pid Restart=on-failure PrivateTmp=true -PrivateDevices=true CapabilityBoundingSet= ProtectSystem=full ProtectHome=true diff --git a/amavisd.service b/amavisd.service index f39d860..4a10398 100644 --- a/amavisd.service +++ b/amavisd.service @@ -14,7 +14,6 @@ ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf ExecReload=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf reload Restart=on-failure PrivateTmp=true -PrivateDevices=true CapabilityBoundingSet= ProtectSystem=full ProtectHome=true From 2a62d375242187c7d677cd385c800fdbd8bf520b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 02:48:45 +0000 Subject: [PATCH 30/45] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- amavisd-new.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 39dc4bf..cd587f0 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 7%{?prerelease:.%{prerelease}}%{?dist} +Release: 8%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -244,6 +244,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 2.11.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Jul 08 2017 Juan Orti Alcaine 2.11.0-7 - PrivateDevices=true was causing problems with SELinux transitions From 423e0219273ed77bfab29df1a1c5b0df8f206f34 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Fri, 25 Aug 2017 10:54:37 +0200 Subject: [PATCH 31/45] Disable Avast antivirus in config file (RHBZ#1480861) --- ...onf.patch => amavisd-new-2.11.0-conf.patch | 31 ++++++++++++++++--- amavisd-new.spec | 9 +++--- 2 files changed, 31 insertions(+), 9 deletions(-) rename amavisd-new-2.10.1-conf.patch => amavisd-new-2.11.0-conf.patch (89%) diff --git a/amavisd-new-2.10.1-conf.patch b/amavisd-new-2.11.0-conf.patch similarity index 89% rename from amavisd-new-2.10.1-conf.patch rename to amavisd-new-2.11.0-conf.patch index 54eb252..96ec5d1 100644 --- a/amavisd-new-2.10.1-conf.patch +++ b/amavisd-new-2.11.0-conf.patch @@ -1,8 +1,15 @@ -commit f866c3623452349bfb6e7c505e44b4ed0f444c54 -Author: Juan Orti Alcaine -Date: Mon Apr 27 12:37:24 2015 +0200 +From c93f969164dd560c90989790db4257c8899e71b4 Mon Sep 17 00:00:00 2001 +From: Juan Orti Alcaine +Date: Fri, 25 Aug 2017 10:03:13 +0200 +Subject: [PATCH] amavisd-new-2.11.0-conf.patch - amavisd-new-2.10.1-conf.patch +--- + amavis-mc | 6 +++--- + amavisd-agent | 2 +- + amavisd-nanny | 2 +- + amavisd-signer | 4 ++-- + amavisd.conf | 60 +++++++++++++++++++++++++++++----------------------------- + 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/amavis-mc b/amavis-mc index 88d9701..f6f8081 100755 @@ -64,7 +71,7 @@ index f154646..3042b7c 100755 # $daemonize = 1; diff --git a/amavisd.conf b/amavisd.conf -index d023e10..2ce88ff 100644 +index 02794d8..555fcf4 100644 --- a/amavisd.conf +++ b/amavisd.conf @@ -14,25 +14,25 @@ use strict; @@ -179,3 +186,17 @@ index d023e10..2ce88ff 100644 # ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred) # # note that Mail::ClamAV requires perl to be build with threading! +@@ -698,8 +698,8 @@ $banned_filename_re = new_RE( + # ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'], + # '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/m ], + +- ### http://www.avast.com/ +- ['avast! Antivirus', '/bin/scan', '{}', [0], [1], qr/\t(.+)/m ], ++# ### http://www.avast.com/ ++# ['avast! Antivirus', '/bin/scan', '{}', [0], [1], qr/\t(.+)/m ], + + ### http://www.ikarus-software.com/ + ['Ikarus AntiVirus for Linux', 'ikarus', +-- +2.13.5 + diff --git a/amavisd-new.spec b/amavisd-new.spec index cd587f0..d0e0eef 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,9 +1,7 @@ -#%%global prerelease rc2 - Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 8%{?prerelease:.%{prerelease}}%{?dist} +Release: 9%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -19,7 +17,7 @@ Source11: amavisd-clean-tmp.service Source12: amavisd-clean-tmp.timer Source13: amavisd-clean-quarantine.service Source14: amavisd-clean-quarantine.timer -Patch0: amavisd-new-2.10.1-conf.patch +Patch0: amavisd-new-2.11.0-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch # Don't source /etc/sysconfig/network in init script; the network check @@ -244,6 +242,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Fri Aug 25 2017 Juan Orti Alcaine 2.11.0-9 +- Disable Avast antivirus in config file (RHBZ#1480861) + * Wed Jul 26 2017 Fedora Release Engineering - 2.11.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From dc7d930114055de17566d303aec99e0d4cd600fe Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Sun, 3 Sep 2017 20:27:29 +0200 Subject: [PATCH 32/45] Remove lrzip dependency --- amavisd-new.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index d0e0eef..cf1b20d 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 9%{?dist} +Release: 10%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -46,7 +46,6 @@ Requires: lzop Requires: nomarch Requires: p7zip, p7zip-plugins Requires: tar -Requires: lrzip Requires: unzoo # We probably should parse the fetch_modules() code in amavisd for this list. # These are just the dependencies that don't get picked up otherwise. @@ -242,6 +241,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Sun Sep 03 2017 Juan Orti Alcaine 2.11.0-10 +- Remove lrzip dependency + * Fri Aug 25 2017 Juan Orti Alcaine 2.11.0-9 - Disable Avast antivirus in config file (RHBZ#1480861) From 6573861fd9dd13da27c1d25be964d4fb3a44a708 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Tue, 12 Dec 2017 12:03:26 +0100 Subject: [PATCH 33/45] Remove lrzip from config and use weak dependencies where possible --- amavisd-new-2.11.0-conf.patch | 23 +++++++++++++++----- amavisd-new.spec | 41 ++++++++++++++++++----------------- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/amavisd-new-2.11.0-conf.patch b/amavisd-new-2.11.0-conf.patch index 96ec5d1..34d8789 100644 --- a/amavisd-new-2.11.0-conf.patch +++ b/amavisd-new-2.11.0-conf.patch @@ -1,6 +1,6 @@ -From c93f969164dd560c90989790db4257c8899e71b4 Mon Sep 17 00:00:00 2001 +From 7299171f1d37f94954c618098ba637f2cd97aa9e Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine -Date: Fri, 25 Aug 2017 10:03:13 +0200 +Date: Tue, 12 Dec 2017 11:06:51 +0100 Subject: [PATCH] amavisd-new-2.11.0-conf.patch --- @@ -8,8 +8,8 @@ Subject: [PATCH] amavisd-new-2.11.0-conf.patch amavisd-agent | 2 +- amavisd-nanny | 2 +- amavisd-signer | 4 ++-- - amavisd.conf | 60 +++++++++++++++++++++++++++++----------------------------- - 5 files changed, 37 insertions(+), 37 deletions(-) + amavisd.conf | 64 +++++++++++++++++++++++++++++----------------------------- + 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/amavis-mc b/amavis-mc index 88d9701..f6f8081 100755 @@ -71,7 +71,7 @@ index f154646..3042b7c 100755 # $daemonize = 1; diff --git a/amavisd.conf b/amavisd.conf -index 02794d8..555fcf4 100644 +index 02794d8..1c28247 100644 --- a/amavisd.conf +++ b/amavisd.conf @@ -14,25 +14,25 @@ use strict; @@ -147,6 +147,17 @@ index 02794d8..555fcf4 100644 # $bad_header_quarantine_method = undef; # $os_fingerprint_method = 'p0f:*:2345'; # to query p0f-analyzer.pl +@@ -326,8 +326,8 @@ $banned_filename_re = new_RE( + ['lzma', \&do_uncompress, + ['lzmadec', 'xz -dc --format=lzma', + 'lzma -dc', 'unlzma -c', 'lzcat', 'lzmadec'] ], +- ['lrz', \&do_uncompress, +- ['lrzip -q -k -d -o -', 'lrzcat -q -k'] ], ++# ['lrz', \&do_uncompress, ++# ['lrzip -q -k -d -o -', 'lrzcat -q -k'] ], + ['lzo', \&do_uncompress, 'lzop -d'], + ['lz4', \&do_uncompress, ['lz4c -d'] ], + ['rpm', \&do_uncompress, ['rpm2cpio.pl', 'rpm2cpio'] ], @@ -339,9 +339,9 @@ $banned_filename_re = new_RE( ['arj', \&do_unarj, ['unarj', 'arj'] ], ['arc', \&do_arc, ['nomarch', 'arc'] ], @@ -198,5 +209,5 @@ index 02794d8..555fcf4 100644 ### http://www.ikarus-software.com/ ['Ikarus AntiVirus for Linux', 'ikarus', -- -2.13.5 +2.14.3 diff --git a/amavisd-new.spec b/amavisd-new.spec index cf1b20d..e022679 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,10 +1,9 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 10%{?dist} +Release: 11%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL -Group: Applications/System URL: http://www.ijs.si/software/amavisd/ Source0: http://www.ijs.si/software/amavisd/amavisd-new-%{version}%{?prerelease:-%{prerelease}}.tar.xz Source2: amavis-clamd.conf @@ -27,26 +26,25 @@ Patch2: amavisd-condrestart.patch Patch3: amavisd-new-2.8.0-init_network.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1364730 Patch4: amavisd-new-2.11.0-detect_originating_email.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl-generators BuildRequires: systemd Recommends: clamav-server-systemd Requires: tmpwatch -Requires: binutils +Recommends: binutils Requires: altermime -Requires: arj -Requires: bzip2 -Requires: cabextract -Requires: pax +Recommends: arj +Recommends: bzip2 +Recommends: cabextract +Recommends: pax Requires: file -Requires: freeze -Requires: gzip -Requires: lzop -Requires: nomarch -Requires: p7zip, p7zip-plugins -Requires: tar -Requires: unzoo +Recommends: freeze +Recommends: gzip +Recommends: lzop +Recommends: nomarch +Recommends: p7zip, p7zip-plugins +Recommends: tar +Recommends: unzoo # We probably should parse the fetch_modules() code in amavisd for this list. # These are just the dependencies that don't get picked up otherwise. Requires: perl(Archive::Tar) @@ -57,8 +55,8 @@ Requires: perl(Compress::Raw::Zlib) >= 2.017 Requires: perl(Convert::TNEF) Requires: perl(Convert::UUlib) Requires: perl(Crypt::OpenSSL::RSA) -Requires: perl(DBD::SQLite) -Requires: perl(DBI) +Recommends: perl(DBD::SQLite) +Recommends: perl(DBI) Requires: perl(Digest::MD5) >= 2.22 Requires: perl(Digest::SHA) Requires: perl(Digest::SHA1) @@ -81,9 +79,9 @@ Requires: perl(Mail::Field) Requires: perl(Mail::Header) Requires: perl(Mail::Internet) >= 1.58 Requires: perl(Mail::SPF) -Requires: perl(Mail::SpamAssassin) +Recommends: perl(Mail::SpamAssassin) Requires: perl(Net::DNS) -Requires: perl(Net::LDAP) +Recommends: perl(Net::LDAP) Requires: perl(Net::LibIDN) Requires: perl(Net::SSLeay) Requires: perl(Net::Server) >= 2.0 @@ -99,7 +97,6 @@ Obsoletes: amavisd-new-zeromq <= 2.11.0-5 Obsoletes: amavisd-new-snmp-zeromq <= 2.11.0-5 %package snmp -Group: Applications/System Summary: Exports amavisd SNMP data Requires: %{name} = %{version}-%{release} Requires: perl(NetSNMP::OID) @@ -241,6 +238,10 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Tue Dec 12 2017 Juan Orti Alcaine 2.11.0-11 +- Remove lrzip from config +- Use weak dependencies where possible + * Sun Sep 03 2017 Juan Orti Alcaine 2.11.0-10 - Remove lrzip dependency From fe8cbe7745be3cffa0c8acbb0728fdfaed8ae92c Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Tue, 12 Dec 2017 15:51:02 +0100 Subject: [PATCH 34/45] Modify service unit to honor user and group in config file --- amavisd-new.spec | 5 ++++- amavisd.service | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index e022679..d166307 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 11%{?dist} +Release: 12%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL URL: http://www.ijs.si/software/amavisd/ @@ -238,6 +238,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Tue Dec 12 2017 Juan Orti Alcaine 2.11.0-12 +- Modify service unit to honor user and group in config file + * Tue Dec 12 2017 Juan Orti Alcaine 2.11.0-11 - Remove lrzip from config - Use weak dependencies where possible diff --git a/amavisd.service b/amavisd.service index 4a10398..58caf23 100644 --- a/amavisd.service +++ b/amavisd.service @@ -3,18 +3,15 @@ Description=Amavisd-new is an interface between MTA and content checkers. Documentation=http://www.ijs.si/software/amavisd/#doc After=network.target Wants=clamd@amavisd.service -Wants=postfix.service [Service] Type=forking -User=amavis -Group=amavis PIDFile=/var/run/amavisd/amavisd.pid ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf ExecReload=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf reload Restart=on-failure PrivateTmp=true -CapabilityBoundingSet= +CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_SETGID CAP_SETUID ProtectSystem=full ProtectHome=true From 43ef98c4b076868ca0fbfcb8a4a94565eb88fec9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 02:11:42 +0000 Subject: [PATCH 35/45] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- amavisd-new.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index d166307..3ffe588 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 12%{?dist} +Release: 13%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL URL: http://www.ijs.si/software/amavisd/ @@ -238,6 +238,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 2.11.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Tue Dec 12 2017 Juan Orti Alcaine 2.11.0-12 - Modify service unit to honor user and group in config file From eb247c97e6a49cceddbcc3fe465b9f2caf0f0b31 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Feb 2018 07:50:03 +0100 Subject: [PATCH 36/45] Remove %clean section None of currently supported distributions need that. Last one was EL5 which is EOL for a while. Signed-off-by: Igor Gnatenko --- amavisd-new.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 3ffe588..6a5de54 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -160,9 +160,6 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/{clamd.amavisd,amavisd} install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_tmpfilesdir}/amavisd-new.conf -%clean -rm -rf $RPM_BUILD_ROOT - %pre getent group amavis > /dev/null || %{_sbindir}/groupadd -r amavis getent passwd amavis > /dev/null || \ From 12ec21763a07b8b27d959f626f670a5e15178edc Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Sat, 3 Mar 2018 13:00:57 +0100 Subject: [PATCH 37/45] fix RHBZ#1551203 - correct sock location --- amavisd-new.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 6a5de54..f7a2701 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 13%{?dist} +Release: 14%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL URL: http://www.ijs.si/software/amavisd/ @@ -131,7 +131,7 @@ alerting purposes. %patch4 -p0 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ -sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/spool/amavisd/amavisd.sock,' -i amavisd-release +sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/run/amavisd/amavisd.sock,' -i amavisd-{release,submit} %build @@ -235,6 +235,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Sat Mar 03 2018 Marcel Haerry - 2.11.0-14 +- Fix socket path for amavisd tools (RHBZ#1551203) + * Wed Feb 07 2018 Fedora Release Engineering - 2.11.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 1b3449d93b926e45303d59106f47fa246f0c8883 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 12 Jul 2018 20:10:54 +0000 Subject: [PATCH 38/45] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- amavisd-new.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index f7a2701..2b9516c 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.0 -Release: 14%{?dist} +Release: 15%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL URL: http://www.ijs.si/software/amavisd/ @@ -235,6 +235,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Thu Jul 12 2018 Fedora Release Engineering - 2.11.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Sat Mar 03 2018 Marcel Haerry - 2.11.0-14 - Fix socket path for amavisd tools (RHBZ#1551203) From 4a3450262b1df62bb1843e8c31a66b63ff8b436c Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Fri, 12 Oct 2018 10:48:44 +0200 Subject: [PATCH 39/45] Version 2.11.1 --- .gitignore | 1 + amavisd-new.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 719bd90..a959d06 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ amavisd-new-2.8.0.tar.gz /amavisd-new-2.10.0.tar.xz /amavisd-new-2.10.1.tar.xz /amavisd-new-2.11.0.tar.xz +/amavisd-new-2.11.1.tar.bz2 diff --git a/amavisd-new.spec b/amavisd-new.spec index 2b9516c..41a10ea 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,11 +1,11 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new -Version: 2.11.0 -Release: 15%{?dist} +Version: 2.11.1 +Release: 1%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL -URL: http://www.ijs.si/software/amavisd/ -Source0: http://www.ijs.si/software/amavisd/amavisd-new-%{version}%{?prerelease:-%{prerelease}}.tar.xz +URL: https://amavis.org/ +Source0: https://amavis.org/amavisd-new-%{version}%{?prerelease:-%{prerelease}}.tar.bz2 Source2: amavis-clamd.conf Source4: README.fedora Source5: README.quarantine @@ -235,6 +235,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Fri Oct 12 2018 Juan Orti Alcaine 2.11.1-1 +- Version 2.11.1 + * Thu Jul 12 2018 Fedora Release Engineering - 2.11.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 4dc5ca2..2e8c08d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4642d63c5d3f0daafbcacb9bb553e6f3 amavisd-new-2.11.0.tar.xz +SHA512 (amavisd-new-2.11.1.tar.bz2) = 06180a4efa777af2f91781ba6e3ea302041c5dd721981d960bab24cecb160c17df8a927e95df9dd7ee5ba64004b8edd3c6c0c5ef7f96fd702d1d84e4a856ea83 From e56a731d6722f401552ca5d8820222bd41d9fc4f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 13:15:03 +0000 Subject: [PATCH 40/45] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- amavisd-new.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 41a10ea..bba1469 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.1 -Release: 1%{?dist} +Release: 2%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL URL: https://amavis.org/ @@ -235,6 +235,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 2.11.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Oct 12 2018 Juan Orti Alcaine 2.11.1-1 - Version 2.11.1 From 223391aa1332ab1620f932175355efe550eb0038 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Sat, 16 Feb 2019 10:18:40 +0100 Subject: [PATCH 41/45] Drop tmpwatch dependency and use tmpfiles for directory cleanup --- amavisd-clean-quarantine.service | 13 ------------ amavisd-clean-quarantine.timer | 9 -------- amavisd-clean-tmp.service | 13 ------------ amavisd-clean-tmp.timer | 9 -------- amavisd-new-tmpfiles.conf | 4 ++++ amavisd-new.spec | 35 ++++---------------------------- 6 files changed, 8 insertions(+), 75 deletions(-) delete mode 100644 amavisd-clean-quarantine.service delete mode 100644 amavisd-clean-quarantine.timer delete mode 100644 amavisd-clean-tmp.service delete mode 100644 amavisd-clean-tmp.timer diff --git a/amavisd-clean-quarantine.service b/amavisd-clean-quarantine.service deleted file mode 100644 index bb6ccdc..0000000 --- a/amavisd-clean-quarantine.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Clean amavisd quarantine folder - -[Service] -Type=oneshot -User=amavis -Group=amavis -PrivateTmp=true -PrivateNetwork=true -CapabilityBoundingSet= -ProtectSystem=full -ProtectHome=true -ExecStart=/usr/sbin/tmpwatch -d 720 /var/spool/amavisd/quarantine diff --git a/amavisd-clean-quarantine.timer b/amavisd-clean-quarantine.timer deleted file mode 100644 index 1afedc1..0000000 --- a/amavisd-clean-quarantine.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Amavisd clean quarantine timer - -[Timer] -OnBootSec=5min -OnUnitActiveSec=24h - -[Install] -WantedBy=timers.target diff --git a/amavisd-clean-tmp.service b/amavisd-clean-tmp.service deleted file mode 100644 index b091108..0000000 --- a/amavisd-clean-tmp.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Clean amavisd tmp folder - -[Service] -Type=oneshot -User=amavis -Group=amavis -PrivateTmp=true -PrivateNetwork=true -CapabilityBoundingSet= -ProtectSystem=full -ProtectHome=true -ExecStart=/usr/sbin/tmpwatch 24 /var/spool/amavisd/tmp diff --git a/amavisd-clean-tmp.timer b/amavisd-clean-tmp.timer deleted file mode 100644 index 75878a2..0000000 --- a/amavisd-clean-tmp.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Amavisd clean tmp timer - -[Timer] -OnBootSec=5min -OnUnitActiveSec=24h - -[Install] -WantedBy=timers.target diff --git a/amavisd-new-tmpfiles.conf b/amavisd-new-tmpfiles.conf index fac3b2f..3a935b3 100644 --- a/amavisd-new-tmpfiles.conf +++ b/amavisd-new-tmpfiles.conf @@ -1,2 +1,6 @@ d /var/run/amavisd 755 amavis amavis - d /var/run/clamd.amavisd 770 amavis clamupdate - + +# Directory cleanup +d /var/spool/amavisd/quarantine 750 amavis amavis 30d +d /var/spool/amavisd/tmp 750 amavis amavis 1d diff --git a/amavisd-new.spec b/amavisd-new.spec index bba1469..8e5f333 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.1 -Release: 2%{?dist} +Release: 3%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL URL: https://amavis.org/ @@ -12,10 +12,6 @@ Source5: README.quarantine Source8: amavisd-new-tmpfiles.conf Source9: amavisd.service Source10: amavisd-snmp.service -Source11: amavisd-clean-tmp.service -Source12: amavisd-clean-tmp.timer -Source13: amavisd-clean-quarantine.service -Source14: amavisd-clean-quarantine.timer Patch0: amavisd-new-2.11.0-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch @@ -30,7 +26,6 @@ BuildArch: noarch BuildRequires: perl-generators BuildRequires: systemd Recommends: clamav-server-systemd -Requires: tmpwatch Recommends: binutils Requires: altermime Recommends: arj @@ -146,10 +141,6 @@ install -p -m 755 amavisd-{agent,nanny,release,signer,submit} $RPM_BUILD_ROOT%{_ install -D -p -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_unitdir}/amavisd.service install -D -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}/amavisd-snmp.service -install -D -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-tmp.service -install -D -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-tmp.timer -install -D -p -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-quarantine.service -install -D -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_unitdir}/amavisd-clean-quarantine.timer mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d install -D -p -m 644 amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavisd/amavisd.conf @@ -169,35 +160,18 @@ exit 0 %preun %systemd_preun amavisd.service -%systemd_preun amavisd-clean-tmp.service -%systemd_preun amavisd-clean-tmp.timer -%systemd_preun amavisd-clean-quarantine.service -%systemd_preun amavisd-clean-quarantine.timer %preun snmp %systemd_preun amavisd-snmp.service %post %systemd_post amavisd.service -%systemd_post amavisd-clean-tmp.service -%systemd_post amavisd-clean-tmp.timer -%systemd_post amavisd-clean-quarantine.service -%systemd_post amavisd-clean-quarantine.timer - -systemctl enable amavisd-clean-tmp.timer >/dev/null 2>&1 || : -systemctl start amavisd-clean-tmp.timer >/dev/null 2>&1 || : -systemctl enable amavisd-clean-quarantine.timer >/dev/null 2>&1 || : -systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %post snmp %systemd_post amavisd-snmp.service %postun %systemd_postun_with_restart amavisd.service -%systemd_postun_with_restart amavisd-clean-tmp.service -%systemd_postun_with_restart amavisd-clean-tmp.timer -%systemd_postun_with_restart amavisd-clean-quarantine.service -%systemd_postun_with_restart amavisd-clean-quarantine.timer %postun snmp %systemd_postun_with_restart amavisd-snmp.service @@ -208,10 +182,6 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %license LICENSE %dir %{_sysconfdir}/amavisd/ %{_unitdir}/amavisd.service -%{_unitdir}/amavisd-clean-tmp.service -%{_unitdir}/amavisd-clean-tmp.timer -%{_unitdir}/amavisd-clean-quarantine.service -%{_unitdir}/amavisd-clean-quarantine.timer %dir %{_sysconfdir}/clamd.d %config(noreplace) %{_sysconfdir}/amavisd/amavisd.conf %config(noreplace) %{_sysconfdir}/clamd.d/amavisd.conf @@ -235,6 +205,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 2>&1 || : %{_sbindir}/amavisd-snmp-subagent %changelog +* Sat Feb 16 2019 Juan Orti Alcaine 2.11.1-3 +- Drop tmpwatch dependency and use tmpfiles for directory cleanup + * Thu Jan 31 2019 Fedora Release Engineering - 2.11.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 063076488e4b556e17bdb94d9e1a536576c187b2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 17:49:57 +0000 Subject: [PATCH 42/45] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- amavisd-new.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 8e5f333..c839c12 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.11.1 -Release: 3%{?dist} +Release: 4%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL URL: https://amavis.org/ @@ -205,6 +205,9 @@ exit 0 %{_sbindir}/amavisd-snmp-subagent %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 2.11.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat Feb 16 2019 Juan Orti Alcaine 2.11.1-3 - Drop tmpwatch dependency and use tmpfiles for directory cleanup From 0c2172a33b9adc346e241eead3b465ca5b0729d8 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Thu, 1 Aug 2019 13:02:10 +0200 Subject: [PATCH 43/45] Version 2.12.0 --- .gitignore | 1 + ...-new-2.11.0-detect_originating_email.patch | 24 --- ...onf.patch => amavisd-new-2.12.0-conf.patch | 34 ++-- amavisd-new.spec | 185 ++++++++++-------- sources | 2 +- 5 files changed, 118 insertions(+), 128 deletions(-) delete mode 100644 amavisd-new-2.11.0-detect_originating_email.patch rename amavisd-new-2.11.0-conf.patch => amavisd-new-2.12.0-conf.patch (91%) diff --git a/.gitignore b/.gitignore index a959d06..89f0d06 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ amavisd-new-2.8.0.tar.gz /amavisd-new-2.10.1.tar.xz /amavisd-new-2.11.0.tar.xz /amavisd-new-2.11.1.tar.bz2 +/amavis-v2.12.0.tar.bz2 diff --git a/amavisd-new-2.11.0-detect_originating_email.patch b/amavisd-new-2.11.0-detect_originating_email.patch deleted file mode 100644 index 80cf481..0000000 --- a/amavisd-new-2.11.0-detect_originating_email.patch +++ /dev/null @@ -1,24 +0,0 @@ -From giovanni at paclan.it Fri Jul 1 09:35:49 2016 -From: giovanni at paclan.it (Giovanni) -Date: Fri, 1 Jul 2016 07:35:49 +0000 (UTC) -Subject: dkim not working after upgrading to 2.11.0 -Message-ID: - -Hi, -after upgrading to 2.11.0, DKIM signing does not work anymore because -the email is no more detected as ORIGINATING. -This diff fixes the issue. - Cheers - Giovanni - - ---- amavisd.orig Tue Apr 26 21:24:33 2016 -+++ amavisd Fri Jul 1 01:03:15 2016 -@@ -34338,6 +34329,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/amavisd-new-2.11.0-conf.patch b/amavisd-new-2.12.0-conf.patch similarity index 91% rename from amavisd-new-2.11.0-conf.patch rename to amavisd-new-2.12.0-conf.patch index 34d8789..e2ce636 100644 --- a/amavisd-new-2.11.0-conf.patch +++ b/amavisd-new-2.12.0-conf.patch @@ -1,14 +1,14 @@ -From 7299171f1d37f94954c618098ba637f2cd97aa9e Mon Sep 17 00:00:00 2001 -From: Juan Orti Alcaine -Date: Tue, 12 Dec 2017 11:06:51 +0100 -Subject: [PATCH] amavisd-new-2.11.0-conf.patch +From f697a6d1cfe2499751157748a420994635e4ce68 Mon Sep 17 00:00:00 2001 +From: Juan Orti Alcaine +Date: Thu, 1 Aug 2019 12:40:43 +0200 +Subject: [PATCH] Fedora configuration modifications --- - amavis-mc | 6 +++--- + amavis-mc | 6 ++--- amavisd-agent | 2 +- amavisd-nanny | 2 +- amavisd-signer | 4 ++-- - amavisd.conf | 64 +++++++++++++++++++++++++++++----------------------------- + amavisd.conf | 64 +++++++++++++++++++++++++------------------------- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/amavis-mc b/amavis-mc @@ -71,11 +71,11 @@ index f154646..3042b7c 100755 # $daemonize = 1; diff --git a/amavisd.conf b/amavisd.conf -index 02794d8..1c28247 100644 +index bb562e6..f2e0e40 100644 --- a/amavisd.conf +++ b/amavisd.conf -@@ -14,25 +14,25 @@ use strict; - # $bypass_decode_parts = 1; # controls running of decoders&dearchivers +@@ -17,25 +17,25 @@ use strict; + # truncation in /proc//stat and ps -e output $max_servers = 2; # num of pre-forked children (2..30 is common), -m -$daemon_user = 'vscan'; # (no default; customary: vscan or amavis), -u @@ -107,7 +107,7 @@ index 02794d8..1c28247 100644 #NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually $log_level = 0; # verbosity 0..5, -d -@@ -52,7 +52,7 @@ $enable_dkim_signing = 1; # load DKIM signing code, keys defined by dkim_key +@@ -55,7 +55,7 @@ $enable_dkim_signing = 1; # load DKIM signing code, keys defined by dkim_key @mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 ); @@ -116,7 +116,7 @@ index 02794d8..1c28247 100644 # option(s) -p overrides $inet_socket_port and $unix_socketname $inet_socket_port = 10024; # listen on this local TCP port(s) -@@ -116,11 +116,11 @@ $sa_local_tests_only = 0; # only tests which do not require internet access? +@@ -119,11 +119,11 @@ $sa_local_tests_only = 0; # only tests which do not require internet access? # $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP; # defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16) @@ -132,7 +132,7 @@ index 02794d8..1c28247 100644 $mailfrom_to_quarantine = ''; # null return path; uses original sender if undef @addr_extension_virus_maps = ('virus'); -@@ -154,10 +154,10 @@ $defang_by_ccat{CC_BADH.",6"} = 1; # header field syntax error +@@ -157,10 +157,10 @@ $defang_by_ccat{CC_BADH.",6"} = 1; # header field syntax error # $notify_method = 'smtp:[127.0.0.1]:10025'; # $forward_method = 'smtp:[127.0.0.1]:10025'; # set to undef with milter! @@ -147,7 +147,7 @@ index 02794d8..1c28247 100644 # $bad_header_quarantine_method = undef; # $os_fingerprint_method = 'p0f:*:2345'; # to query p0f-analyzer.pl -@@ -326,8 +326,8 @@ $banned_filename_re = new_RE( +@@ -329,8 +329,8 @@ $banned_filename_re = new_RE( ['lzma', \&do_uncompress, ['lzmadec', 'xz -dc --format=lzma', 'lzma -dc', 'unlzma -c', 'lzcat', 'lzmadec'] ], @@ -158,7 +158,7 @@ index 02794d8..1c28247 100644 ['lzo', \&do_uncompress, 'lzop -d'], ['lz4', \&do_uncompress, ['lz4c -d'] ], ['rpm', \&do_uncompress, ['rpm2cpio.pl', 'rpm2cpio'] ], -@@ -339,9 +339,9 @@ $banned_filename_re = new_RE( +@@ -342,9 +342,9 @@ $banned_filename_re = new_RE( ['arj', \&do_unarj, ['unarj', 'arj'] ], ['arc', \&do_arc, ['nomarch', 'arc'] ], ['zoo', \&do_zoo, ['zoo', 'unzoo'] ], @@ -170,7 +170,7 @@ index 02794d8..1c28247 100644 ['tnef', \&do_tnef], # ['lha', \&do_lha, 'lha'], # not safe, use 7z instead # ['sit', \&do_unstuff, 'unstuff'], # not safe -@@ -379,16 +379,16 @@ $banned_filename_re = new_RE( +@@ -382,16 +382,16 @@ $banned_filename_re = new_RE( # qr/^(?:310|420)[,\s]*(?:.* <<< )?(.+?)(?: ; |$)/m ], # settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1 @@ -197,7 +197,7 @@ index 02794d8..1c28247 100644 # ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred) # # note that Mail::ClamAV requires perl to be build with threading! -@@ -698,8 +698,8 @@ $banned_filename_re = new_RE( +@@ -701,8 +701,8 @@ $banned_filename_re = new_RE( # ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'], # '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/m ], @@ -209,5 +209,5 @@ index 02794d8..1c28247 100644 ### http://www.ikarus-software.com/ ['Ikarus AntiVirus for Linux', 'ikarus', -- -2.14.3 +2.21.0 diff --git a/amavisd-new.spec b/amavisd-new.spec index c839c12..bd8f868 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,18 +1,18 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new -Version: 2.11.1 -Release: 4%{?dist} +Version: 2.12.0 +Release: 1%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL -URL: https://amavis.org/ -Source0: https://amavis.org/amavisd-new-%{version}%{?prerelease:-%{prerelease}}.tar.bz2 +URL: https://gitlab.com/amavis/amavis +Source0: https://gitlab.com/amavis/amavis/-/archive/v%{version}/amavis-v%{version}.tar.bz2 Source2: amavis-clamd.conf Source4: README.fedora Source5: README.quarantine Source8: amavisd-new-tmpfiles.conf Source9: amavisd.service Source10: amavisd-snmp.service -Patch0: amavisd-new-2.11.0-conf.patch +Patch0: amavisd-new-2.12.0-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch # Don't source /etc/sysconfig/network in init script; the network check @@ -20,11 +20,10 @@ Patch2: amavisd-condrestart.patch # and it can't be relied upon to exist in recent Fedora builds. Mail # sent upstream to amavis-users ML 2013-05-10. -adamw Patch3: amavisd-new-2.8.0-init_network.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1364730 -Patch4: amavisd-new-2.11.0-detect_originating_email.patch BuildArch: noarch BuildRequires: perl-generators BuildRequires: systemd +Suggests: %{name}-doc Recommends: clamav-server-systemd Recommends: binutils Requires: altermime @@ -97,6 +96,9 @@ Requires: %{name} = %{version}-%{release} Requires: perl(NetSNMP::OID) %{?systemd_requires} +%package doc +Summary: amavisd-new doc files + %description amavisd-new is a high-performance and reliable interface between mailer (MTA) and one or more content checkers: virus scanners, and/or @@ -117,13 +119,15 @@ exports data to a SNMP server running on a host (same or remote), making them available to SNMP clients (such a Cacti or mrtg) for monitoring or alerting purposes. +%description doc +Documentation files for amavisd-new + %prep -%setup -q -n %{name}-%{version}%{?prerelease:-%{prerelease}} +%setup -q -n amavis-v%{version} %patch0 -p1 %patch1 -p1 %patch2 -p0 %patch3 -p1 -%patch4 -p0 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/run/amavisd/amavisd.sock,' -i amavisd-{release,submit} @@ -177,8 +181,6 @@ exit 0 %systemd_postun_with_restart amavisd-snmp.service %files -%doc AAAREADME.first LDAP.schema LDAP.ldif RELEASE_NOTES TODO INSTALL -%doc README_FILES test-messages amavisd.conf-* amavisd-custom.conf %license LICENSE %dir %{_sysconfdir}/amavisd/ %{_unitdir}/amavisd.service @@ -204,17 +206,28 @@ exit 0 %{_unitdir}/amavisd-snmp.service %{_sbindir}/amavisd-snmp-subagent +%files doc +%license LICENSE +%doc AAAREADME.first LDAP.schema LDAP.ldif RELEASE_NOTES TODO INSTALL +%doc README_FILES test-messages amavisd.conf-* amavisd-custom.conf + %changelog +* Thu Aug 01 2019 Juan Orti Alcaine - 2.12.0-1 +- Version 2.12.0 +- Update patches +- Update project URL +- Create doc subpackage + * Wed Jul 24 2019 Fedora Release Engineering - 2.11.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild -* Sat Feb 16 2019 Juan Orti Alcaine 2.11.1-3 +* Sat Feb 16 2019 Juan Orti Alcaine - 2.11.1-3 - Drop tmpwatch dependency and use tmpfiles for directory cleanup * Thu Jan 31 2019 Fedora Release Engineering - 2.11.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild -* Fri Oct 12 2018 Juan Orti Alcaine 2.11.1-1 +* Fri Oct 12 2018 Juan Orti Alcaine - 2.11.1-1 - Version 2.11.1 * Thu Jul 12 2018 Fedora Release Engineering - 2.11.0-15 @@ -226,110 +239,110 @@ exit 0 * Wed Feb 07 2018 Fedora Release Engineering - 2.11.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild -* Tue Dec 12 2017 Juan Orti Alcaine 2.11.0-12 +* Tue Dec 12 2017 Juan Orti Alcaine - 2.11.0-12 - Modify service unit to honor user and group in config file -* Tue Dec 12 2017 Juan Orti Alcaine 2.11.0-11 +* Tue Dec 12 2017 Juan Orti Alcaine - 2.11.0-11 - Remove lrzip from config - Use weak dependencies where possible -* Sun Sep 03 2017 Juan Orti Alcaine 2.11.0-10 +* Sun Sep 03 2017 Juan Orti Alcaine - 2.11.0-10 - Remove lrzip dependency -* Fri Aug 25 2017 Juan Orti Alcaine 2.11.0-9 +* Fri Aug 25 2017 Juan Orti Alcaine - 2.11.0-9 - Disable Avast antivirus in config file (RHBZ#1480861) * Wed Jul 26 2017 Fedora Release Engineering - 2.11.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild -* Sat Jul 08 2017 Juan Orti Alcaine 2.11.0-7 +* Sat Jul 08 2017 Juan Orti Alcaine - 2.11.0-7 - PrivateDevices=true was causing problems with SELinux transitions * Fri Feb 10 2017 Fedora Release Engineering - 2.11.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild -* Wed Nov 30 2016 Juan Orti Alcaine 2.11.0-5 +* Wed Nov 30 2016 Juan Orti Alcaine - 2.11.0-5 - Drop subpackages which depend on the deprecated ZMQ::LibZMQ3 library (RHBZ#1394697) -* Thu Aug 18 2016 Juan Orti Alcaine 2.11.0-4 +* Thu Aug 18 2016 Juan Orti Alcaine - 2.11.0-4 - Add patch to fix detection of originating emails (RHBZ#1364730) -* Thu Jun 30 2016 Juan Orti Alcaine 2.11.0-3 +* Thu Jun 30 2016 Juan Orti Alcaine - 2.11.0-3 - Additional systemd hardening (RHBZ#1351354) -* Mon Jun 20 2016 Juan Orti Alcaine 2.11.0-2 +* Mon Jun 20 2016 Juan Orti Alcaine - 2.11.0-2 - Remove NoNewPrivileges from service unit (RHBZ#1346766) -* Wed Apr 27 2016 Juan Orti Alcaine 2.11.0-1 +* Wed Apr 27 2016 Juan Orti Alcaine - 2.11.0-1 - Version 2.11.0 (RHBZ#1330781) * Wed Feb 03 2016 Fedora Release Engineering - 2.10.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild -* Mon Nov 23 2015 Juan Orti Alcaine 2.10.1-6 +* Mon Nov 23 2015 Juan Orti Alcaine - 2.10.1-6 - Make clamav a weak dependency and co-own /etc/clamd.d (RHBZ#1265922) * Tue Jun 16 2015 Fedora Release Engineering - 2.10.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild -* Mon Apr 27 2015 Juan Orti Alcaine 2.10.1-4 +* Mon Apr 27 2015 Juan Orti Alcaine - 2.10.1-4 - Move amavisd socket to /var/run/amavisd -* Thu Apr 09 2015 Juan Orti Alcaine 2.10.1-3 +* Thu Apr 09 2015 Juan Orti Alcaine - 2.10.1-3 - Use license macro -* Thu Feb 26 2015 Robert Scheck 2.10.1-2 +* Thu Feb 26 2015 Robert Scheck - 2.10.1-2 - Replaced requirement to cpio by pax (upstream recommendation) -* Mon Oct 27 2014 Juan Orti Alcaine 2.10.1-1 +* Mon Oct 27 2014 Juan Orti Alcaine - 2.10.1-1 - Update to 2.10.1 - Patch5 merged upstream -* Sat Oct 25 2014 Juan Orti Alcaine 2.10.0-2 +* Sat Oct 25 2014 Juan Orti Alcaine - 2.10.0-2 - Improve conf patch to fix amavis-mc daemon - Add patch to fix imports when SQL is used -* Thu Oct 23 2014 Juan Orti Alcaine 2.10.0-1 +* Thu Oct 23 2014 Juan Orti Alcaine - 2.10.0-1 - Update to 2.10.0 - Replace IO::Socket::INET6 with IO::Socket::IP - Review perl dependencies minimum version - Add subpackages amavisd-new-zeromq and amavisd-new-snmp-zeromq -* Mon Oct 20 2014 Juan Orti Alcaine 2.10.0-0.1.rc2 +* Mon Oct 20 2014 Juan Orti Alcaine - 2.10.0-0.1.rc2 - Update to 2.10.0-rc2 -* Wed Aug 20 2014 Juan Orti Alcaine 2.9.1-3 +* Wed Aug 20 2014 Juan Orti Alcaine - 2.9.1-3 - Add ExecReload and Wants=postfix.service to systemd unit -* Sun Aug 03 2014 Juan Orti Alcaine 2.9.1-2 +* Sun Aug 03 2014 Juan Orti Alcaine - 2.9.1-2 - Add patch to fix releasing mail from sql quarantine -* Sat Jun 28 2014 Juan Orti Alcaine 2.9.1-1 +* Sat Jun 28 2014 Juan Orti Alcaine - 2.9.1-1 - New version 2.9.1 -* Fri Jun 27 2014 Juan Orti Alcaine 2.9.0-4 +* Fri Jun 27 2014 Juan Orti Alcaine - 2.9.0-4 - Change permissions of /var/spool/amavisd folders to 750. Fix bug #906396 * Sat Jun 07 2014 Fedora Release Engineering - 2.9.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild -* Mon May 12 2014 Juan Orti Alcaine 2.9.0-2 +* Mon May 12 2014 Juan Orti Alcaine - 2.9.0-2 - Service unit files hardening -* Sun May 11 2014 Juan Orti Alcaine 2.9.0-1 +* Sun May 11 2014 Juan Orti Alcaine - 2.9.0-1 - Update to version 2.9.0 - Rework amavisd-conf.patch - Enable and start timer units -* Wed Mar 19 2014 Juan Orti Alcaine 2.8.1-3 +* Wed Mar 19 2014 Juan Orti Alcaine - 2.8.1-3 - Use systemd timer units instead of cronjobs - Add PrivateDevices to service unit -* Mon Feb 17 2014 Juan Orti Alcaine 2.8.1-2 +* Mon Feb 17 2014 Juan Orti Alcaine - 2.8.1-2 - Move clamd socket to /var/run/clamd.amavisd - Add permissions to clamupdate to notify clamd -* Wed Feb 12 2014 Juan Orti Alcaine 2.8.1-1 +* Wed Feb 12 2014 Juan Orti Alcaine - 2.8.1-1 - Update to version 2.8.1 - Add systemd service units - Add missing dependencies @@ -337,7 +350,7 @@ exit 0 - Place tmpfiles conf in _tmpfilesdir - Use _localstatedir macro -* Mon Dec 02 2013 Robert Scheck 2.8.0-8 +* Mon Dec 02 2013 Robert Scheck - 2.8.0-8 - Commented ripole(1) decoder as the binary is not packaged - Commented tnef(1) decoder as the perl module is a dependency @@ -353,22 +366,22 @@ exit 0 * Wed Feb 13 2013 Fedora Release Engineering - 2.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild -* Fri Oct 19 2012 Robert Scheck 2.8.0-3 +* Fri Oct 19 2012 Robert Scheck - 2.8.0-3 - Added requirements to lrzip and unzoo for unpacking * Wed Jul 18 2012 Fedora Release Engineering - 2.8.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild -* Sun Jul 08 2012 Robert Scheck 2.8.0-1 +* Sun Jul 08 2012 Robert Scheck - 2.8.0-1 - Upgrade to 2.8.0 -* Fri Jun 29 2012 Robert Scheck 2.6.6-3 +* Fri Jun 29 2012 Robert Scheck - 2.6.6-3 - Various minor spec file cleanups * Thu Jan 12 2012 Fedora Release Engineering - 2.6.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild -* Sun Sep 18 2011 Steven Pritchard 2.6.6-1 +* Sun Sep 18 2011 Steven Pritchard - 2.6.6-1 - Update to 2.6.6. - Make /var/spool/amavisd g+x (BZ 548234). - %%ghost /var/run/amavisd and add /etc/tmpfiles.d/amavisd-new-tmpfiles.conf @@ -379,159 +392,159 @@ exit 0 * Mon Feb 07 2011 Fedora Release Engineering - 2.6.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild -* Tue Nov 9 2010 Marcela Mašláňová 2.6.4-2 +* Tue Nov 9 2010 Marcela Mašláňová - 2.6.4-2 - 561389 patch from Sandro Janke - change stderr to stdout -* Mon Aug 10 2009 Steven Pritchard 2.6.4-1 +* Mon Aug 10 2009 Steven Pritchard - 2.6.4-1 - Update to 2.6.4. - Make a snmp sub-package for amavisd-snmp-subagent. * Fri Jul 24 2009 Fedora Release Engineering - 2.6.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild -* Sun Mar 01 2009 Robert Scheck 2.6.2-3 +* Sun Mar 01 2009 Robert Scheck - 2.6.2-3 - Re-diffed amavisd-new configuration patch for no fuzz * Mon Feb 23 2009 Fedora Release Engineering - 2.6.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild -* Wed Dec 17 2008 Steven Pritchard 2.6.2-1 +* Wed Dec 17 2008 Steven Pritchard - 2.6.2-1 - Update to 2.6.2. - Drop smtpdaemon dependency (BZ# 438078). -* Tue Jul 15 2008 Steven Pritchard 2.6.1-1 +* Tue Jul 15 2008 Steven Pritchard - 2.6.1-1 - Update to 2.6.1. - Require Crypt::OpenSSL::RSA, Digest::SHA, Digest::SHA1, IO::Socket::SSL, Mail::DKIM, Net::SSLeay, NetAddr::IP, and Socket6. -* Mon Jul 14 2008 Tom "spot" Callaway 2.5.2-3 +* Mon Jul 14 2008 Tom "spot" Callaway - 2.5.2-3 - fix license tag - fix db patch to apply with fuzz=0 -* Sun Aug 12 2007 Steven Pritchard 2.5.2-2 +* Sun Aug 12 2007 Steven Pritchard - 2.5.2-2 - Fix pre/preun/post dependencies and improve scriptlets a bit. - Drop dependencies on DBD::mysql and Mail::SPF::Query. - Add dependencies on IO::Socket::INET6, Mail::SPF, and altermime. -* Sun Jul 08 2007 Steven Pritchard 2.5.2-1 +* Sun Jul 08 2007 Steven Pritchard - 2.5.2-1 - Update to 2.5.2. -* Fri Jun 22 2007 Steven Pritchard 2.5.2-0.1.rc2 +* Fri Jun 22 2007 Steven Pritchard - 2.5.2-0.1.rc2 - Update to 2.5.2-rc2. -* Fri Jun 22 2007 Steven Pritchard 2.5.1-1 +* Fri Jun 22 2007 Steven Pritchard - 2.5.1-1 - Update to 2.5.1. - Fix amavis-clamd.conf (bug #237252). - Update amavisd-conf.patch. - Require p7zip and tar. - Improve pre/preun/post scripts. -* Thu Feb 22 2007 Steven Pritchard 2.4.5-1 +* Thu Feb 22 2007 Steven Pritchard - 2.4.5-1 - Update to 2.4.5. -* Mon Dec 18 2006 Steven Pritchard 2.4.4-2 +* Mon Dec 18 2006 Steven Pritchard - 2.4.4-2 - Fix the path to amavisd.sock in amavisd-release. -* Tue Dec 05 2006 Steven Pritchard 2.4.4-1 +* Tue Dec 05 2006 Steven Pritchard - 2.4.4-1 - Update to 2.4.4. -* Fri Dec 01 2006 Steven Pritchard 2.4.3-5 +* Fri Dec 01 2006 Steven Pritchard - 2.4.3-5 - Add missing amavisd-release script. -* Tue Nov 14 2006 Steven Pritchard 2.4.3-4 +* Tue Nov 14 2006 Steven Pritchard - 2.4.3-4 - Rebuild. -* Tue Nov 14 2006 Steven Pritchard 2.4.3-3 +* Tue Nov 14 2006 Steven Pritchard - 2.4.3-3 - Add dependency on file. (#215492) -* Sat Oct 14 2006 Steven Pritchard 2.4.3-2 +* Sat Oct 14 2006 Steven Pritchard - 2.4.3-2 - Fix permissions on the cron.daily script. -* Tue Oct 10 2006 Steven Pritchard 2.4.3-1 +* Tue Oct 10 2006 Steven Pritchard - 2.4.3-1 - Update to 2.4.3. - Add quarantine directory and instructions for enabling it. - Add tmpwatch cron script. -* Thu Sep 28 2006 Steven Pritchard 2.4.2-4 +* Thu Sep 28 2006 Steven Pritchard - 2.4.2-4 - Drop lha dependency and add arj. -* Sun Sep 17 2006 Steven Pritchard 2.4.2-3 +* Sun Sep 17 2006 Steven Pritchard - 2.4.2-3 - Rebuild. -* Wed Aug 02 2006 Steven Pritchard 2.4.2-2 +* Wed Aug 02 2006 Steven Pritchard - 2.4.2-2 - Fix path to clamd socket in amavisd-conf.patch. -* Mon Jul 31 2006 Steven Pritchard 2.4.2-1 +* Mon Jul 31 2006 Steven Pritchard - 2.4.2-1 - Update to 2.4.2 - Fix permissions on README.fedora (bug #200769) -* Tue Jun 20 2006 Steven Pritchard 2.4.1-1 +* Tue Jun 20 2006 Steven Pritchard - 2.4.1-1 - Update to 2.4.1 - Drop zoo dependency due to Extras maintainer security concerns -* Tue Apr 25 2006 Steven Pritchard 2.4.0-1 +* Tue Apr 25 2006 Steven Pritchard - 2.4.0-1 - Update to 2.4.0 -* Thu Feb 02 2006 Steven Pritchard 2.3.3-5 +* Thu Feb 02 2006 Steven Pritchard - 2.3.3-5 - Add dist to Release -* Wed Sep 21 2005 Steven Pritchard 2.3.3-4 +* Wed Sep 21 2005 Steven Pritchard - 2.3.3-4 - Add TODO and amavisd.conf-* to %%doc -* Mon Sep 19 2005 Steven Pritchard 2.3.3-3 +* Mon Sep 19 2005 Steven Pritchard - 2.3.3-3 - Add amavisd-db.patch to fix the path to the db directory in amavisd-agent and amavisd-nanny. (Thanks to Julien Tognazzi.) -* Fri Sep 02 2005 Steven Pritchard 2.3.3-2 +* Fri Sep 02 2005 Steven Pritchard - 2.3.3-2 - Requires: perl(Compress::Zlib) >= 1.35 -* Thu Sep 01 2005 Steven Pritchard 2.3.3-1 +* Thu Sep 01 2005 Steven Pritchard - 2.3.3-1 - Update to 2.3.3 - Remove explicit dependencies on core perl modules -* Fri Aug 19 2005 Steven Pritchard 2.3.2-10 +* Fri Aug 19 2005 Steven Pritchard - 2.3.2-10 - Recommend using 127.0.0.1 instead of localhost in README.fedora - .deb support requires ar -* Wed Aug 17 2005 Steven Pritchard 2.3.2-9 +* Wed Aug 17 2005 Steven Pritchard - 2.3.2-9 - Set $virus_admin, $mailfrom_notify_admin, $mailfrom_notify_recip, and $mailfrom_notify_spamadmin to undef in the default config to turn off notification emails -* Fri Aug 12 2005 Steven Pritchard 2.3.2-8 +* Fri Aug 12 2005 Steven Pritchard - 2.3.2-8 - Add dependencies for freeze, lzop, nomarch, zoo, cabextract -* Wed Jul 27 2005 Steven Pritchard 2.3.2-7 +* Wed Jul 27 2005 Steven Pritchard - 2.3.2-7 - Add README.fedora with simplified Postfix instructions -* Mon Jul 25 2005 Steven Pritchard 2.3.2-6 +* Mon Jul 25 2005 Steven Pritchard - 2.3.2-6 - Create /var/spool/amavisd/db -* Thu Jul 21 2005 Steven Pritchard 2.3.2-5 +* Thu Jul 21 2005 Steven Pritchard - 2.3.2-5 - Add perl(Mail::SPF::Query) (now packaged for Extras) dependency - Drop /var/log/amavisd since we weren't using it - Fix paths for clamd.sock and amavisd.pid in a couple of places -* Tue Jul 12 2005 Steven Pritchard 2.3.2-4 +* Tue Jul 12 2005 Steven Pritchard - 2.3.2-4 - Add a bunch of other missing Requires (both actually required modules and optional modules) -* Tue Jul 12 2005 Steven Pritchard 2.3.2-3 +* Tue Jul 12 2005 Steven Pritchard - 2.3.2-3 - Add missing Requires: perl(Convert::TNEF) -* Wed Jul 06 2005 Steven Pritchard 2.3.2-2 +* Wed Jul 06 2005 Steven Pritchard - 2.3.2-2 - Fix init script ordering - Don't enable amavisd by default -* Wed Jul 06 2005 Steven Pritchard 2.3.2-1 +* Wed Jul 06 2005 Steven Pritchard - 2.3.2-1 - Update to 2.3.2 -* Wed Jun 29 2005 Steven Pritchard 2.3.2-0.1.rc1 +* Wed Jun 29 2005 Steven Pritchard - 2.3.2-0.1.rc1 - Update to 2.3.2-rc1 - Fedora Extras clamav integration - Drop amavisd-syslog.patch (Unix::Syslog is in Extras) -* Mon Feb 23 2004 Steven Pritchard 0.20030616.p7-0.fdr.0.1 +* Mon Feb 23 2004 Steven Pritchard - 0.20030616.p7-0.fdr.0.1 - Add amavisd-syslog.patch to eliminate Unix::Syslog dependency - Add in clamd helper - Fix up init script diff --git a/sources b/sources index 2e8c08d..b60fc05 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (amavisd-new-2.11.1.tar.bz2) = 06180a4efa777af2f91781ba6e3ea302041c5dd721981d960bab24cecb160c17df8a927e95df9dd7ee5ba64004b8edd3c6c0c5ef7f96fd702d1d84e4a856ea83 +SHA512 (amavis-v2.12.0.tar.bz2) = f8d2dfb6e7d694c76c0ebca7592a3c85ff9b4911cbe43b3eb6d5002541bf036adfbf47c18df4b10c72bcceee0d8701b8c474e6432c5c136ca25170e42098d844 From 262bcbd86d0730df922359fc4cdc0f19aa6b7982 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Wed, 28 Aug 2019 19:30:07 +0200 Subject: [PATCH 44/45] Drop old patches --- amavisd-condrestart.patch | 16 ---------------- amavisd-init.patch | 24 ------------------------ amavisd-new-2.8.0-init_network.patch | 13 ------------- amavisd-new.spec | 19 +++++-------------- 4 files changed, 5 insertions(+), 67 deletions(-) delete mode 100644 amavisd-condrestart.patch delete mode 100644 amavisd-init.patch delete mode 100644 amavisd-new-2.8.0-init_network.patch diff --git a/amavisd-condrestart.patch b/amavisd-condrestart.patch deleted file mode 100644 index 02cac2a..0000000 --- a/amavisd-condrestart.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- amavisd_init.sh.orig 2004-02-23 16:09:02.000000000 -0600 -+++ amavisd_init.sh 2004-02-23 16:13:52.000000000 -0600 -@@ -60,8 +60,12 @@ - action $"Reloading ${prog_base}:" ${prog} -c ${prog_config_file} reload - RETVAL=$? - ;; -+ condrestart) -+ [ -f /var/lock/subsys/${prog_base} ] && $0 restart || : -+ RETVAL=$? -+ ;; - *) -- echo "Usage: $0 {start|stop|status|restart|reload}" -+ echo "Usage: $0 {start|stop|status|restart|reload|condrestart}" - exit 1 - esac - diff --git a/amavisd-init.patch b/amavisd-init.patch deleted file mode 100644 index ff850cd..0000000 --- a/amavisd-init.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- amavisd-new-2.3.2.orig/amavisd_init.sh 2002-11-15 22:22:47.000000000 -0600 -+++ amavisd-new-2.3.2/amavisd_init.sh 2005-07-06 16:11:23.000000000 -0500 -@@ -4,10 +4,10 @@ - # (to be used with version amavisd-new-20020630 or later) - # - --# chkconfig: 2345 79 31 -+# chkconfig: - 79 31 - # description: amavisd is an interface between MTA and content checkers - # processname: amavisd --# pidfile: /var/amavis/amavisd.pid -+# pidfile: /var/run/amavisd/amavisd.pid - - # Source function library. - . /etc/rc.d/init.d/functions -@@ -19,7 +19,7 @@ - prog="/usr/sbin/amavisd" - prog_base="$(basename ${prog})" - --prog_config_file="/etc/amavisd.conf" -+prog_config_file="/etc/amavisd/amavisd.conf" - - # Source configuration. - [ -e /etc/sysconfig/${prog_base} ] && . /etc/sysconfig/${prog_base} diff --git a/amavisd-new-2.8.0-init_network.patch b/amavisd-new-2.8.0-init_network.patch deleted file mode 100644 index 8018e2c..0000000 --- a/amavisd-new-2.8.0-init_network.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- amavisd-new-2.8.0/amavisd_init.sh 2002-11-15 20:22:47.000000000 -0800 -+++ amavisd-new-2.8.0/amavisd_init.sh.new 2013-05-10 09:54:58.849116467 -0700 -@@ -12,8 +12,8 @@ - # Source function library. - . /etc/rc.d/init.d/functions - --# Source networking configuration. --. /etc/sysconfig/network -+## Source networking configuration. -+#. /etc/sysconfig/network - - #prog="/opt/amavisd-new/sbin/amavisd" - prog="/usr/sbin/amavisd" diff --git a/amavisd-new.spec b/amavisd-new.spec index bd8f868..2f7125c 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -1,7 +1,7 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new Version: 2.12.0 -Release: 1%{?dist} +Release: 2%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL URL: https://gitlab.com/amavis/amavis @@ -13,16 +13,9 @@ Source8: amavisd-new-tmpfiles.conf Source9: amavisd.service Source10: amavisd-snmp.service Patch0: amavisd-new-2.12.0-conf.patch -Patch1: amavisd-init.patch -Patch2: amavisd-condrestart.patch -# Don't source /etc/sysconfig/network in init script; the network check -# is commented out upstream so there's no apparent reason to source it, -# and it can't be relied upon to exist in recent Fedora builds. Mail -# sent upstream to amavis-users ML 2013-05-10. -adamw -Patch3: amavisd-new-2.8.0-init_network.patch BuildArch: noarch BuildRequires: perl-generators -BuildRequires: systemd +BuildRequires: systemd-rpm-macros Suggests: %{name}-doc Recommends: clamav-server-systemd Recommends: binutils @@ -86,7 +79,6 @@ Requires: perl(Time::HiRes) >= 1.49 Requires: perl(Unix::Syslog) Requires: perl(URI) Requires(pre): shadow-utils -%{?systemd_requires} Obsoletes: amavisd-new-zeromq <= 2.11.0-5 Obsoletes: amavisd-new-snmp-zeromq <= 2.11.0-5 @@ -94,7 +86,6 @@ Obsoletes: amavisd-new-snmp-zeromq <= 2.11.0-5 Summary: Exports amavisd SNMP data Requires: %{name} = %{version}-%{release} Requires: perl(NetSNMP::OID) -%{?systemd_requires} %package doc Summary: amavisd-new doc files @@ -125,9 +116,6 @@ Documentation files for amavisd-new %prep %setup -q -n amavis-v%{version} %patch0 -p1 -%patch1 -p1 -%patch2 -p0 -%patch3 -p1 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/run/amavisd/amavisd.sock,' -i amavisd-{release,submit} @@ -212,6 +200,9 @@ exit 0 %doc README_FILES test-messages amavisd.conf-* amavisd-custom.conf %changelog +* Wed Aug 28 2019 Juan Orti Alcaine - 2.12.0-2 +- Drop old patches + * Thu Aug 01 2019 Juan Orti Alcaine - 2.12.0-1 - Version 2.12.0 - Update patches From 35169fbdd48a879cf5ff37c3091f465c6a22319b Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Thu, 10 Oct 2019 08:01:40 +0200 Subject: [PATCH 45/45] Renamed to amavis --- .gitignore | 10 - README.fedora | 65 --- README.quarantine | 24 - amavis-clamd.conf | 20 - amavisd-new-2.12.0-conf.patch | 213 ------- ...9.1-release_mail_from_sql_quarantine.patch | 51 -- amavisd-new-tmpfiles.conf | 6 - amavisd-new.spec | 542 ------------------ amavisd-snmp.service | 18 - amavisd.service | 19 - dead.package | 1 + sources | 1 - 12 files changed, 1 insertion(+), 969 deletions(-) delete mode 100644 .gitignore delete mode 100644 README.fedora delete mode 100644 README.quarantine delete mode 100644 amavis-clamd.conf delete mode 100644 amavisd-new-2.12.0-conf.patch delete mode 100644 amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch delete mode 100644 amavisd-new-tmpfiles.conf delete mode 100644 amavisd-new.spec delete mode 100644 amavisd-snmp.service delete mode 100644 amavisd.service create mode 100644 dead.package delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 89f0d06..0000000 --- a/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -amavisd-new-2.8.0.tar.gz -/amavisd-new-2.8.1.tar.gz -/amavisd-new-2.9.0.tar.xz -/amavisd-new-2.9.1.tar.xz -/amavisd-new-2.10.0-rc2.tar.xz -/amavisd-new-2.10.0.tar.xz -/amavisd-new-2.10.1.tar.xz -/amavisd-new-2.11.0.tar.xz -/amavisd-new-2.11.1.tar.bz2 -/amavis-v2.12.0.tar.bz2 diff --git a/README.fedora b/README.fedora deleted file mode 100644 index 34ce8c5..0000000 --- a/README.fedora +++ /dev/null @@ -1,65 +0,0 @@ -INSTALLATION ------------- -Installing amavisd-new from Fedora is simple. First, install the -amavisd-new package: - - yum -y install amavisd-new - -Don't be alarmed at the number of dependencies this installs. This -package tries to be as full-featured as possible, including many -optional components for amavisd-new. - -Next, configure amavisd-new to start on boot: - - systemctl enable amavisd.service - -When you are ready, start the amavisd service, it will also start -a clamd instance if available. - - systemctl start amavisd.service - -Check /var/log/maillog for startup messages of amavisd and clamd. -You can also check the journal. - - journalctl -a -u amavisd -u clamd@amavisd - -The next step is to integrate amavisd with your MTA. - -POSTFIX -------- -The simplest method for enabling amavisd-new support in postfix is to -use the content_filter configuration option to tell postfix to relay -mail through amavisd-new using SMTP. In this configuration, incoming -mail passes from postfix to amavisd and back to postfix. (Mail never -actually leaves the control of postfix however, since amavisd does not -answer OK until it scans the message and transfers it back to postfix. -The worst that can happen is a failure at just the right time could -allow a message to be queued twice.) - -Add the following to /etc/postfix/main.cf: - - content_filter = smtp:[127.0.0.1]:10024 - -You will probably also want to limit the number of postfix processes -to keep mail from coming in faster than it can be processed by adding -the following to /etc/postfix/main.cf: - - default_process_limit = 20 - -Add the following to /etc/postfix/master.cf: - - 127.0.0.1:10025 inet n - - - 0 smtpd -o content_filter= - -Be sure to read the TUNING section in README.postfix for information -on process limits. - -SENDMAIL --------- -See README.sendmail* in this directory. - -Please note that amavisd-new's milter functionality is not enabled in -this package. - -EXIM ----- -See README.exim* in this directory. diff --git a/README.quarantine b/README.quarantine deleted file mode 100644 index 21d805e..0000000 --- a/README.quarantine +++ /dev/null @@ -1,24 +0,0 @@ -To enable quarantine support simply change the following line in -/etc/amavisd/amavisd.conf: - - $QUARANTINEDIR = undef; # -Q - -to - - $QUARANTINEDIR = "$MYHOME/quarantine"; # -Q - -then restart amavisd. - -The following will make the change for you: - - sed -i.orig -e '/\$QUARANTINEDIR =/s,undef,"$MYHOME/quarantine",' \ - /etc/amavisd/amavisd.conf - -PLEASE NOTE: This is intentionally a manual step. Before turning on -the quarantine feature of amavisd-new, be sure that there is a -sufficient amount of free space on /var/spool/amavisd/quarantine. -"Sufficient" depends entirely on your environment. - -In the default configuration, files in the quarantine directory will -be automatically deleted by tmpwatch after 30 days. See -/etc/cron.daily/amavisd to adjust this behavior for your environment. diff --git a/amavis-clamd.conf b/amavis-clamd.conf deleted file mode 100644 index a84b8ef..0000000 --- a/amavis-clamd.conf +++ /dev/null @@ -1,20 +0,0 @@ -# Use system logger. -LogSyslog yes - -# Specify the type of syslog messages - please refer to 'man syslog' -# for facility names. -LogFacility LOG_MAIL - -# This option allows you to save a process identifier of the listening -# daemon (main thread). -PidFile /var/run/clamd.amavisd/clamd.pid - -# Remove stale socket after unclean shutdown. -# Default: disabled -FixStaleSocket yes - -# Run as a selected user (clamd must be started by root). -User amavis - -# Path to a local socket file the daemon will listen on. -LocalSocket /var/run/clamd.amavisd/clamd.sock diff --git a/amavisd-new-2.12.0-conf.patch b/amavisd-new-2.12.0-conf.patch deleted file mode 100644 index e2ce636..0000000 --- a/amavisd-new-2.12.0-conf.patch +++ /dev/null @@ -1,213 +0,0 @@ -From f697a6d1cfe2499751157748a420994635e4ce68 Mon Sep 17 00:00:00 2001 -From: Juan Orti Alcaine -Date: Thu, 1 Aug 2019 12:40:43 +0200 -Subject: [PATCH] Fedora configuration modifications - ---- - amavis-mc | 6 ++--- - amavisd-agent | 2 +- - amavisd-nanny | 2 +- - amavisd-signer | 4 ++-- - amavisd.conf | 64 +++++++++++++++++++++++++------------------------- - 5 files changed, 39 insertions(+), 39 deletions(-) - -diff --git a/amavis-mc b/amavis-mc -index 88d9701..f6f8081 100755 ---- a/amavis-mc -+++ b/amavis-mc -@@ -70,10 +70,10 @@ use vars qw(@path @services $daemon_user $daemon_group $pid_file $log_level - - ### USER CONFIGURABLE: - --$daemon_user = 'vscan'; --$daemon_group = 'vscan'; -+$daemon_user = 'amavis'; -+$daemon_group = 'amavis'; - --$pid_file = '/var/amavis/amavis-mc.pid'; -+$pid_file = '/var/run/amavisd/amavis-mc.pid'; - - $log_level = 0; - $syslog_ident = 'amavis-mc'; -diff --git a/amavisd-agent b/amavisd-agent -index 1ebe2bb..b8271a3 100755 ---- a/amavisd-agent -+++ b/amavisd-agent -@@ -53,7 +53,7 @@ use BerkeleyDB; - - my($dbfile) = 'snmp.db'; - my($db_home) = # DB databases directory -- defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/amavis/db'; -+ defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/spool/amavisd/db'; - - my($wakeuptime) = 10; # -w, sleep time in seconds, may be fractional - my($repeatcount); # -c, repeat count (when defined) -diff --git a/amavisd-nanny b/amavisd-nanny -index 80b84dc..164549f 100755 ---- a/amavisd-nanny -+++ b/amavisd-nanny -@@ -61,7 +61,7 @@ my($activettl) = 10*60; # stuck active children are sent a SIGTERM - - my($dbfile) = 'nanny.db'; - my($db_home) = # DB databases directory -- defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/amavis/db'; -+ defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/spool/amavisd/db'; - my($wakeuptime) = 2; # -w, sleep time in seconds, may be fractional - my($repeatcount); # -c, repeat count (when defined) - -diff --git a/amavisd-signer b/amavisd-signer -index f154646..3042b7c 100755 ---- a/amavisd-signer -+++ b/amavisd-signer -@@ -86,8 +86,8 @@ $VERSION = 1.001; # 20100730 - # Please adjust the following settings as necessary: - # - --$daemon_user = 'vscan'; --$daemon_group = 'vscan'; -+$daemon_user = 'amavis'; -+$daemon_group = 'amavis'; - # $daemon_chroot_dir = '/var/amavis'; # chroot directory or undef - - # $daemonize = 1; -diff --git a/amavisd.conf b/amavisd.conf -index bb562e6..f2e0e40 100644 ---- a/amavisd.conf -+++ b/amavisd.conf -@@ -17,25 +17,25 @@ use strict; - # truncation in /proc//stat and ps -e output - - $max_servers = 2; # num of pre-forked children (2..30 is common), -m --$daemon_user = 'vscan'; # (no default; customary: vscan or amavis), -u --$daemon_group = 'vscan'; # (no default; customary: vscan or amavis), -g -+$daemon_user = 'amavis'; # (no default; customary: vscan or amavis), -u -+$daemon_group = 'amavis'; # (no default; customary: vscan or amavis), -g - - $mydomain = 'example.com'; # a convenient default for other settings - --# $MYHOME = '/var/amavis'; # a convenient default for other settings, -H -+$MYHOME = '/var/spool/amavisd'; # a convenient default for other settings, -H - $TEMPBASE = "$MYHOME/tmp"; # working directory, needs to exist, -T - $ENV{TMPDIR} = $TEMPBASE; # environment variable TMPDIR, used by SA, etc. --$QUARANTINEDIR = '/var/virusmails'; # -Q -+$QUARANTINEDIR = undef; # -Q - # $quarantine_subdir_levels = 1; # add level of subdirs to disperse quarantine - # $release_format = 'resend'; # 'attach', 'plain', 'resend' - # $report_format = 'arf'; # 'attach', 'plain', 'resend', 'arf' - - # $daemon_chroot_dir = $MYHOME; # chroot directory or undef, -R - --# $db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D -+$db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D - # $helpers_home = "$MYHOME/var"; # working directory for SpamAssassin, -S --# $lock_file = "$MYHOME/var/amavisd.lock"; # -L --# $pid_file = "$MYHOME/var/amavisd.pid"; # -P -+$lock_file = "/var/run/amavisd/amavisd.lock"; # -L -+$pid_file = "/var/run/amavisd/amavisd.pid"; # -P - #NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually - - $log_level = 0; # verbosity 0..5, -d -@@ -55,7 +55,7 @@ $enable_dkim_signing = 1; # load DKIM signing code, keys defined by dkim_key - @mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10 - 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 ); - --$unix_socketname = "$MYHOME/amavisd.sock"; # amavisd-release or amavis-milter -+$unix_socketname = "/var/run/amavisd/amavisd.sock"; # amavisd-release or amavis-milter - # option(s) -p overrides $inet_socket_port and $unix_socketname - - $inet_socket_port = 10024; # listen on this local TCP port(s) -@@ -119,11 +119,11 @@ $sa_local_tests_only = 0; # only tests which do not require internet access? - # $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP; - # defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16) - --$virus_admin = "virusalert\@$mydomain"; # notifications recip. -+$virus_admin = undef; # notifications recip. - --$mailfrom_notify_admin = "virusalert\@$mydomain"; # notifications sender --$mailfrom_notify_recip = "virusalert\@$mydomain"; # notifications sender --$mailfrom_notify_spamadmin = "spam.police\@$mydomain"; # notifications sender -+$mailfrom_notify_admin = undef; # notifications sender -+$mailfrom_notify_recip = undef; # notifications sender -+$mailfrom_notify_spamadmin = undef; # notifications sender - $mailfrom_to_quarantine = ''; # null return path; uses original sender if undef - - @addr_extension_virus_maps = ('virus'); -@@ -157,10 +157,10 @@ $defang_by_ccat{CC_BADH.",6"} = 1; # header field syntax error - # $notify_method = 'smtp:[127.0.0.1]:10025'; - # $forward_method = 'smtp:[127.0.0.1]:10025'; # set to undef with milter! - --# $final_virus_destiny = D_DISCARD; --# $final_banned_destiny = D_DISCARD; --# $final_spam_destiny = D_PASS; #!!! D_DISCARD / D_REJECT --# $final_bad_header_destiny = D_PASS; -+$final_virus_destiny = D_DISCARD; -+$final_banned_destiny = D_BOUNCE; -+$final_spam_destiny = D_DISCARD; #!!! D_DISCARD / D_REJECT -+$final_bad_header_destiny = D_BOUNCE; - # $bad_header_quarantine_method = undef; - - # $os_fingerprint_method = 'p0f:*:2345'; # to query p0f-analyzer.pl -@@ -329,8 +329,8 @@ $banned_filename_re = new_RE( - ['lzma', \&do_uncompress, - ['lzmadec', 'xz -dc --format=lzma', - 'lzma -dc', 'unlzma -c', 'lzcat', 'lzmadec'] ], -- ['lrz', \&do_uncompress, -- ['lrzip -q -k -d -o -', 'lrzcat -q -k'] ], -+# ['lrz', \&do_uncompress, -+# ['lrzip -q -k -d -o -', 'lrzcat -q -k'] ], - ['lzo', \&do_uncompress, 'lzop -d'], - ['lz4', \&do_uncompress, ['lz4c -d'] ], - ['rpm', \&do_uncompress, ['rpm2cpio.pl', 'rpm2cpio'] ], -@@ -342,9 +342,9 @@ $banned_filename_re = new_RE( - ['arj', \&do_unarj, ['unarj', 'arj'] ], - ['arc', \&do_arc, ['nomarch', 'arc'] ], - ['zoo', \&do_zoo, ['zoo', 'unzoo'] ], -- ['doc', \&do_ole, 'ripole'], -+# ['doc', \&do_ole, 'ripole'], # no ripole package so far - ['cab', \&do_cabextract, 'cabextract'], -- ['tnef', \&do_tnef_ext, 'tnef'], -+# ['tnef', \&do_tnef_ext, 'tnef'], # use internal do_tnef() instead - ['tnef', \&do_tnef], - # ['lha', \&do_lha, 'lha'], # not safe, use 7z instead - # ['sit', \&do_unstuff, 'unstuff'], # not safe -@@ -382,16 +382,16 @@ $banned_filename_re = new_RE( - # qr/^(?:310|420)[,\s]*(?:.* <<< )?(.+?)(?: ; |$)/m ], - # 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 ], --# # 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; --# # NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in --# # this entry; when running chrooted one may prefer a socket under $MYHOME. -+ ### http://www.clamav.net/ -+ ['ClamAV-clamd', -+ \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamd.amavisd/clamd.sock"], -+ 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; -+ # NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in -+ # this entry; when running chrooted one may prefer a socket under $MYHOME. - - # ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred) - # # note that Mail::ClamAV requires perl to be build with threading! -@@ -701,8 +701,8 @@ $banned_filename_re = new_RE( - # ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'], - # '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/m ], - -- ### http://www.avast.com/ -- ['avast! Antivirus', '/bin/scan', '{}', [0], [1], qr/\t(.+)/m ], -+# ### http://www.avast.com/ -+# ['avast! Antivirus', '/bin/scan', '{}', [0], [1], qr/\t(.+)/m ], - - ### http://www.ikarus-software.com/ - ['Ikarus AntiVirus for Linux', 'ikarus', --- -2.21.0 - diff --git a/amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch b/amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch deleted file mode 100644 index fe5fc04..0000000 --- a/amavisd-new-2.9.1-release_mail_from_sql_quarantine.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/amavisd b/amavisd -index f721756..2a2c418 100755 ---- a/amavisd -+++ b/amavisd -@@ -20208,7 +20208,7 @@ sub preprocess_policy_query($$) { - new_am_id('rel-'.$msginfo->mail_id) if $releasing; - if ($releasing && $quar_type eq 'Q') { # releasing from SQL - do_log(5, "preprocess_policy_query: opening in sql: %s", -- $msginfo->mail_id); -+ $msginfo->parent_mail_id); - my $obj = $Amavis::sql_storage; - $Amavis::extra_code_sql_quar && $obj - or die "SQL quarantine code not enabled (3)"; -@@ -20218,31 +20218,31 @@ sub preprocess_policy_query($$) { - if (!defined($msginfo->partition_tag) && - defined($sel_msg) && $sel_msg ne '') { - do_log(5, "preprocess_policy_query: missing partition_tag in request,". -- " fetching msgs record for mail_id=%s", $msginfo->mail_id); -+ " fetching msgs record for mail_id=%s", $msginfo->parent_mail_id); - # find a corresponding partition_tag if missing from a release request - $conn_h->begin_work_nontransaction; #(re)connect if necessary -- $conn_h->execute($sel_msg, untaint($msginfo->mail_id)); -+ $conn_h->execute($sel_msg, untaint($msginfo->parent_mail_id)); - my $a_ref; my $cnt = 0; my $partition_tag; - while ( defined($a_ref=$conn_h->fetchrow_arrayref($sel_msg)) ) { - $cnt++; - $partition_tag = $a_ref->[0] if !defined $partition_tag; - ll(5) && do_log(5, "release: got msgs record for mail_id=%s: %s", -- $msginfo->mail_id, join(', ',@$a_ref)); -+ $msginfo->parent_mail_id, join(', ',@$a_ref)); - } - $conn_h->finish($sel_msg) if defined $a_ref; # only if not all read - $cnt <= 1 or die "Multiple ($cnt) records with same mail_id exist, ". - "specify a partition_tag in the AM.PDP request"; - if ($cnt < 1) { - do_log(0, "release: no records with msgs.mail_id=%s in a database, ". -- "trying to read from a quar. anyway", $msginfo->mail_id); -+ "trying to read from a quar. anyway", $msginfo->parent_mail_id); - } - $msginfo->partition_tag($partition_tag); # could still be undef/NULL ! - } - ll(5) && do_log(5, "release: opening mail_id=%s, partition_tag=%s", -- $msginfo->mail_id, $msginfo->partition_tag); -+ $msginfo->parent_mail_id, $msginfo->partition_tag); - $conn_h->begin_work_nontransaction; # (re)connect if not connected - $fh = Amavis::IO::SQL->new; -- $fh->open($conn_h, $sel_quar, untaint($msginfo->mail_id), -+ $fh->open($conn_h, $sel_quar, untaint($msginfo->parent_mail_id), - 'r', untaint($msginfo->partition_tag)) - or die "Can't open sql obj for reading: $!"; 1; - } else { # mail checking or releasing from a file diff --git a/amavisd-new-tmpfiles.conf b/amavisd-new-tmpfiles.conf deleted file mode 100644 index 3a935b3..0000000 --- a/amavisd-new-tmpfiles.conf +++ /dev/null @@ -1,6 +0,0 @@ -d /var/run/amavisd 755 amavis amavis - -d /var/run/clamd.amavisd 770 amavis clamupdate - - -# Directory cleanup -d /var/spool/amavisd/quarantine 750 amavis amavis 30d -d /var/spool/amavisd/tmp 750 amavis amavis 1d diff --git a/amavisd-new.spec b/amavisd-new.spec deleted file mode 100644 index 2f7125c..0000000 --- a/amavisd-new.spec +++ /dev/null @@ -1,542 +0,0 @@ -Summary: Email filter with virus scanner and spamassassin support -Name: amavisd-new -Version: 2.12.0 -Release: 2%{?dist} -# LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ -License: GPLv2+ and BSD and GFDL -URL: https://gitlab.com/amavis/amavis -Source0: https://gitlab.com/amavis/amavis/-/archive/v%{version}/amavis-v%{version}.tar.bz2 -Source2: amavis-clamd.conf -Source4: README.fedora -Source5: README.quarantine -Source8: amavisd-new-tmpfiles.conf -Source9: amavisd.service -Source10: amavisd-snmp.service -Patch0: amavisd-new-2.12.0-conf.patch -BuildArch: noarch -BuildRequires: perl-generators -BuildRequires: systemd-rpm-macros -Suggests: %{name}-doc -Recommends: clamav-server-systemd -Recommends: binutils -Requires: altermime -Recommends: arj -Recommends: bzip2 -Recommends: cabextract -Recommends: pax -Requires: file -Recommends: freeze -Recommends: gzip -Recommends: lzop -Recommends: nomarch -Recommends: p7zip, p7zip-plugins -Recommends: tar -Recommends: unzoo -# We probably should parse the fetch_modules() code in amavisd for this list. -# These are just the dependencies that don't get picked up otherwise. -Requires: perl(Archive::Tar) -Requires: perl(Archive::Zip) >= 1.14 -Requires: perl(Authen::SASL) -Requires: perl(Compress::Zlib) >= 1.35 -Requires: perl(Compress::Raw::Zlib) >= 2.017 -Requires: perl(Convert::TNEF) -Requires: perl(Convert::UUlib) -Requires: perl(Crypt::OpenSSL::RSA) -Recommends: perl(DBD::SQLite) -Recommends: perl(DBI) -Requires: perl(Digest::MD5) >= 2.22 -Requires: perl(Digest::SHA) -Requires: perl(Digest::SHA1) -Requires: perl(File::LibMagic) -Requires: perl(IO::Socket::IP) -Requires: perl(IO::Socket::SSL) -Requires: perl(IO::Stringy) -Requires: perl(MIME::Base64) -Requires: perl(MIME::Body) -Requires: perl(MIME::Decoder::Base64) -Requires: perl(MIME::Decoder::Binary) -Requires: perl(MIME::Decoder::Gzip64) -Requires: perl(MIME::Decoder::NBit) -Requires: perl(MIME::Decoder::QuotedPrint) -Requires: perl(MIME::Decoder::UU) -Requires: perl(MIME::Head) -Requires: perl(MIME::Parser) -Requires: perl(Mail::DKIM) >= 0.31 -Requires: perl(Mail::Field) -Requires: perl(Mail::Header) -Requires: perl(Mail::Internet) >= 1.58 -Requires: perl(Mail::SPF) -Recommends: perl(Mail::SpamAssassin) -Requires: perl(Net::DNS) -Recommends: perl(Net::LDAP) -Requires: perl(Net::LibIDN) -Requires: perl(Net::SSLeay) -Requires: perl(Net::Server) >= 2.0 -Requires: perl(NetAddr::IP) -Requires: perl(Razor2::Client::Version) -Requires: perl(Socket6) -Requires: perl(Time::HiRes) >= 1.49 -Requires: perl(Unix::Syslog) -Requires: perl(URI) -Requires(pre): shadow-utils -Obsoletes: amavisd-new-zeromq <= 2.11.0-5 -Obsoletes: amavisd-new-snmp-zeromq <= 2.11.0-5 - -%package snmp -Summary: Exports amavisd SNMP data -Requires: %{name} = %{version}-%{release} -Requires: perl(NetSNMP::OID) - -%package doc -Summary: amavisd-new doc files - -%description -amavisd-new is a high-performance and reliable interface between mailer -(MTA) and one or more content checkers: virus scanners, and/or -Mail::SpamAssassin Perl module. It is written in Perl, assuring high -reliability, portability and maintainability. It talks to MTA via (E)SMTP -or LMTP, or by using helper programs. No timing gaps exist in the design -which could cause a mail loss. - -%description snmp -This package contains the program amavisd-snmp-subagent, which can be -used as a SNMP AgentX, exporting amavisd statistical counters database -(snmp.db) as well as a child process status database (nanny.db) to a -SNMP daemon supporting the AgentX protocol (RFC 2741), such as NET-SNMP. - -It is similar to combined existing utility programs amavisd-agent and -amavisd-nanny, but instead of writing results as text to stdout, it -exports data to a SNMP server running on a host (same or remote), making -them available to SNMP clients (such a Cacti or mrtg) for monitoring or -alerting purposes. - -%description doc -Documentation files for amavisd-new - -%prep -%setup -q -n amavis-v%{version} -%patch0 -p1 - -install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ -sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/run/amavisd/amavisd.sock,' -i amavisd-{release,submit} - -%build - -%install -rm -rf $RPM_BUILD_ROOT - -install -D -p -m 755 amavisd $RPM_BUILD_ROOT%{_sbindir}/amavisd -install -D -p -m 755 amavisd-snmp-subagent $RPM_BUILD_ROOT%{_sbindir}/amavisd-snmp-subagent - -mkdir -p $RPM_BUILD_ROOT%{_bindir} -install -p -m 755 amavisd-{agent,nanny,release,signer,submit} $RPM_BUILD_ROOT%{_bindir}/ - -install -D -p -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_unitdir}/amavisd.service -install -D -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}/amavisd-snmp.service - -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d -install -D -p -m 644 amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavisd/amavisd.conf -install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.conf - -mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/amavisd/{tmp,db,quarantine} -mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/{clamd.amavisd,amavisd} - -install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_tmpfilesdir}/amavisd-new.conf - -%pre -getent group amavis > /dev/null || %{_sbindir}/groupadd -r amavis -getent passwd amavis > /dev/null || \ - %{_sbindir}/useradd -r -g amavis -d %{_localstatedir}/spool/amavisd -s /sbin/nologin \ - -c "User for amavisd-new" amavis -exit 0 - -%preun -%systemd_preun amavisd.service - -%preun snmp -%systemd_preun amavisd-snmp.service - -%post -%systemd_post amavisd.service - -%post snmp -%systemd_post amavisd-snmp.service - -%postun -%systemd_postun_with_restart amavisd.service - -%postun snmp -%systemd_postun_with_restart amavisd-snmp.service - -%files -%license LICENSE -%dir %{_sysconfdir}/amavisd/ -%{_unitdir}/amavisd.service -%dir %{_sysconfdir}/clamd.d -%config(noreplace) %{_sysconfdir}/amavisd/amavisd.conf -%config(noreplace) %{_sysconfdir}/clamd.d/amavisd.conf -%{_sbindir}/amavisd -%{_bindir}/amavisd-agent -%{_bindir}/amavisd-nanny -%{_bindir}/amavisd-release -%{_bindir}/amavisd-signer -%{_bindir}/amavisd-submit -%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd -%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/tmp -%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/db -%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine -%{_tmpfilesdir}/amavisd-new.conf -%dir %attr(755,amavis,amavis) %{_localstatedir}/run/amavisd -%dir %attr(770,amavis,clamupdate) %{_localstatedir}/run/clamd.amavisd - -%files snmp -%doc AMAVIS-MIB.txt -%{_unitdir}/amavisd-snmp.service -%{_sbindir}/amavisd-snmp-subagent - -%files doc -%license LICENSE -%doc AAAREADME.first LDAP.schema LDAP.ldif RELEASE_NOTES TODO INSTALL -%doc README_FILES test-messages amavisd.conf-* amavisd-custom.conf - -%changelog -* Wed Aug 28 2019 Juan Orti Alcaine - 2.12.0-2 -- Drop old patches - -* Thu Aug 01 2019 Juan Orti Alcaine - 2.12.0-1 -- Version 2.12.0 -- Update patches -- Update project URL -- Create doc subpackage - -* Wed Jul 24 2019 Fedora Release Engineering - 2.11.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat Feb 16 2019 Juan Orti Alcaine - 2.11.1-3 -- Drop tmpwatch dependency and use tmpfiles for directory cleanup - -* Thu Jan 31 2019 Fedora Release Engineering - 2.11.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Oct 12 2018 Juan Orti Alcaine - 2.11.1-1 -- Version 2.11.1 - -* Thu Jul 12 2018 Fedora Release Engineering - 2.11.0-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Sat Mar 03 2018 Marcel Haerry - 2.11.0-14 -- Fix socket path for amavisd tools (RHBZ#1551203) - -* Wed Feb 07 2018 Fedora Release Engineering - 2.11.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Dec 12 2017 Juan Orti Alcaine - 2.11.0-12 -- Modify service unit to honor user and group in config file - -* Tue Dec 12 2017 Juan Orti Alcaine - 2.11.0-11 -- Remove lrzip from config -- Use weak dependencies where possible - -* Sun Sep 03 2017 Juan Orti Alcaine - 2.11.0-10 -- Remove lrzip dependency - -* Fri Aug 25 2017 Juan Orti Alcaine - 2.11.0-9 -- Disable Avast antivirus in config file (RHBZ#1480861) - -* Wed Jul 26 2017 Fedora Release Engineering - 2.11.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Jul 08 2017 Juan Orti Alcaine - 2.11.0-7 -- PrivateDevices=true was causing problems with SELinux transitions - -* Fri Feb 10 2017 Fedora Release Engineering - 2.11.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Nov 30 2016 Juan Orti Alcaine - 2.11.0-5 -- Drop subpackages which depend on the deprecated ZMQ::LibZMQ3 library (RHBZ#1394697) - -* Thu Aug 18 2016 Juan Orti Alcaine - 2.11.0-4 -- Add patch to fix detection of originating emails (RHBZ#1364730) - -* Thu Jun 30 2016 Juan Orti Alcaine - 2.11.0-3 -- Additional systemd hardening (RHBZ#1351354) - -* Mon Jun 20 2016 Juan Orti Alcaine - 2.11.0-2 -- Remove NoNewPrivileges from service unit (RHBZ#1346766) - -* Wed Apr 27 2016 Juan Orti Alcaine - 2.11.0-1 -- Version 2.11.0 (RHBZ#1330781) - -* Wed Feb 03 2016 Fedora Release Engineering - 2.10.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Nov 23 2015 Juan Orti Alcaine - 2.10.1-6 -- Make clamav a weak dependency and co-own /etc/clamd.d (RHBZ#1265922) - -* Tue Jun 16 2015 Fedora Release Engineering - 2.10.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon Apr 27 2015 Juan Orti Alcaine - 2.10.1-4 -- Move amavisd socket to /var/run/amavisd - -* Thu Apr 09 2015 Juan Orti Alcaine - 2.10.1-3 -- Use license macro - -* Thu Feb 26 2015 Robert Scheck - 2.10.1-2 -- Replaced requirement to cpio by pax (upstream recommendation) - -* Mon Oct 27 2014 Juan Orti Alcaine - 2.10.1-1 -- Update to 2.10.1 -- Patch5 merged upstream - -* Sat Oct 25 2014 Juan Orti Alcaine - 2.10.0-2 -- Improve conf patch to fix amavis-mc daemon -- Add patch to fix imports when SQL is used - -* Thu Oct 23 2014 Juan Orti Alcaine - 2.10.0-1 -- Update to 2.10.0 -- Replace IO::Socket::INET6 with IO::Socket::IP -- Review perl dependencies minimum version -- Add subpackages amavisd-new-zeromq and amavisd-new-snmp-zeromq - -* Mon Oct 20 2014 Juan Orti Alcaine - 2.10.0-0.1.rc2 -- Update to 2.10.0-rc2 - -* Wed Aug 20 2014 Juan Orti Alcaine - 2.9.1-3 -- Add ExecReload and Wants=postfix.service to systemd unit - -* Sun Aug 03 2014 Juan Orti Alcaine - 2.9.1-2 -- Add patch to fix releasing mail from sql quarantine - -* Sat Jun 28 2014 Juan Orti Alcaine - 2.9.1-1 -- New version 2.9.1 - -* Fri Jun 27 2014 Juan Orti Alcaine - 2.9.0-4 -- Change permissions of /var/spool/amavisd folders to 750. Fix bug #906396 - -* Sat Jun 07 2014 Fedora Release Engineering - 2.9.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Mon May 12 2014 Juan Orti Alcaine - 2.9.0-2 -- Service unit files hardening - -* Sun May 11 2014 Juan Orti Alcaine - 2.9.0-1 -- Update to version 2.9.0 -- Rework amavisd-conf.patch -- Enable and start timer units - -* Wed Mar 19 2014 Juan Orti Alcaine - 2.8.1-3 -- Use systemd timer units instead of cronjobs -- Add PrivateDevices to service unit - -* Mon Feb 17 2014 Juan Orti Alcaine - 2.8.1-2 -- Move clamd socket to /var/run/clamd.amavisd -- Add permissions to clamupdate to notify clamd - -* Wed Feb 12 2014 Juan Orti Alcaine - 2.8.1-1 -- Update to version 2.8.1 -- Add systemd service units -- Add missing dependencies -- Start clamd using instantiated service -- Place tmpfiles conf in _tmpfilesdir -- Use _localstatedir macro - -* Mon Dec 02 2013 Robert Scheck - 2.8.0-8 -- Commented ripole(1) decoder as the binary is not packaged -- Commented tnef(1) decoder as the perl module is a dependency - -* Sat Aug 03 2013 Fedora Release Engineering - 2.8.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Jul 18 2013 Petr Pisar - 2.8.0-6 -- Perl 5.18 rebuild - -* Fri May 10 2013 Adam Williamson - 2.8.0-5 -- init_network.patch: don't source /etc/sysconfig/network in initscript - -* Wed Feb 13 2013 Fedora Release Engineering - 2.8.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Fri Oct 19 2012 Robert Scheck - 2.8.0-3 -- Added requirements to lrzip and unzoo for unpacking - -* Wed Jul 18 2012 Fedora Release Engineering - 2.8.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sun Jul 08 2012 Robert Scheck - 2.8.0-1 -- Upgrade to 2.8.0 - -* Fri Jun 29 2012 Robert Scheck - 2.6.6-3 -- Various minor spec file cleanups - -* Thu Jan 12 2012 Fedora Release Engineering - 2.6.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Sun Sep 18 2011 Steven Pritchard - 2.6.6-1 -- Update to 2.6.6. -- Make /var/spool/amavisd g+x (BZ 548234). -- %%ghost /var/run/amavisd and add /etc/tmpfiles.d/amavisd-new-tmpfiles.conf - (BZ 656544, 676430, 710984, 734271). -- Also add /var/run/clamd.amavisd (which seems to be a bug itself). Fixes - BZ 696725. - -* Mon Feb 07 2011 Fedora Release Engineering - 2.6.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Nov 9 2010 Marcela Mašláňová - 2.6.4-2 -- 561389 patch from Sandro Janke - change stderr to stdout - -* Mon Aug 10 2009 Steven Pritchard - 2.6.4-1 -- Update to 2.6.4. -- Make a snmp sub-package for amavisd-snmp-subagent. - -* Fri Jul 24 2009 Fedora Release Engineering - 2.6.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Sun Mar 01 2009 Robert Scheck - 2.6.2-3 -- Re-diffed amavisd-new configuration patch for no fuzz - -* Mon Feb 23 2009 Fedora Release Engineering - 2.6.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Dec 17 2008 Steven Pritchard - 2.6.2-1 -- Update to 2.6.2. -- Drop smtpdaemon dependency (BZ# 438078). - -* Tue Jul 15 2008 Steven Pritchard - 2.6.1-1 -- Update to 2.6.1. -- Require Crypt::OpenSSL::RSA, Digest::SHA, Digest::SHA1, IO::Socket::SSL, - Mail::DKIM, Net::SSLeay, NetAddr::IP, and Socket6. - -* Mon Jul 14 2008 Tom "spot" Callaway - 2.5.2-3 -- fix license tag -- fix db patch to apply with fuzz=0 - -* Sun Aug 12 2007 Steven Pritchard - 2.5.2-2 -- Fix pre/preun/post dependencies and improve scriptlets a bit. -- Drop dependencies on DBD::mysql and Mail::SPF::Query. -- Add dependencies on IO::Socket::INET6, Mail::SPF, and altermime. - -* Sun Jul 08 2007 Steven Pritchard - 2.5.2-1 -- Update to 2.5.2. - -* Fri Jun 22 2007 Steven Pritchard - 2.5.2-0.1.rc2 -- Update to 2.5.2-rc2. - -* Fri Jun 22 2007 Steven Pritchard - 2.5.1-1 -- Update to 2.5.1. -- Fix amavis-clamd.conf (bug #237252). -- Update amavisd-conf.patch. -- Require p7zip and tar. -- Improve pre/preun/post scripts. - -* Thu Feb 22 2007 Steven Pritchard - 2.4.5-1 -- Update to 2.4.5. - -* Mon Dec 18 2006 Steven Pritchard - 2.4.4-2 -- Fix the path to amavisd.sock in amavisd-release. - -* Tue Dec 05 2006 Steven Pritchard - 2.4.4-1 -- Update to 2.4.4. - -* Fri Dec 01 2006 Steven Pritchard - 2.4.3-5 -- Add missing amavisd-release script. - -* Tue Nov 14 2006 Steven Pritchard - 2.4.3-4 -- Rebuild. - -* Tue Nov 14 2006 Steven Pritchard - 2.4.3-3 -- Add dependency on file. (#215492) - -* Sat Oct 14 2006 Steven Pritchard - 2.4.3-2 -- Fix permissions on the cron.daily script. - -* Tue Oct 10 2006 Steven Pritchard - 2.4.3-1 -- Update to 2.4.3. -- Add quarantine directory and instructions for enabling it. -- Add tmpwatch cron script. - -* Thu Sep 28 2006 Steven Pritchard - 2.4.2-4 -- Drop lha dependency and add arj. - -* Sun Sep 17 2006 Steven Pritchard - 2.4.2-3 -- Rebuild. - -* Wed Aug 02 2006 Steven Pritchard - 2.4.2-2 -- Fix path to clamd socket in amavisd-conf.patch. - -* Mon Jul 31 2006 Steven Pritchard - 2.4.2-1 -- Update to 2.4.2 -- Fix permissions on README.fedora (bug #200769) - -* Tue Jun 20 2006 Steven Pritchard - 2.4.1-1 -- Update to 2.4.1 -- Drop zoo dependency due to Extras maintainer security concerns - -* Tue Apr 25 2006 Steven Pritchard - 2.4.0-1 -- Update to 2.4.0 - -* Thu Feb 02 2006 Steven Pritchard - 2.3.3-5 -- Add dist to Release - -* Wed Sep 21 2005 Steven Pritchard - 2.3.3-4 -- Add TODO and amavisd.conf-* to %%doc - -* Mon Sep 19 2005 Steven Pritchard - 2.3.3-3 -- Add amavisd-db.patch to fix the path to the db directory in - amavisd-agent and amavisd-nanny. (Thanks to Julien Tognazzi.) - -* Fri Sep 02 2005 Steven Pritchard - 2.3.3-2 -- Requires: perl(Compress::Zlib) >= 1.35 - -* Thu Sep 01 2005 Steven Pritchard - 2.3.3-1 -- Update to 2.3.3 -- Remove explicit dependencies on core perl modules - -* Fri Aug 19 2005 Steven Pritchard - 2.3.2-10 -- Recommend using 127.0.0.1 instead of localhost in README.fedora -- .deb support requires ar - -* Wed Aug 17 2005 Steven Pritchard - 2.3.2-9 -- Set $virus_admin, $mailfrom_notify_admin, $mailfrom_notify_recip, - and $mailfrom_notify_spamadmin to undef in the default config to - turn off notification emails - -* Fri Aug 12 2005 Steven Pritchard - 2.3.2-8 -- Add dependencies for freeze, lzop, nomarch, zoo, cabextract - -* Wed Jul 27 2005 Steven Pritchard - 2.3.2-7 -- Add README.fedora with simplified Postfix instructions - -* Mon Jul 25 2005 Steven Pritchard - 2.3.2-6 -- Create /var/spool/amavisd/db - -* Thu Jul 21 2005 Steven Pritchard - 2.3.2-5 -- Add perl(Mail::SPF::Query) (now packaged for Extras) dependency -- Drop /var/log/amavisd since we weren't using it -- Fix paths for clamd.sock and amavisd.pid in a couple of places - -* Tue Jul 12 2005 Steven Pritchard - 2.3.2-4 -- Add a bunch of other missing Requires (both actually required modules - and optional modules) - -* Tue Jul 12 2005 Steven Pritchard - 2.3.2-3 -- Add missing Requires: perl(Convert::TNEF) - -* Wed Jul 06 2005 Steven Pritchard - 2.3.2-2 -- Fix init script ordering -- Don't enable amavisd by default - -* Wed Jul 06 2005 Steven Pritchard - 2.3.2-1 -- Update to 2.3.2 - -* Wed Jun 29 2005 Steven Pritchard - 2.3.2-0.1.rc1 -- Update to 2.3.2-rc1 -- Fedora Extras clamav integration -- Drop amavisd-syslog.patch (Unix::Syslog is in Extras) - -* Mon Feb 23 2004 Steven Pritchard - 0.20030616.p7-0.fdr.0.1 -- Add amavisd-syslog.patch to eliminate Unix::Syslog dependency -- Add in clamd helper -- Fix up init script -- Initial package diff --git a/amavisd-snmp.service b/amavisd-snmp.service deleted file mode 100644 index 167b7e0..0000000 --- a/amavisd-snmp.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Exports amavisd SNMP data -After=network.target amavisd.service - -[Service] -Type=forking -User=amavis -Group=amavis -PIDFile=/var/run/amavisd/amavisd-snmp-subagent.pid -ExecStart=/usr/sbin/amavisd-snmp-subagent -D /var/spool/amavisd/db -P /var/run/amavisd/amavisd-snmp-subagent.pid -Restart=on-failure -PrivateTmp=true -CapabilityBoundingSet= -ProtectSystem=full -ProtectHome=true - -[Install] -WantedBy=multi-user.target diff --git a/amavisd.service b/amavisd.service deleted file mode 100644 index 58caf23..0000000 --- a/amavisd.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=Amavisd-new is an interface between MTA and content checkers. -Documentation=http://www.ijs.si/software/amavisd/#doc -After=network.target -Wants=clamd@amavisd.service - -[Service] -Type=forking -PIDFile=/var/run/amavisd/amavisd.pid -ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf -ExecReload=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf reload -Restart=on-failure -PrivateTmp=true -CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_SETGID CAP_SETUID -ProtectSystem=full -ProtectHome=true - -[Install] -WantedBy=multi-user.target diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..f76cc4b --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Renamed to amavis diff --git a/sources b/sources deleted file mode 100644 index b60fc05..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (amavis-v2.12.0.tar.bz2) = f8d2dfb6e7d694c76c0ebca7592a3c85ff9b4911cbe43b3eb6d5002541bf036adfbf47c18df4b10c72bcceee0d8701b8c474e6432c5c136ca25170e42098d844