From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Sep 12 17:20:01 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC0BD16A420 for ; Wed, 12 Sep 2007 17:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8C97913C45D for ; Wed, 12 Sep 2007 17:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l8CHK18L017736 for ; Wed, 12 Sep 2007 17:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l8CHK1sc017735; Wed, 12 Sep 2007 17:20:01 GMT (envelope-from gnats) Resent-Date: Wed, 12 Sep 2007 17:20:01 GMT Resent-Message-Id: <200709121720.l8CHK1sc017735@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Felippe de Meirelles Motta Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A22316A417 for ; Wed, 12 Sep 2007 17:14:39 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 2AE0413C478 for ; Wed, 12 Sep 2007 17:14:39 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l8CHEc0s072425 for ; Wed, 12 Sep 2007 17:14:38 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l8CHEcOG072424; Wed, 12 Sep 2007 17:14:38 GMT (envelope-from nobody) Message-Id: <200709121714.l8CHEcOG072424@www.freebsd.org> Date: Wed, 12 Sep 2007 17:14:38 GMT From: Felippe de Meirelles Motta To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/116312: [PATCH] mail/qmail-scanner X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2007 17:20:01 -0000 >Number: 116312 >Category: ports >Synopsis: [PATCH] mail/qmail-scanner >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Sep 12 17:20:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Felippe de Meirelles Motta >Release: FreeBSD 6.2-STABLE i386 >Organization: FreeBSD Brasil LTDA >Environment: FreeBSD dev.bh.freebsdbrasil.com.br 6.2-STABLE FreeBSD 6.2-STABLE #0: Mon Jun 25 13:46:23 BRT 2007 lippe@dev.bh.freebsdbrasil.com.br:/usr/obj/usr/src/sys/GENERIC i386 >Description: - The script configure wasn't being executed correctly, therefore, script that would have to be generated (qmail-scanner-queue.pl), this correct one for execution of the application. Reported by William Olson , thanks! :) >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/mail/qmail-scanner/Makefile,v retrieving revision 1.17 diff -u -r1.17 Makefile --- Makefile 9 Sep 2007 07:49:32 -0000 1.17 +++ Makefile 12 Sep 2007 16:42:35 -0000 @@ -17,18 +17,30 @@ MANUAL_PACKAGE_BUILD= Requires qmail built with non-standard setting +RUN_DEPENDS+= ${BUILD_DEPENDS} BUILD_DEPENDS+= reformime:${PORTSDIR}/mail/maildrop \ ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ ${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 -QMAIL_QUEUE= ${QMAIL_PREFIX}/bin/qmail-queue +CONFLICTS= qmail-scanner-1.* USE_PERL5= yes +USE_QMAIL= yes NO_BUILD= yes -USE_QMAIL= yes +SPOOLDIR?= /var/spool/qscand +PLIST_SUB= SPOOLDIR=${SPOOLDIR} -CONFLICTS= qmail-scanner-1.* +QMAIL_QUEUE= ${QMAIL_PREFIX}/bin/qmail-queue + +HAS_CONFIGURE= yes +CONFIGURE_ARGS+= \ + --qmaildir "${QMAIL_PREFIX}" \ + --spooldir "${SPOOLDIR}" \ + --bindir "${PREFIX}/bin" \ + --qmail-queue-binary "${QMAIL_QUEUE}" \ + --mime-unpacker "reformime" \ + --batch QS_USER?= qscand QS_ADMIN?= postmaster @@ -42,30 +54,20 @@ test-sophie.pl test-trophie.pl test_installation.sh test_password.zip \ qmail-scanner-queue.c -SPOOLDIR?= /var/spool/qscand -PLIST_SUB= SPOOLDIR=${SPOOLDIR} - OPTIONS= TNEF "Mark Simpson's Patch (Recommended)" on \ FIX_MIME "Fix broken MIME messages" off \ REDUNDANT "Scan attachments and body mails" on \ NORMALIZE "Decode encoded headers per MIME Base64" off \ UNZIP "Force UNZIP all zip files" off -HAS_CONFIGURE= yes -CONFIGURE_ARGS+=--qmaildir "${QMAIL_PREFIX}" \ - --spooldir "${SPOOLDIR}" \ - --bindir "${PREFIX}/bin" \ - --qmail-queue-binary "${QMAIL_QUEUE}" \ - --mime-unpacker "reformime" \ - --batch - -SUB_FILES= pkg-message pkg-install -SUB_LIST= SPOOLDIR="${SPOOLDIR}" \ - QS_USER=${QS_USER} \ - QS_ID=${QS_ID} +SUB_FILES= pkg-install pkg-message +SUB_LIST+= QS_USER=${QS_USER} \ + QS_ID=${QS_ID} \ + SPOOLDIR=${SPOOLDIR} -.include +PKGINSTALL?= ${WRKDIR}/pkg-install +# Options .if defined(WITH_TNEF) BUILD_DEPENDS+= ${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef .endif @@ -216,11 +218,8 @@ @${ECHO_MSG} " NOTE: Numbers over 100 cause Q-S to not cleanup working files" @${ECHO_MSG} " (Default: yes, Options: yes|no|number)" @${ECHO_MSG} "" - -do-configure: @${SED} -e 's,%%SPOOLDIR%%,${SPOOLDIR},g; s,%%QS_USER%%,${QS_USER},g; \ - s,%%QS_ID%%,${QS_ID},g; s,%%PREFIX%%,${PREFIX},g' \ - ${FILESDIR}/pkg-install.in > ${WRKDIR}/pkg-install + s,%%QS_ID%%,${QS_ID},g' ${FILESDIR}/pkg-install.in > ${PKGINSTALL} @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL do-install: @@ -234,21 +233,17 @@ . endfor .endif @${MKDIR} ${SPOOLDIR} + @${INSTALL_SCRIPT} ${WRKSRC}/qmail-scanner-queue.pl ${PREFIX}/bin @${INSTALL_DATA} ${WRKSRC}/quarantine-events.txt ${SPOOLDIR}/quarantine-events.txt.sample - @${INSTALL_SCRIPT} ${WRKSRC}/qmail-scanner-queue.template ${PREFIX}/bin/qmail-scanner-queue.pl - @${ECHO_MSG} "" - @${CAT} ${PKGMESSAGE} - @${ECHO_MSG} "" - -post-install: @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${CAT} ${PKGMESSAGE} post-deinstall: - @${ECHO_MSG} "" + @${ECHO_MSG} @${ECHO_MSG} "If you're not updating this port, you can delete directory '${SPOOLDIR}'." @${ECHO_MSG} "" test: @${WRKSRC}/contrib/test_installation.sh -doit -.include +.include Index: files/pkg-install.in =================================================================== RCS file: /home/ncvs/ports/mail/qmail-scanner/files/pkg-install.in,v retrieving revision 1.2 diff -u -r1.2 pkg-install.in --- files/pkg-install.in 9 Sep 2007 07:49:33 -0000 1.2 +++ files/pkg-install.in 12 Sep 2007 16:42:35 -0000 @@ -1,7 +1,5 @@ #!/bin/sh -PREFIX=%%PREFIX%% - PW="/usr/sbin/pw" CHOWN="/usr/sbin/chown" CHMOD="/bin/chmod" @@ -36,8 +34,12 @@ # Mod and owner ${CHOWN} -R ${QS_USER}:${QS_USER} ${SPOOLDIR} - ${CHOWN} ${QS_USER}:${QS_USER} ${PREFIX}/bin/qmail-scanner-queue.pl - ${CHMOD} 4755 ${PREFIX}/bin/qmail-scanner-queue.pl + ${CHOWN} ${QS_USER}:${QS_USER} ${PKG_PREFIX}/bin/qmail-scanner-queue.pl + ${CHMOD} 4755 ${PKG_PREFIX}/bin/qmail-scanner-queue.pl + + # Initialize + ${PKG_PREFIX}/bin/qmail-scanner-queue.pl -z + ${PKG_PREFIX}/bin/qmail-scanner-queue.pl -g # Mod and owner (final) ${CHOWN} -R ${QS_USER}:${QS_USER} ${SPOOLDIR} Index: files/pkg-message.in =================================================================== RCS file: /home/ncvs/ports/mail/qmail-scanner/files/pkg-message.in,v retrieving revision 1.2 diff -u -r1.2 pkg-message.in --- files/pkg-message.in 9 Sep 2007 07:49:33 -0000 1.2 +++ files/pkg-message.in 12 Sep 2007 16:42:35 -0000 @@ -2,25 +2,31 @@ Congratulations! Qmail-Scanner is now installed! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - - Please, configure correctly your anti-virus and anti-spam; - - You HAVE to reinstall this port each time you add or remo- -ve an Anti-Virus or Anti-Spam; - - Now configure the environment variable to use qmail-scanner: +Please, configure correctly your anti-virus and anti-spam. You +HAVE to reinstall this port each time you add or remove an +Anti-Virus or Anti-Spam; - You just need to add for your tcpserver file (generally called +Now configure the environment variable to use qmail-scanner: + +You just need to add for your tcpserver file (generally called as: tcp.smtp): - QMAILQUEUE="%%PREFIX%%/bin/qmail-scanner-queue.pl" - Or create an new file in /service/smtpd/env, with the following +QMAILQUEUE="%%PREFIX%%/bin/qmail-scanner-queue.pl" + +Or create an new file in /service/smtpd/env, with the following content and called as "QMAILQUEUE": - %%PREFIX%%/bin/qmail-scanner-queue.pl + +%%PREFIX%%/bin/qmail-scanner-queue.pl NOTE: always you change anything in your environment dir, you just need to restart your smtpd, for it use: "svc -k /service/smtpd". You can test your installation by running 'make test' in port dir. -Please, run the following commands: +Remember to rename quarantine-events.txt.sample in /var/spool/qscand +and then run "qmail-scanner-queue.pl -g" to generate DB version. + +Please log into an unpriviledged account and run -%%PREFIX%%/bin/qmail-scanner-queue.pl -z %%PREFIX%%/bin/qmail-scanner-queue.pl -g + >Release-Note: >Audit-Trail: >Unformatted: