From 1c68cbe19ea68f80b944e25656754a7de7c2308e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:27:16 +0000 Subject: [PATCH 01/10] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 52b2219..f8d4c79 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: amavisd-new -# $Id$ +# $Id: Makefile,v 1.1 2006/01/26 22:06:41 steve Exp $ NAME := amavisd-new SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 4dbe7cab199e9ae1550ca35c4165657780a78159 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 8 May 2010 01:42:43 +0000 Subject: [PATCH 02/10] Initialize branch EL-6 for amavisd-new --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..46381b9 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-6 From 8f85069be62e414adb462310ff45628eb7834434 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 09:49:50 +0000 Subject: [PATCH 03/10] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index f8d4c79..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: amavisd-new -# $Id: Makefile,v 1.1 2006/01/26 22:06:41 steve Exp $ -NAME := amavisd-new -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 46381b9..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-6 From b4f33d302bb641c781994f202f29f858318f9491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Tue, 9 Nov 2010 09:36:11 +0100 Subject: [PATCH 04/10] 561389 patch from Sandro Janke - change stderr to stdout --- amavisd-new-2.6.4-stdout.patch | 21 +++++++++++++++++++++ amavisd-new.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 amavisd-new-2.6.4-stdout.patch diff --git a/amavisd-new-2.6.4-stdout.patch b/amavisd-new-2.6.4-stdout.patch new file mode 100644 index 0000000..f623d55 --- /dev/null +++ b/amavisd-new-2.6.4-stdout.patch @@ -0,0 +1,21 @@ +diff -up amavisd-new-2.6.4/amavisd.err amavisd-new-2.6.4/amavisd +--- amavisd-new-2.6.4/amavisd.err 2010-11-09 09:24:54.065896574 +0100 ++++ amavisd-new-2.6.4/amavisd 2010-11-09 09:25:59.192229627 +0100 +@@ -14014,14 +14014,14 @@ eval { + my($msg) = !defined($killed_amavisd_pid) ? undef : + "Daemon [$killed_amavisd_pid] terminated by SIG$kill_sig_used"; + if ($cmd eq 'stop') { +- if (defined $msg) { do_log(2,"%s",$msg); print STDERR "$msg\n" } ++ if (defined $msg) { do_log(2,"%s",$msg); print STDOUT "$msg\n" } + exit(0); + } + if (defined $killed_amavisd_pid) { +- print STDERR "$msg, waiting for dust to settle...\n"; ++ print STDOUT "$msg, waiting for dust to settle...\n"; + sleep 5; # wait for the TCP socket to be released + } +- print STDERR "becoming a new daemon...\n"; ++ print STDOUT "becoming a new daemon...\n"; + } + 1; + } or do { diff --git a/amavisd-new.spec b/amavisd-new.spec index e25a52c..030c4c0 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.6.4 -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 @@ -19,6 +19,7 @@ Source7: amavisd-snmp.init Patch0: amavisd-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch +Patch3: amavisd-new-2.6.4-stdout.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root/ Requires: /usr/sbin/clamd, /etc/clamd.d Requires: /usr/sbin/tmpwatch, /etc/cron.daily @@ -113,6 +114,7 @@ alerting purposes. %patch0 -p1 %patch1 -p1 %patch2 -p0 +%patch3 -p1 install -m644 %{SOURCE4} %{SOURCE5} README_FILES/ sed -i -e 's,/var/amavis/amavisd.sock\>,/var/spool/amavisd/amavisd.sock,' \ @@ -210,6 +212,9 @@ fi %{_sbindir}/amavisd-snmp-subagent %changelog +* 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. From 4c7ca9ad21ca2414dad55e70b72294d6024d10a1 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Thu, 26 Jun 2014 12:57:46 +0200 Subject: [PATCH 05/10] Update to 2.9.0 and fix missing dependencies --- .gitignore | 1 + ...conf.patch => amavisd-new-2.9.0-conf.patch | 70 +++++++++++-------- amavisd-new.spec | 53 ++++++++------ sources | 2 +- 4 files changed, 74 insertions(+), 52 deletions(-) rename amavisd-conf.patch => amavisd-new-2.9.0-conf.patch (86%) diff --git a/.gitignore b/.gitignore index dbef4e0..57f9fe9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ amavisd-new-2.8.0.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 ef1b7a1..1acdd85 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 81a81960fb35e89339c9f7de4a9f8c653f4e7003 +Author: Juan Orti Alcaine +Date: Thu Jun 26 11:53:39 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..1ad850f 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 491f45a..9cd1335 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.0 -Release: 8%{?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 Source1: amavis-clamd.init Source2: amavis-clamd.conf Source3: amavis-clamd.sysconfig @@ -17,7 +17,7 @@ Source5: README.quarantine Source6: amavisd.cron Source7: amavisd-snmp.init Source8: amavisd-new-tmpfiles.conf -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 @@ -26,9 +26,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 -Requires: /usr/sbin/tmpwatch, /etc/cron.daily -Requires: /usr/bin/ar +Requires: clamd +Requires: tmpwatch +Requires: crontabs +Requires: binutils Requires: altermime Requires: arj Requires: bzip2 @@ -76,9 +77,11 @@ 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 @@ -90,6 +93,7 @@ BuildArch: noarch Group: Applications/System Summary: Exports amavisd SNMP data Requires: %{name} = %{version}-%{release} +Requires: perl(NetSNMP::OID) Requires(post): /sbin/chkconfig Requires(preun): /sbin/service, /sbin/chkconfig Requires(postun): /sbin/service @@ -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 @@ -145,9 +149,9 @@ install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.co 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,clamd.amavisd} %if 0%{?fedora}%{?rhel} > 6 install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/amavisd-new.conf @@ -158,7 +162,7 @@ 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 %preun if [ $1 -eq 0 ]; then @@ -206,18 +210,18 @@ fi %{_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 +%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}%{?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 +%ghost %dir %attr(755,amavis,amavis) %{_localstatedir}/run/amavisd +%ghost %dir %attr(755,amavis,amavis) %{_localstatedir}/run/clamd.amavisd %else -%dir %attr(755,amavis,amavis) /var/run/amavisd -%dir %attr(755,amavis,amavis) /var/run/clamd.amavisd +%dir %attr(755,amavis,amavis) %{_localstatedir}/run/amavisd +%dir %attr(755,amavis,amavis) %{_localstatedir}/run/clamd.amavisd %endif %files snmp @@ -227,6 +231,11 @@ fi %{_sbindir}/amavisd-snmp-subagent %changelog +* Thu Jun 26 2014 Juan Orti Alcaine - 2.9.0-1 +- Update to version 2.9.0 +- Rework amavisd-new-2.9.0-conf.patch +- Fix missing dependencies + * 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 +298,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/sources b/sources index 3c85930..a793937 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9851ce19f0c8fcab36f254c4e0251618 amavisd-new-2.8.0.tar.gz +085518062e9df802f806230b800e075e amavisd-new-2.9.0.tar.xz From b9fb9ea55c51ca1073064c6c1f04527451ddc26f Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Fri, 27 Jun 2014 17:23:11 +0200 Subject: [PATCH 06/10] 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 9cd1335..1c4405b 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 @@ -210,10 +210,10 @@ fi %{_sbindir}/amavisd %{_sbindir}/clamd.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 %ghost %{_localstatedir}/spool/amavisd/clamd.sock %if 0%{?fedora}%{?rhel} > 6 %attr(644,root,root) %{_sysconfdir}/tmpfiles.d/amavisd-new.conf @@ -231,6 +231,9 @@ fi %{_sbindir}/amavisd-snmp-subagent %changelog +* Fri Jun 27 2014 Juan Orti Alcaine 2.9.0-2 +- Change permissions of /var/spool/amavisd folders to 750. Fix bug #906396 + * Thu Jun 26 2014 Juan Orti Alcaine - 2.9.0-1 - Update to version 2.9.0 - Rework amavisd-new-2.9.0-conf.patch From 28f1346e53b358631afecf258a4256516f378917 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Sat, 28 Jun 2014 18:52:36 +0200 Subject: [PATCH 07/10] Update to 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 57f9fe9..b3aea8b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ amavisd-new-2.8.0.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 1c4405b..95d67cd 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: 2%{?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 @@ fi %{_sbindir}/amavisd-snmp-subagent %changelog +* Sat Jun 28 2014 Juan Orti Alcaine 2.9.1-1 +- Update to 2.9.1 + * Fri Jun 27 2014 Juan Orti Alcaine 2.9.0-2 - 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 27c8fbc4768c6ddc1b297a37121099f95b3f33f2 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Sun, 3 Aug 2014 23:15:43 +0200 Subject: [PATCH 08/10] 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 95d67cd..dacaf1a 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 @@ -25,6 +25,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) Requires: clamd Requires: tmpwatch @@ -124,6 +127,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 @@ fi %{_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 - Update to 2.9.1 From 89d07ca25cf0cb4898246e9449c0e17cb4a357be Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Tue, 26 Jan 2016 13:24:23 +0100 Subject: [PATCH 09/10] Remove %defattr --- amavisd-new.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index dacaf1a..c13927d 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -201,7 +201,6 @@ if [ $1 -ne 0 ]; then fi %files -%defattr(-,root,root,-) %doc AAAREADME.first LDAP.schema LDAP.ldif LICENSE RELEASE_NOTES %doc README_FILES test-messages amavisd.conf-* %dir %{_sysconfdir}/amavisd/ @@ -229,7 +228,6 @@ fi %endif %files snmp -%defattr(-,root,root,-) %doc AMAVIS-MIB.txt %attr(755,root,root) %{_initrddir}/amavisd-snmp %{_sbindir}/amavisd-snmp-subagent From fe74e64c869fb1f7a592218453c53b0e4010fe65 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Tue, 12 Dec 2017 14:53:27 +0100 Subject: [PATCH 10/10] Remove lrzip --- ...conf.patch => amavisd-new-2.9.1-conf.patch | 29 +++++++++++++++---- amavisd-new.spec | 8 +++-- 2 files changed, 29 insertions(+), 8 deletions(-) rename amavisd-new-2.9.0-conf.patch => amavisd-new-2.9.1-conf.patch (87%) diff --git a/amavisd-new-2.9.0-conf.patch b/amavisd-new-2.9.1-conf.patch similarity index 87% rename from amavisd-new-2.9.0-conf.patch rename to amavisd-new-2.9.1-conf.patch index 1acdd85..3bb0c55 100644 --- a/amavisd-new-2.9.0-conf.patch +++ b/amavisd-new-2.9.1-conf.patch @@ -1,8 +1,13 @@ -commit 81a81960fb35e89339c9f7de4a9f8c653f4e7003 -Author: Juan Orti Alcaine -Date: Thu Jun 26 11:53:39 2014 +0200 +From 81c7c660e6e0620c6616c0c7acc6064cb482117f Mon Sep 17 00:00:00 2001 +From: Juan Orti Alcaine +Date: Tue, 12 Dec 2017 14:48:37 +0100 +Subject: [PATCH] amavisd-new-2.9.1-conf.patch - amavisd-conf.patch +--- + amavisd-agent | 2 +- + amavisd-nanny | 2 +- + amavisd.conf | 58 +++++++++++++++++++++++++++++----------------------------- + 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/amavisd-agent b/amavisd-agent index 1ebe2bb..b8271a3 100755 @@ -31,7 +36,7 @@ index 80b84dc..164549f 100755 my($repeatcount); # -c, repeat count (when defined) diff --git a/amavisd.conf b/amavisd.conf -index a09597f..1ad850f 100644 +index a09597f..13e9199 100644 --- a/amavisd.conf +++ b/amavisd.conf @@ -14,25 +14,25 @@ use strict; @@ -98,6 +103,17 @@ index a09597f..1ad850f 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'], + ['rpm', \&do_uncompress, ['rpm2cpio.pl', 'rpm2cpio'] ], + [['cpio','tar'], \&do_pax_cpio, ['pax', 'gcpio', 'cpio'] ], @@ -338,9 +338,9 @@ $banned_filename_re = new_RE( ['arj', \&do_unarj, ['unarj', 'arj'] ], ['arc', \&do_arc, ['nomarch', 'arc'] ], @@ -137,3 +153,6 @@ index a09597f..1ad850f 100644 # ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred) # # note that Mail::ClamAV requires perl to be build with threading! +-- +2.14.3 + diff --git a/amavisd-new.spec b/amavisd-new.spec index c13927d..ead1623 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 @@ -17,7 +17,7 @@ Source5: README.quarantine Source6: amavisd.cron Source7: amavisd-snmp.init Source8: amavisd-new-tmpfiles.conf -Patch0: amavisd-new-2.9.0-conf.patch +Patch0: amavisd-new-2.9.1-conf.patch Patch1: amavisd-init.patch Patch2: amavisd-condrestart.patch # Don't source /etc/sysconfig/network in init script; the network check @@ -45,7 +45,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. @@ -233,6 +232,9 @@ fi %{_sbindir}/amavisd-snmp-subagent %changelog +* Tue Dec 12 2017 Juan Orti Alcaine 2.9.1-3 +- Remove lrzip + * Sun Aug 03 2014 Juan Orti Alcaine 2.9.1-2 - Add patch to fix releasing mail from sql quarantine