[rpms/amavisd-new] PR #2: fix RHBZ#1551203 - correct sock location

2018-03-13 Thread Juan Orti

jorti merged a pull-request against the project: `amavisd-new` that you are 
following.

Merged pull-request:

``
fix RHBZ#1551203 - correct sock location
``

https://src.fedoraproject.org/rpms/amavisd-new/pull-request/2
___
perl-devel mailing list -- perl-devel@lists.fedoraproject.org
To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org


[amavisd-new] Update to 2.10.1

2014-10-27 Thread Juan Orti
commit 4dbc21cc696663c77f51f77fe03de1bc344e44c2
Author: Juan Orti Alcaine 
Date:   Mon Oct 27 11:08:16 2014 +0100

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(-)
---
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.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
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

File amavisd-new-2.10.1.tar.xz uploaded to lookaside cache by jorti

2014-10-27 Thread Juan Orti
A file has been added to the lookaside cache for amavisd-new:

adb0c64ac6a91249ddeb4ed97747d755  amavisd-new-2.10.1.tar.xz
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new] Fix imports when SQL is used and improve conf patch

2014-10-25 Thread Juan Orti
commit 10b6fdb4006a9c8a2434b8d627664807649daf5e
Author: Juan Orti Alcaine 
Date:   Sat Oct 25 23:08:35 2014 +0200

Fix imports when SQL is used and improve conf patch

 amavisd-new-2.10.0-conf.patch  |   44 +++-
 ...-2.10.0-missing_import_when_sql_is_in_use.patch |   14 ++
 amavisd-new.spec   |9 -
 3 files changed, 64 insertions(+), 3 deletions(-)
---
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 000..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
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new] Update to 2.10.0 and several fixes

2014-10-23 Thread Juan Orti
commit 2d3042c8b3fe436271673792c8ede865c871a702
Author: Juan Orti Alcaine 
Date:   Thu Oct 23 12:33:47 2014 +0200

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(-)
---
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 000..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(pre

File amavisd-new-2.10.0.tar.xz uploaded to lookaside cache by jorti

2014-10-23 Thread Juan Orti
A file has been added to the lookaside cache for amavisd-new:

a343a5201663b26519f3db53b6d8be3c  amavisd-new-2.10.0.tar.xz
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new] Update to 2.10.0-rc2

2014-10-20 Thread Juan Orti
commit 260a13ba446746e6e724503385ed06e1f4fe2da0
Author: Juan Orti Alcaine 
Date:   Mon Oct 20 10:22:35 2014 +0200

Update to 2.10.0-rc2

 .gitignore |1 +
 ...9.0-conf.patch => amavisd-new-2.10.0-conf.patch |   14 +++---
 amavisd-new.spec   |   15 +++
 sources|2 +-
 4 files changed, 16 insertions(+), 16 deletions(-)
---
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 @@
-2b83d60b49

File amavisd-new-2.10.0-rc2.tar.xz uploaded to lookaside cache by jorti

2014-10-20 Thread Juan Orti
A file has been added to the lookaside cache for amavisd-new:

f43dbf102e3f028e43b6d2b7d2f5cc03  amavisd-new-2.10.0-rc2.tar.xz
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new/epel7] Add ExecReload and Wants=postfix.service to systemd unit

2014-08-20 Thread Juan Orti
commit 3668a83cf651865e3179be911eefdf5d16e1d42d
Author: Juan Orti Alcaine 
Date:   Wed Aug 20 15:19:21 2014 +0200

Add ExecReload and Wants=postfix.service to systemd unit

 amavisd-new.spec |5 -
 amavisd.service  |2 ++
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/amavisd-new.spec b/amavisd-new.spec
index 34563c9..08cd0f2 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: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
@@ -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-5
+- Add ExecReload and Wants=postfix.service to systemd unit
+
 * Thu Aug 14 2014 Juan Orti Alcaine  2.9.1-4
 - Remove PrivateDevices and PrivateNetwork from all services
 
diff --git a/amavisd.service b/amavisd.service
index 34a80ed..f544765 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
 NoNewPrivileges=true
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new/f21] Add ExecReload and Wants=postfix.service to systemd unit

