diff options
author | Lim Swee Tat <st_lim@gentoo.org> | 2004-07-17 08:48:36 +0000 |
---|---|---|
committer | Lim Swee Tat <st_lim@gentoo.org> | 2004-07-17 08:48:36 +0000 |
commit | ad0aa7d24b90f66c7f0db0505d98db38eba41c9d (patch) | |
tree | 371a8224dc6a96f38aaef874ebff34be922e1e12 /mail-filter/qmail-scanner | |
parent | Moving to mail-filter/qmail-scanner (diff) | |
download | gentoo-2-ad0aa7d24b90f66c7f0db0505d98db38eba41c9d.tar.gz gentoo-2-ad0aa7d24b90f66c7f0db0505d98db38eba41c9d.tar.bz2 gentoo-2-ad0aa7d24b90f66c7f0db0505d98db38eba41c9d.zip |
Moved from net-mail/qmail-scanner to mail-filter/qmail-scanner.
Diffstat (limited to 'mail-filter/qmail-scanner')
14 files changed, 500 insertions, 0 deletions
diff --git a/mail-filter/qmail-scanner/ChangeLog b/mail-filter/qmail-scanner/ChangeLog new file mode 100644 index 000000000000..15782cae3cd7 --- /dev/null +++ b/mail-filter/qmail-scanner/ChangeLog @@ -0,0 +1,73 @@ +# ChangeLog for net-mail/qmail-scanner +# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/ChangeLog,v 1.1 2004/07/17 08:48:36 st_lim Exp $ + + 17 Jul 2004; Lim Swee Tat <st_lim@gentoo.org> +metadata.xml, + +files/qmail-scanner-queue.pl.patch, +files/qmailscanner.cronjob, + +files/qmailscanner.logrotate, +qmail-scanner-1.16-r1.ebuild, + +qmail-scanner-1.16-r2.ebuild: + Moved from net-mail/qmail-scanner to mail-filter/qmail-scanner. + + 03 Jun 2004; Seemant Kulleen <seemant@gentoo.org> + qmail-scanner-1.16-r1.ebuild, qmail-scanner-1.16.ebuild: + Change DEPENDency from net-mail/maildrop to mail-filter/maildrop + + 24 Apr 2004; Robin H. Johnson <robbat2@gentoo.org> + qmail-scanner-1.16-r2.ebuild, qmail-scanner-1.20.ebuild: + bug #48628, accept various other qmail's as well + +*qmail-scanner-1.20 (28 Jan 2004) + + 28 Jan 2004; Robin H. Johnson <robbat2@gentoo.org> + qmail-scanner-1.20.ebuild, files/qmail-scanner-queue.pl.patch, + files/qmailscanner.cronjob, files/qmailscanner.logrotate: + Version bump, bugs #38065, #39670. This software seems very touchy at the + moment, it doesn't fail gracefully and so qmail can loose mail if anything is + wrong! + + 26 Dec 2003; Jason Wever <weeve@gentoo.org> qmail-scanner-1.16.ebuild: + Masked on sparc as f-prot does not work on sparc. + +*qmail-scanner-1.16-r2 (28 Nov 2003) + + 28 Nov 2003; Robin H. Johnson <robbat2@gentoo.org> + qmail-scanner-1.16-r2.ebuild: + cleanup ebuild, fix bug #33211, and update postinst docs + +*qmail-scanner-1.16-r1 (19 Apr 2003) + + 19 Apr 2003; Preston A. Elder <prez@gentoo.org> qmail-scanner-1.16-r1.ebuild, + Made dependant on virtual/virus not f-prot specifically. + +*qmail-scanner-1.16 (15 Feb 2003) + + 15 Feb 2003; Nick Hadaway <raker@gentoo.org> qmail-scanner-1.16.ebuild, + files/digest-qmail-scanner-1.16 : + Version bump. Adds keepdir stuff to /var directories. + +*qmail-scanner-1.15 (21 Jan 2003) + + 21 Jan 2003; Nick Hadaway <raker@gentoo.org> qmail-scanner-1.15.ebulid, + files/digest-qmail-scanner-1.15 : + Version bump. This one should be compatible with perl-5.8 + + 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords + +*qmail-scanner-1.14 (07 Oct 2002) + + 17 Oct 2002; Nick Hadaway <raker@gentoo.org> + qmail-scanner-1.14.ebuild, files/digest-qmail-scanner-1.14 : + Version bump. Fixes some bugs with alert reporting and for usage with + SpamAssassin. + +*qmail-scanner-1.13 (15 Aug 2002) + + 15 Aug 2002; Nick Hadaway <raker@gentoo.org> + qmail-scanner-1.13.ebuild, files/digest-qmail-scanner-1.13 : + Version bump. + +*qmail-scanner-1.12-r1 (12 Jun 2002) + + 12 Jun 2002; Grant Goodyear <g2boojum@gentoo.org> + qmail-scanner-1.12-r1.ebuild, files/digest-qmail-scanner-1.12-r1 : + Unmasked because upstream fixed some bugs. diff --git a/mail-filter/qmail-scanner/Manifest b/mail-filter/qmail-scanner/Manifest new file mode 100644 index 000000000000..c389ca991146 --- /dev/null +++ b/mail-filter/qmail-scanner/Manifest @@ -0,0 +1,13 @@ +MD5 b2862c588cff6cef11df50d94fe4febc qmail-scanner-1.16.ebuild 2562 +MD5 3c9f9d1e6a1939991b5558b6ddef15d5 qmail-scanner-1.16-r1.ebuild 2564 +MD5 3b5b76dac0b18229fa56a6c02900bd81 qmail-scanner-1.16-r2.ebuild 1981 +MD5 7e98a265eaa724a906d07db029d6436e ChangeLog 2522 +MD5 5721b86fd871bdfab77231abc6e02f68 metadata.xml 161 +MD5 cb8fa23f9bbd463f8c4ac0683748cb82 qmail-scanner-1.20.ebuild 4403 +MD5 6f6fc9e3db3985ba4ae5a6203d2d6abf files/qmailscanner.cronjob 50 +MD5 21cbccfc2015bf74d509a5b329ef4b30 files/digest-qmail-scanner-1.16 67 +MD5 797efb400e5d84070bd2237518cff4ba files/digest-qmail-scanner-1.20 67 +MD5 055c5ac64c689a669b8ccd6bc5f6553d files/qmailscanner.logrotate 147 +MD5 1d80eca1d4792a4073f51eb59f02960b files/qmail-scanner-queue.pl.patch 240 +MD5 21cbccfc2015bf74d509a5b329ef4b30 files/digest-qmail-scanner-1.16-r1 67 +MD5 21cbccfc2015bf74d509a5b329ef4b30 files/digest-qmail-scanner-1.16-r2 67 diff --git a/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.16 b/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.16 new file mode 100644 index 000000000000..8cd551a81271 --- /dev/null +++ b/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.16 @@ -0,0 +1 @@ +MD5 37b89fc12ef602886fe2bed7a2551309 qmail-scanner-1.16.tgz 117703 diff --git a/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.16-r1 b/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.16-r1 new file mode 100644 index 000000000000..8cd551a81271 --- /dev/null +++ b/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.16-r1 @@ -0,0 +1 @@ +MD5 37b89fc12ef602886fe2bed7a2551309 qmail-scanner-1.16.tgz 117703 diff --git a/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.16-r2 b/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.16-r2 new file mode 100644 index 000000000000..8cd551a81271 --- /dev/null +++ b/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.16-r2 @@ -0,0 +1 @@ +MD5 37b89fc12ef602886fe2bed7a2551309 qmail-scanner-1.16.tgz 117703 diff --git a/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.20 b/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.20 new file mode 100644 index 000000000000..9de3791b9c2d --- /dev/null +++ b/mail-filter/qmail-scanner/files/digest-qmail-scanner-1.20 @@ -0,0 +1 @@ +MD5 d1e1753bd966fe6b20a7ef46ed2da524 qmail-scanner-1.20.tgz 137633 diff --git a/mail-filter/qmail-scanner/files/qmail-scanner-queue.pl.patch b/mail-filter/qmail-scanner/files/qmail-scanner-queue.pl.patch new file mode 100644 index 000000000000..c8461f50b145 --- /dev/null +++ b/mail-filter/qmail-scanner/files/qmail-scanner-queue.pl.patch @@ -0,0 +1,8 @@ +--- qmail-scanner-queue.pl.orig 2004-01-28 14:59:13.683490735 +0100 ++++ qmail-scanner-queue.pl 2004-01-28 14:59:58.125634019 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/suidperl -T ++#!/usr/bin/perl + # + # File: qmail-scanner-queue.pl + # Version: 1.20 diff --git a/mail-filter/qmail-scanner/files/qmailscanner.cronjob b/mail-filter/qmail-scanner/files/qmailscanner.cronjob new file mode 100644 index 000000000000..ca4527432e38 --- /dev/null +++ b/mail-filter/qmail-scanner/files/qmailscanner.cronjob @@ -0,0 +1,2 @@ +#!/bin/bash +/var/qmail/bin/qmail-scanner-queue -z diff --git a/mail-filter/qmail-scanner/files/qmailscanner.logrotate b/mail-filter/qmail-scanner/files/qmailscanner.logrotate new file mode 100644 index 000000000000..864cfe7f6fe3 --- /dev/null +++ b/mail-filter/qmail-scanner/files/qmailscanner.logrotate @@ -0,0 +1,4 @@ +/var/spool/qmailscan/qmail-queue.log /var/spool/qmailscan/quarantine.log /var/spool/qmailscan/mailstats.csv { + weekly + create 0600 qscand qscand +} diff --git a/mail-filter/qmail-scanner/metadata.xml b/mail-filter/qmail-scanner/metadata.xml new file mode 100644 index 000000000000..51f94e3fbe0e --- /dev/null +++ b/mail-filter/qmail-scanner/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>net-mail</herd> +</pkgmetadata> diff --git a/mail-filter/qmail-scanner/qmail-scanner-1.16-r1.ebuild b/mail-filter/qmail-scanner/qmail-scanner-1.16-r1.ebuild new file mode 100644 index 000000000000..10e4afe3ee83 --- /dev/null +++ b/mail-filter/qmail-scanner/qmail-scanner-1.16-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/qmail-scanner-1.16-r1.ebuild,v 1.1 2004/07/17 08:48:36 st_lim Exp $ + +DESCRIPTION="E-Mail virus scanner for qmail." +HOMEPAGE="http://qmail-scanner.sourceforge.net/" +SRC_URI="mirror://sourceforge/qmail-scanner/${P}.tgz" + +DEPEND=">=dev-lang/perl-5.6.1-r1 + >=dev-perl/Time-HiRes-01.20-r2 + >=net-mail/tnef-1.1.1 + >=mail-filter/maildrop-1.3.9 + >=dev-perl/DB_File-1.803-r2 + >=mail-mta/qmail-1.03-r8 + >=app-arch/unzip-5.42-r1 + virtual/antivirus" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="x86 ~sparc" +IUSE="" + +src_compile () { + yes | PATH=${PATH}:/opt/f-prot:/opt/vlnx ./configure \ + --domain localhost \ + || die "./configure failed!" +} + +src_install () { + # Create Directory Structure + diropts -m 755 -o qmailq -g qmail + dodir /var/spool/qmailscan + keepdir /var/spool/qmailscan + dodir /var/spool/qmailscan/quarantine + keepdir /var/spool/qmailscan/quarantine + dodir /var/spool/qmailscan/quarantine/tmp + keepdir /var/spool/qmailscan/quarantine/tmp + dodir /var/spool/qmailscan/quarantine/new + keepdir /var/spool/qmailscan/quarantine/new + dodir /var/spool/qmailscan/quarantine/cur + keepdir /var/spool/qmailscan/quarantine/cur + dodir /var/spool/qmailscan/working + keepdir /var/spool/qmailscan/working + dodir /var/spool/qmailscan/working/tmp + keepdir /var/spool/qmailscan/working/tmp + dodir /var/spool/qmailscan/working/new + keepdir /var/spool/qmailscan/working/new + dodir /var/spool/qmailscan/working/cur + keepdir /var/spool/qmailscan/working/cur + dodir /var/spool/qmailscan/archive + keepdir /var/spool/qmailscan/archive + dodir /var/spool/qmailscan/archive/tmp + keepdir /var/spool/qmailscan/archive/tmp + dodir /var/spool/qmailscan/archive/new + keepdir /var/spool/qmailscan/archive/new + dodir /var/spool/qmailscan/archive/cur + keepdir /var/spool/qmailscan/archive/cur + + # Install standard quarantine attachments file + insinto /var/spool/qmailscan + insopts -m 644 -o qmailq -g qmail + doins quarantine-attachments.txt + + # Install qmail-scanner script + insinto /var/qmail/bin + insopts -m 4755 -o qmailq -g qmail + doins qmail-scanner-queue.pl + + # Install documentation + dodoc README CHANGES COPYING + dohtml README.html +} + +pkg_postinst () { + # Setup perlscanner + Version Info + /var/qmail/bin/qmail-scanner-queue.pl -z + /var/qmail/bin/qmail-scanner-queue.pl -g + + einfo + einfo "NOTICE:" + einfo "Set QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue.pl" + einfo "in your /etc/tcp.smtp file to activate qmail-scanner." + einfo +} diff --git a/mail-filter/qmail-scanner/qmail-scanner-1.16-r2.ebuild b/mail-filter/qmail-scanner/qmail-scanner-1.16-r2.ebuild new file mode 100644 index 000000000000..4d93dd82a78b --- /dev/null +++ b/mail-filter/qmail-scanner/qmail-scanner-1.16-r2.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/qmail-scanner-1.16-r2.ebuild,v 1.1 2004/07/17 08:48:36 st_lim Exp $ + +DESCRIPTION="E-Mail virus scanner for qmail." +HOMEPAGE="http://qmail-scanner.sourceforge.net/" +SRC_URI="mirror://sourceforge/qmail-scanner/${P}.tgz" + +DEPEND=">=dev-lang/perl-5.6.1-r1 + >=dev-perl/Time-HiRes-01.20-r2 + >=net-mail/tnef-1.1.1 + >=mail-filter/maildrop-1.3.9 + >=dev-perl/DB_File-1.803-r2 + || ( + >=mail-mta/qmail-1.03-r8 + >=mail-mta/qmail-ldap-1.03-r1 + mail-mta/qmail-mysql + ) + >=app-arch/unzip-5.42-r1 + virtual/antivirus" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="x86 sparc" +IUSE="" + +inherit fixheadtails + +src_unpack() { + unpack ${A} + cd ${S} + ht_fix_file autoupdaters/update_macafee autoupdaters/update_trend autoupdaters/update_sophos configure +} + +src_compile () { + yes | PATH=${PATH}:/opt/f-prot:/opt/vlnx ./configure \ + --domain localhost \ + || die "./configure failed!" +} + +src_install () { + # Create Directory Structure + diropts -m 755 -o qmailq -g qmail + dodir /var/spool/qmailscan + keepdir /var/spool/qmailscan + for i in quarantine working archive; do + for j in tmp new cur; do + dodir /var/spool/qmailscan/${i}/${j} + keepdir /var/spool/qmailscan/${i}/${j} + done + done + + # Install standard quarantine attachments file + insinto /var/spool/qmailscan + insopts -m 644 -o qmailq -g qmail + doins quarantine-attachments.txt + + # Install qmail-scanner script + insinto /var/qmail/bin + insopts -m 4755 -o qmailq -g qmail + doins qmail-scanner-queue.pl + + # Install documentation + dodoc README CHANGES COPYING + dohtml README.html +} + +pkg_postinst () { + # Setup perlscanner + Version Info + /var/qmail/bin/qmail-scanner-queue.pl -z + /var/qmail/bin/qmail-scanner-queue.pl -g + + einfo "To activate qmail-scanner, please edit your" + einfo "/var/qmail/control/conf-common file and set:" + einfo "QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue.pl" +} diff --git a/mail-filter/qmail-scanner/qmail-scanner-1.16.ebuild b/mail-filter/qmail-scanner/qmail-scanner-1.16.ebuild new file mode 100644 index 000000000000..67bceaa888ab --- /dev/null +++ b/mail-filter/qmail-scanner/qmail-scanner-1.16.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/qmail-scanner-1.16.ebuild,v 1.1 2004/07/17 08:48:36 st_lim Exp $ + +DESCRIPTION="E-Mail virus scanner for qmail." +HOMEPAGE="http://qmail-scanner.sourceforge.net/" +SRC_URI="mirror://sourceforge/qmail-scanner/${P}.tgz" + +DEPEND=">=dev-lang/perl-5.6.1-r1 + >=dev-perl/Time-HiRes-01.20-r2 + >=net-mail/tnef-1.1.1 + >=app-antivirus/f-prot-3.12a + >=mail-filter/maildrop-1.3.9 + >=dev-perl/DB_File-1.803-r2 + >=mail-mta/qmail-1.03-r8 + >=app-arch/unzip-5.42-r1" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="x86 -sparc" +IUSE="" + +src_compile () { + yes | PATH=${PATH}:/opt/f-prot ./configure \ + --domain localhost \ + || die "./configure failed!" +} + +src_install () { + # Create Directory Structure + diropts -m 755 -o qmailq -g qmail + dodir /var/spool/qmailscan + keepdir /var/spool/qmailscan + dodir /var/spool/qmailscan/quarantine + keepdir /var/spool/qmailscan/quarantine + dodir /var/spool/qmailscan/quarantine/tmp + keepdir /var/spool/qmailscan/quarantine/tmp + dodir /var/spool/qmailscan/quarantine/new + keepdir /var/spool/qmailscan/quarantine/new + dodir /var/spool/qmailscan/quarantine/cur + keepdir /var/spool/qmailscan/quarantine/cur + dodir /var/spool/qmailscan/working + keepdir /var/spool/qmailscan/working + dodir /var/spool/qmailscan/working/tmp + keepdir /var/spool/qmailscan/working/tmp + dodir /var/spool/qmailscan/working/new + keepdir /var/spool/qmailscan/working/new + dodir /var/spool/qmailscan/working/cur + keepdir /var/spool/qmailscan/working/cur + dodir /var/spool/qmailscan/archive + keepdir /var/spool/qmailscan/archive + dodir /var/spool/qmailscan/archive/tmp + keepdir /var/spool/qmailscan/archive/tmp + dodir /var/spool/qmailscan/archive/new + keepdir /var/spool/qmailscan/archive/new + dodir /var/spool/qmailscan/archive/cur + keepdir /var/spool/qmailscan/archive/cur + + # Install standard quarantine attachments file + insinto /var/spool/qmailscan + insopts -m 644 -o qmailq -g qmail + doins quarantine-attachments.txt + + # Install qmail-scanner script + insinto /var/qmail/bin + insopts -m 4755 -o qmailq -g qmail + doins qmail-scanner-queue.pl + + # Install documentation + dodoc README CHANGES COPYING + dohtml README.html +} + +pkg_postinst () { + # Setup perlscanner + Version Info + /var/qmail/bin/qmail-scanner-queue.pl -z + /var/qmail/bin/qmail-scanner-queue.pl -g + + einfo + einfo "NOTICE:" + einfo "Set QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue.pl" + einfo "in your /etc/tcp.smtp file to activate qmail-scanner." + einfo +} diff --git a/mail-filter/qmail-scanner/qmail-scanner-1.20.ebuild b/mail-filter/qmail-scanner/qmail-scanner-1.20.ebuild new file mode 100644 index 000000000000..7d9f911b66a5 --- /dev/null +++ b/mail-filter/qmail-scanner/qmail-scanner-1.20.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/qmail-scanner-1.20.ebuild,v 1.1 2004/07/17 08:48:36 st_lim Exp $ + +inherit fixheadtails gcc eutils + +DESCRIPTION="E-Mail virus scanner for qmail." +HOMEPAGE="http://qmail-scanner.sourceforge.net/" +SRC_URI="mirror://sourceforge/qmail-scanner/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~sparc" +IUSE="" + +DEPEND=">=dev-lang/perl-5.6.1-r1 + >=dev-perl/Time-HiRes-01.20-r2 + >=net-mail/tnef-1.1.1 + >=dev-perl/DB_File-1.803-r2 + >=net-mail/ripmime-1.3.0.4 + || ( + >=mail-mta/qmail-1.03-r8 + >=mail-mta/qmail-ldap-1.03-r1 + mail-mta/qmail-mysql + ) + >=app-arch/unzip-5.42-r1 + virtual/antivirus" + +pkg_setup() { + enewgroup qscand 210 + enewuser qscand 210 /bin/false /var/spool/qmailscan qscand +} + +pkg_preinst() { + local oldname="/var/qmail/bin/qmail-scanner-queue.pl" + if [ -f ${oldname} ]; then + newname=${oldname}.`date +%Y%m%d%H%M%S` + einfo "Backing up old qmail-scanner as $newname in case of modifications." + cp ${oldname} ${newname} + chmod 600 ${newname} + fi +} + +src_unpack() { + unpack ${A} + cd ${S} + ht_fix_file autoupdaters/* configure + + EXTRA_VIRII="bagle,beagle,mydoom,sco,maldal,mimail,novarg,shimg" + einfo "Adding items to the SILENT_VIRUSES list (${EXTRA_VIRII})" + sed -e "/^SILENT_VIRUSES/s/\"$/,${EXTRA_VIRII}\"/g" -i configure + + einfo "Forcing use of clamscan instead of clamuko due to detection bug" + sed -e '788,804 d' -i configure +} + +src_compile () { + PATH=${PATH}:/opt/f-prot:/opt/vlnx ./configure \ + --domain localhost \ + --batch \ + --log-details yes \ + --mime-unpacker "ripmime" \ + || die "./configure failed!" + + #patch for suidperl -> perl + EPATCH_SINGLE_MSG="Changing suidperl to plain perl" \ + epatch ${FILESDIR}/qmail-scanner-queue.pl.patch + + + # build for qmail-scanner-queue wrapper, so we don't need suidperl + cd contrib + `gcc-getCC` ${CFLAGS} -o qmail-scanner-queue qmail-scanner-queue.c || die +} + +src_install () { + # Create Directory Structure + diropts -m 755 -o qscand -g qscand + dodir /var/spool/qmailscan + keepdir /var/spool/qmailscan + for i in quarantine working archive; do + for j in tmp new cur; do + dodir /var/spool/qmailscan/${i}/${j} + keepdir /var/spool/qmailscan/${i}/${j} + done + done + dodir /var/spool/qmailscan/tmp + keepdir /var/spool/qmailscan/tmp + + # Install standard quarantine attachments file + insinto /var/spool/qmailscan + insopts -m 644 -o qscand -g qscand + doins quarantine-attachments.txt + + # create quarantine.log and viruses.log + touch quarantine.log + insinto /var/spool/qmailscan + insopts -m 644 -o qscand -g qscand + doins quarantine.log + dosym quarantine.log ${DESTDIR}/var/spool/qmailscan/viruses.log + + # Install qmail-scanner wrapper + insinto /var/qmail/bin + insopts -m 4755 -o qscand -g qscand + doins contrib/qmail-scanner-queue + + # Install qmail-scanner script + insinto /var/qmail/bin + insopts -m 4755 -o qscand -g qscand + doins qmail-scanner-queue.pl + + insinto /etc/logrotate.d/ + insopts -m 644 -o root -g root + newins ${FILESDIR}/qmailscanner.logrotate qmail-scanner + + exeinto /etc/cron.daily/ + newexe ${FILESDIR}/qmailscanner.cronjob qmail-scanner + + # Install documentation + dodoc README CHANGES COPYING + dohtml README.html FAQ.php TODO.php configure-options.php manual-install.php perlscanner.php + + docinto contrib + cd contrib + dodoc qs2mrtg.pl mrtg-qmail-scanner.cfg +} + +pkg_postinst () { + einfo "Fixing ownerships" + chown -R qscand:qscand /var/spool/qmailscan/tmp /var/spool/qmailscan/working /var/spool/qmailscan/quarantine* /var/spool/qmailscan/archive /var/spool/qmailscan/qmail* + touch /var/qmail/bin/qmail-scanner-queue.pl + + # Setup perlscanner + Version Info + #/var/qmail/bin/qmail-scanner-queue.pl -z + #/var/qmail/bin/qmail-scanner-queue.pl -g + chmod -s ${ROOT}/var/qmail/bin/qmail-scanner-queue.pl + ${ROOT}/var/qmail/bin/qmail-scanner-queue -z + ${ROOT}/var/qmail/bin/qmail-scanner-queue -g + + einfo "To activate qmail-scanner, please edit your" + einfo "/var/qmail/control/conf-common file and set:" + einfo "export QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue" + einfo "Or place it in your tcprules file." + ewarn "Please note that it was a call to qmail-scanner-queue.pl before," + ewarn "but this is now changed to use a wrapper to improve security!" + ewarn "Once you have changed to the wrapper, you can remove the setuid " + ewarn "bit on qmail-scanner-queue.pl" +} |