diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2009-05-27 10:53:41 +0000 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2009-05-27 10:53:41 +0000 |
commit | 0e02759e355251dc8d2ada859bc79ce0779187dd (patch) | |
tree | 29b548941f66c1ecfb98bf46d6851a3fc1e81b84 /mail-filter/qmail-scanner | |
parent | stable x86, bug 271123 (diff) | |
download | gentoo-2-0e02759e355251dc8d2ada859bc79ce0779187dd.tar.gz gentoo-2-0e02759e355251dc8d2ada859bc79ce0779187dd.tar.bz2 gentoo-2-0e02759e355251dc8d2ada859bc79ce0779187dd.zip |
Version bump to 2.06
(Portage version: 2.1.6.11/cvs/Linux x86_64)
Diffstat (limited to 'mail-filter/qmail-scanner')
-rw-r--r-- | mail-filter/qmail-scanner/ChangeLog | 9 | ||||
-rw-r--r-- | mail-filter/qmail-scanner/files/qmail-scanner-2.02.logrotate | 4 | ||||
-rw-r--r-- | mail-filter/qmail-scanner/files/qmail-scanner-2.06.logrotate (renamed from mail-filter/qmail-scanner/files/qmail-scanner-2.01.logrotate) | 0 | ||||
-rw-r--r-- | mail-filter/qmail-scanner/qmail-scanner-2.06.ebuild | 190 |
4 files changed, 198 insertions, 5 deletions
diff --git a/mail-filter/qmail-scanner/ChangeLog b/mail-filter/qmail-scanner/ChangeLog index 567f249c4e0e..a16eca58a7d3 100644 --- a/mail-filter/qmail-scanner/ChangeLog +++ b/mail-filter/qmail-scanner/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for mail-filter/qmail-scanner # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/ChangeLog,v 1.52 2009/05/17 16:24:31 nixnut Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/ChangeLog,v 1.53 2009/05/27 10:53:41 tupone Exp $ + +*qmail-scanner-2.06 (27 May 2009) + + 27 May 2009; Alfredo Tupone <tupone@gentoo.org> + -files/qmail-scanner-2.01.logrotate, -files/qmail-scanner-2.02.logrotate, + +files/qmail-scanner-2.06.logrotate, +qmail-scanner-2.06.ebuild: + Version bump to 2.06 17 May 2009; nixnut <nixnut@gentoo.org> qmail-scanner-2.05.ebuild: ppc stable #249893 diff --git a/mail-filter/qmail-scanner/files/qmail-scanner-2.02.logrotate b/mail-filter/qmail-scanner/files/qmail-scanner-2.02.logrotate deleted file mode 100644 index a0f3cbd880e8..000000000000 --- a/mail-filter/qmail-scanner/files/qmail-scanner-2.02.logrotate +++ /dev/null @@ -1,4 +0,0 @@ -/var/spool/qscan/qmail-queue.log /var/spool/qscan/quarantine.log /var/spool/qscan/mailstats.csv { - weekly - create 0600 qscand qscand -} diff --git a/mail-filter/qmail-scanner/files/qmail-scanner-2.01.logrotate b/mail-filter/qmail-scanner/files/qmail-scanner-2.06.logrotate index a0f3cbd880e8..a0f3cbd880e8 100644 --- a/mail-filter/qmail-scanner/files/qmail-scanner-2.01.logrotate +++ b/mail-filter/qmail-scanner/files/qmail-scanner-2.06.logrotate diff --git a/mail-filter/qmail-scanner/qmail-scanner-2.06.ebuild b/mail-filter/qmail-scanner/qmail-scanner-2.06.ebuild new file mode 100644 index 000000000000..25e26d783b9e --- /dev/null +++ b/mail-filter/qmail-scanner/qmail-scanner-2.06.ebuild @@ -0,0 +1,190 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/qmail-scanner-2.06.ebuild,v 1.1 2009/05/27 10:53:41 tupone Exp $ + +inherit fixheadtails toolchain-funcs eutils + +Q_S_DATE=20090419 +DESCRIPTION="E-Mail virus scanner for qmail." +HOMEPAGE="http://qmail-scanner.sourceforge.net/" +SRC_URI="mirror://sourceforge/qmail-scanner/${P}.tgz + http://toribio.apollinare.org/qmail-scanner/download/q-s-${PV}st-${Q_S_DATE}.patch.gz" + +IUSE="clamav spamassassin" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +RESTRICT="userpriv" + +RDEPEND="dev-lang/perl + virtual/perl-Time-HiRes + net-mail/tnef + virtual/perl-DB_File + mail-filter/maildrop + virtual/qmail + app-arch/unzip + sys-process/daemontools + clamav? ( app-antivirus/clamav ) + spamassassin? ( mail-filter/spamassassin )" +DEPEND="${RDEPEND}" + +pkg_setup() { + enewgroup qscand 210 + enewuser qscand 210 -1 /var/spool/qscan qscand + use clamav && usermod -a -G qscand,nofiles clamav +} + +pkg_preinst() { + local oldname="/var/qmail/bin/qmail-scanner-queue.pl" + if [ -f ${oldname} ]; then + newname=${oldname}.`date +%Y%m%d%H%M%S` + elog "Backing up old qmail-scanner as $newname in case of modifications." + cp ${oldname} ${newname} + chmod 600 ${newname} + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${DISTDIR}"/q-s-${PV}st-${Q_S_DATE}.patch.gz + ht_fix_file autoupdaters/* configure + sed -i \ + -e "s:/var/spool/qscand:/var/spool/qscan:g" \ + README-st-patch.html \ + README-st-patch.txt || die "Fixing doc with sed failed" + + EXTRA_VIRII="bagle,beagle,mydoom,sco,maldal,mimail,novarg,shimg,bugler,cissi,cissy,dloade,netsky,qizy" + elog "Adding items to the SILENT_VIRUSES list (${EXTRA_VIRII})" + sed -e "/^SILENT_VIRUSES/s/\"$/,${EXTRA_VIRII}\"/g" -i configure +} + +src_compile () { + local myconf + + addpredict /var/log/kav/kavscan.log + addpredict /opt/bdc/plugins.htm + + use spamassassin && myconf="--virus-to-delete yes --sa-quarantine 2.1 --sa-delete 4.2 --sa-reject no --sa-subject SPAM: --sa-delta 0.5 --sa-alt yes" + + PATH=${PATH}:/opt/f-prot:/opt/vlnx ./configure \ + --domain localhost \ + --batch \ + --log-details yes \ + --skip-setuid-test \ + ${myconf} \ + || die "./configure failed!" + + # build for qmail-scanner-queue wrapper, so we don't need suidperl + cd contrib + $(tc-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/qscan + keepdir /var/spool/qscan + diropts -m 750 -o qscand -g qscand + dodir /var/spool/qscan/quarantine + for i in quarantine/{viruses,policy,spam} working archives; do + for j in tmp new cur; do + dodir /var/spool/qscan/${i}/${j} + keepdir /var/spool/qscan/${i}/${j} + done + done + dodir /var/spool/qscan/tmp + keepdir /var/spool/qscan/tmp + + # Install standard quarantine events file + insinto /var/spool/qscan + insopts -m 644 -o qscand -g qscand + doins quarantine-events.txt + + # create quarantine.log and viruses.log + touch quarantine.log + insinto /var/spool/qscan + insopts -m 644 -o qscand -g qscand + doins quarantine.log + dosym quarantine.log ${DESTDIR}/var/spool/qscan/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 0755 -o qscand -g qscand + doins qmail-scanner-queue.pl + + insinto /etc/logrotate.d/ + insopts -m 644 -o root -g root + newins "${FILESDIR}"/${P}.logrotate qmail-scanner + + exeinto /etc/cron.daily/ + newexe "${FILESDIR}"/qmailscanner.cronjob qmail-scanner + + # Install documentation + dodoc README CHANGES + dohtml README.html FAQ.php TODO.php configure-options.php manual-install.php perlscanner.php + + docinto contrib + cd "${S}"/contrib + dodoc spamc-nice.eml \ + test-trophie.pl \ + logrotate.qmail-scanner \ + sub-avpdaemon.pl \ + logging_first_80_chars.eml \ + spamc-nasty.eml \ + avpdeamon.init \ + test_installation.sh \ + test-sophie.pl \ + reformime-test.eml \ + sub-sender-cache.pl \ + rbl_scanner.txt \ + test-clamd.pl \ + qs2mrtg.pl \ + mrtg-qmail-scanner.cfg \ + check_AV_daemons \ + patch_for_nod32_single_user.eml \ + qmail-delay \ + qs-scanner-report.sh \ + qs_config.sh \ + qscan-spam-to-users.pl \ + test-avgd.pl \ + test_password.zip \ + vpopmail-issues.eml +} + +pkg_postinst () { + einfo "Fixing ownerships" + chown -R qscand:qscand /var/spool/qscan + touch /var/qmail/bin/qmail-scanner-queue.pl + + # Setup perlscanner + Version Info + 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 + + elog "To activate qmail-scanner, please edit your" + elog "/var/qmail/control/conf-common file and set:" + elog "export QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue" + elog "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" + + ewarn "If this is an upgrade from <=2.0.1 the home directory of the qscand" + ewarn "user is changed. Please update it manually to /var/spool/qscan" + ewarn "or remove the user and emerge again this package" + + if use clamav; then + ewarn "To allow clamav integration comment-out in /etc/clamd.conf:" + ewarn "AllowSupplementaryGroups putting yes." + ewarn "After that, restart clamd with" + ewarn "/etc/init.d/clamd restart" + fi +} |