2014-08-20 Thread Juan Orti
Summary of changes:

  20d69c4... Add ExecReload and Wants=postfix.service to systemd unit (*)

(*) This commit already existed in another branch; no separate mail sent
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new] Add ExecReload and Wants=postfix.service to systemd unit

2014-08-20 Thread Juan Orti
commit 20d69c4539ce726f49247eae723dca7cb9454012
Author: Juan Orti Alcaine 
Date:   Wed Aug 20 15:09:46 2014 +0200

Add ExecReload and Wants=postfix.service to systemd unit

 amavisd-new.spec |5 -
 amavisd.service  |2 ++
 2 files changed, 6 insertions(+), 1 deletions(-)
---
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
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new/epel7] Remove PrivateDevices and PrivateNetwork from all services

2014-08-14 Thread Juan Orti
commit a4151653cd743f0ccf401b581b8f18447ae871aa
Author: Juan Orti Alcaine 
Date:   Thu Aug 14 16:06:56 2014 +0200

Remove PrivateDevices and PrivateNetwork from all services

 amavisd-clean-quarantine.service |2 --
 amavisd-clean-tmp.service|2 --
 amavisd-new.spec |5 -
 amavisd-snmp.service |1 -
 4 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/amavisd-clean-quarantine.service b/amavisd-clean-quarantine.service
index 2bb8b3f..1aa5989 100644
--- a/amavisd-clean-quarantine.service
+++ b/amavisd-clean-quarantine.service
@@ -6,7 +6,5 @@ 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 70fcffc..a5472e7 100644
--- a/amavisd-clean-tmp.service
+++ b/amavisd-clean-tmp.service
@@ -6,7 +6,5 @@ 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 7962398..34563c9 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: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
@@ -235,6 +235,9 @@ systemctl start amavisd-clean-quarantine.timer >/dev/null 
2>&1 || :
 %{_sbindir}/amavisd-snmp-subagent
 
 %changelog
+* Thu Aug 14 2014 Juan Orti Alcaine  2.9.1-4
+- Remove PrivateDevices and PrivateNetwork from all services
+
 * Thu Aug 14 2014 Juan Orti Alcaine  2.9.1-3
 - Remove PrivateDevices from service unit. Fix #1130147.
 
diff --git a/amavisd-snmp.service b/amavisd-snmp.service
index 94b3537..955b88c 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
 NoNewPrivileges=true
 
 [Install]
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new/epel7] Remove PrivateDevices from service unit

2014-08-14 Thread Juan Orti
commit 64ef7918b1947d9048806bde04c093a02b56dfd9
Author: Juan Orti Alcaine 
Date:   Thu Aug 14 15:26:27 2014 +0200

Remove PrivateDevices from service unit

 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 1771fbb..7962398 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
+* Thu Aug 14 2014 Juan Orti Alcaine  2.9.1-3
+- Remove PrivateDevices from service unit. Fix #1130147.
+
 * 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..34a80ed 100644
--- a/amavisd.service
+++ b/amavisd.service
@@ -12,7 +12,6 @@ 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]
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new/el5] Change permissions of /var/spool/amavisd folders to 750

2014-08-07 Thread Juan Orti
commit 732796208339e45bb826858f7b6a0dbefed7ad6c
Author: Juan Orti Alcaine 
Date:   Thu Aug 7 11:42:19 2014 +0200

Change permissions of /var/spool/amavisd folders to 750

 amavisd-new.spec |   13 -
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/amavisd-new.spec b/amavisd-new.spec
index 29f3dcf..1001e8a 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.5.2
-Release:2%{?prerelease:.%{prerelease}}%{?dist}
+Release:3%{?prerelease:.%{prerelease}}%{?dist}
 License:GPL
 Group:  Applications/System
 URL:http://www.ijs.si/software/amavisd/
@@ -158,14 +158,17 @@ fi
 %{_sbindir}/amavisd
 %{_sbindir}/clamd.amavisd
 %{_bindir}/amavisd-*
-%dir %attr(700,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
+%dir %attr(750,amavis,amavis) /var/spool/amavisd
+%dir %attr(750,amavis,amavis) /var/spool/amavisd/tmp
+%dir %attr(750,amavis,amavis) /var/spool/amavisd/db
+%dir %attr(750,amavis,amavis) /var/spool/amavisd/quarantine
 %dir %attr(755,amavis,amavis) /var/run/amavisd
 %ghost /var/spool/amavisd/clamd.sock
 
 %changelog
+* Thu Aug 07 2014 Juan Orti Alcaine  2.5.2-3
+- Change permissions of /var/spool/amavisd folders to 750
+
 * 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.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new/f19] Add patch to fix releasing mail from sql quarantine

2014-08-04 Thread Juan Orti
Summary of changes:

  21c59b2... Add patch to fix releasing mail from sql quarantine (*)

(*) This commit already existed in another branch; no separate mail sent
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new/f20] Add patch to fix releasing mail from sql quarantine

2014-08-04 Thread Juan Orti
commit 21c59b2bb56581513a1d8ca31b70d3adba0a04d7
Author: Juan Orti Alcaine 
Date:   Sun Aug 3 23:15:43 2014 +0200

Add patch to fix releasing mail from sql quarantine

Conflicts:
amavisd-new.spec

 ...ew-2.9.1-release_mail_from_sql_quarantine.patch |   51 
 amavisd-new.spec   |9 +++-
 2 files changed, 59 insertions(+), 1 deletions(-)
---
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 000..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 d1368d0..ee7c04c 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}-%{versio

[amavisd-new/epel7] Add patch to fix releasing mail from sql quarantine

2014-08-04 Thread Juan Orti
Summary of changes:

  6595b8b... Add patch to fix releasing mail from sql quarantine (*)

(*) This commit already existed in another branch; no separate mail sent
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new/f21] Add patch to fix releasing mail from sql quarantine

2014-08-04 Thread Juan Orti
Summary of changes:

  6595b8b... Add patch to fix releasing mail from sql quarantine (*)

(*) This commit already existed in another branch; no separate mail sent
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new] Add patch to fix releasing mail from sql quarantine

2014-08-04 Thread Juan Orti
commit 6595b8b39fe05aadb6df98abfc77a25cf3a74377
Author: Juan Orti Alcaine 
Date:   Sun Aug 3 23:15:43 2014 +0200

Add patch to fix releasing mail from sql quarantine

 ...ew-2.9.1-release_mail_from_sql_quarantine.patch |   51 
 amavisd-new.spec   |9 +++-
 2 files changed, 59 insertions(+), 1 deletions(-)
---
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 000..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)
 BuildAr

[amavisd-new/el6] Add patch to fix releasing mail from sql quarantine

2014-08-03 Thread Juan Orti
commit 27c8fbc4768c6ddc1b297a37121099f95b3f33f2
Author: Juan Orti Alcaine 
Date:   Sun Aug 3 23:15:43 2014 +0200

Add patch to fix releasing mail from sql quarantine

 ...ew-2.9.1-release_mail_from_sql_quarantine.patch |   51 
 amavisd-new.spec   |9 +++-
 2 files changed, 59 insertions(+), 1 deletions(-)
---
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 000..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:  

[amavisd-new] Service unit files hardening

2014-05-12 Thread Juan Orti
commit 0fcfaa5af9aa7529ba357a7d49fe7cf6a2a72323
Author: Juan Orti Alcaine 
Date:   Mon May 12 11:24:54 2014 +0200

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 deletions(-)
---
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]
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new] Update to upstream 2.9.0

2014-05-12 Thread Juan Orti
commit c6bb948ef4681359664ef680f65b3129c95f27ae
Author: Juan Orti Alcaine 
Date:   Mon May 12 10:48:22 2014 +0200

Update to upstream 2.9.0

 - Update to upstream 2.9.0
 - Enable and start timer units
 - Rework amavisd-conf.patch

 .gitignore |1 +
 amavisd-conf.patch => amavisd-new-2.9.0-conf.patch |   70 
 amavisd-new.spec   |   18 -
 sources|2 +-
 4 files changed, 57 insertions(+), 34 deletions(-)
---
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.0 
+0200
-+++ amavisd-new-2.8.0/amavisd.conf.conf2013-12-02 
16:24:05.0 +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-nanny2009-06-25 19:57:13.0 
+0200
-+++ amavis

File amavisd-new-2.9.0.tar.xz uploaded to lookaside cache by jorti

2014-05-12 Thread Juan Orti
A file has been added to the lookaside cache for amavisd-new:

085518062e9df802f806230b800e075e  amavisd-new-2.9.0.tar.xz
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new] Use systemd timer units instead of cronjobs and use PrivateDevices

2014-04-29 Thread Juan Orti
commit dde04c229566976adc4789155be268ff08f289c7
Author: Juan Orti Alcaine 
Date:   Tue Apr 29 13:31:43 2014 +0200

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(-)
---
diff --git a/amavisd-clean-quarantine.service b/amavisd-clean-quarantine.service
new file mode 100644
index 000..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 000..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 000..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 000..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_p

[amavisd-new/f19] Update to version 2.8.1, fix missing dependencies

2014-03-10 Thread Juan Orti
Summary of changes:

  24a4616... Update to version 2.8.1, fix missing dependencies (*)

(*) This commit already existed in another branch; no separate mail sent
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new/f20] Update to version 2.8.1, fix missing dependencies

2014-03-10 Thread Juan Orti
commit 24a4616af1bbb2cf96ff639c5ea673db3bd54e10
Author: Juan Orti Alcaine 
Date:   Mon Feb 17 08:33:11 2014 +0100

Update to version 2.8.1, fix missing dependencies

- Update to version 2.8.1
- Add missing dependencies
- Place tmpfiles conf in _tmpfilesdir
- Use _localstatedir macro
- Change clamd socket location to /var/run/clamd.amavisd/clamd.sock

 .gitignore|1 +
 amavis-clamd.conf |4 +-
 amavis-clamd.sysconfig|2 +-
 amavisd-conf.patch|2 +-
 amavisd-new-tmpfiles.conf |2 +-
 amavisd-new.spec  |   52 ++--
 sources   |2 +-
 7 files changed, 38 insertions(+), 27 deletions(-)
---
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/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/amavis-clamd.sysconfig b/amavis-clamd.sysconfig
index 55fb40a..875534d 100644
--- a/amavis-clamd.sysconfig
+++ b/amavis-clamd.sysconfig
@@ -1,3 +1,3 @@
 CLAMD_CONFIGFILE=/etc/clamd.d/amavisd.conf
-CLAMD_SOCKET=/var/spool/amavisd/clamd.sock
+CLAMD_SOCKET=/var/run/clamd.amavisd/clamd.sock
 CLAMD_OPTIONS=
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 491f45a..710ed1b 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.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
@@ -26,7 +26,9 @@ 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
+BuildRequires:  systemd
+Requires:   clamav-server
+Requires:   clamav-server-sysvinit
 Requires:   /usr/sbin/tmpwatch, /etc/cron.daily
 Requires:   /usr/bin/ar
 Requires:   altermime
@@ -76,9 +78,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 +94,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 +127,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,12 +150,11 @@ install -D -p -m 644 %{SOURCE

[amavisd-new] Move clamd socket to /var/run/clamd.amavisd/clamd.sock

2014-02-17 Thread Juan Orti
commit 07c1a82b541e40cd02acd8f9e1872babc3c75548
Author: Juan Orti Alcaine 
Date:   Mon Feb 17 09:21:16 2014 +0100

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
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[amavisd-new] Update to version 2.8.1, add systemd service units and minor fixes.

2014-02-15 Thread Juan Orti
commit 42db5a92bb6c519104f7ce3390b22b2a4ed57adb
Author: Juan Orti Alcaine 
Date:   Thu Feb 13 11:03:50 2014 +0100

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(-)
---
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/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,'

File amavisd-new-2.8.1.tar.gz uploaded to lookaside cache by jorti

2014-02-12 Thread Juan Orti
A file has been added to the lookaside cache for amavisd-new:

f6f9abd1aac05521bdcb3754d09f5314  amavisd-new-2.8.1.tar.gz
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel