From root@xeon-web.ouestil.com  Sun Aug 24 16:44:12 2003
Return-Path: <root@xeon-web.ouestil.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AFB0016A4C0
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 16:44:12 -0700 (PDT)
Received: from xeon-web.ouestil.com (ilestou.com [212.11.50.148])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E14F243FA3
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 16:44:08 -0700 (PDT)
	(envelope-from root@xeon-web.ouestil.com)
Received: (from root@localhost)
	by xeon-web.ouestil.com (8.12.3/8.11.6) id h7ONi5vb089004;
	Mon, 25 Aug 2003 01:44:05 +0200 (CEST)
	(envelope-from root)
Message-Id: <200308242344.h7ONi5vb089004@xeon-web.ouestil.com>
Date: Mon, 25 Aug 2003 01:44:05 +0200 (CEST)
From: Moeti.FreeBSD@xeon-web.ouestil.com
Reply-To: "[Moeti]" <moeti-freebsd@ouestil.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: moeti-freebsd@ouestil.com
Subject: New port: qmail-scanner (anti-virus and spam scanner for qmail)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         55941
>Category:       ports
>Synopsis:       New port: mail/qmail-scanner (anti-virus and spam scanner for qmail)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sergei
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 24 16:50:14 PDT 2003
>Closed-Date:    Thu Dec 11 04:50:07 PST 2003
>Last-Modified:  Thu Dec 11 04:50:07 PST 2003
>Originator:     Moeti FreeBSD
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
SimpleRezo
>Environment:
System: FreeBSD xeon-web.ouestil.com 4.8-RELEASE FreeBSD 4.8-RELEASE #36: Sun Jun 29 17:51:13 CEST 2003 root@:/usr/obj/usr/src/sys/MOETI-BI-XEON i386


>Description:

qmail-scanner is a virus scanning interface to qmail.  It provides a
convenient and standardized way of using any commercial virus scanner
with qmail, as well as a sophisticated content filter which can be used
to provide protection from specific virii even in the absence of a
commercial scanner.

i have successfully tested it on my FreeBSD Box with:
  - SpamAssassin (installed by ports of course)
  - clam Anti-Virus (idem)
  - F-Prot Anti-Virus for BSD file servers
  	(evaluation version from www.fprot.com)

>How-To-Repeat:

because this ports need reformime from MailDrop, i will submit a
"mail/maildrop-reformime" port in few days ;-)

i have included my own creation patch for internationalization,
because the configure script of qmail-scanner don't appreciate a lot
a environnement with LANG set with charset (like "fr_FR.ISO8859-1")...
i have submitted this patch on sourceforge, of course ;-)

>Fix:

	

--- qmail-scanner.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/ports/mail/qmail-scanner/
#	/usr/ports/mail/qmail-scanner/distinfo
#	/usr/ports/mail/qmail-scanner/Makefile
#	/usr/ports/mail/qmail-scanner/pkg-descr
#	/usr/ports/mail/qmail-scanner/pkg-plist
#	/usr/ports/mail/qmail-scanner/files
#	/usr/ports/mail/qmail-scanner/files/patch-configure
#	/usr/ports/mail/qmail-scanner/pkg-message
#
echo c - /usr/ports/mail/qmail-scanner/
mkdir -p /usr/ports/mail/qmail-scanner/ > /dev/null 2>&1
echo x - /usr/ports/mail/qmail-scanner/distinfo
sed 's/^X//' >/usr/ports/mail/qmail-scanner/distinfo << 'END-of-/usr/ports/mail/qmail-scanner/distinfo'
XMD5 (qmail-scanner-1.20rc2.tgz) = 17033a2de011e2f1203136b3a3959d7c
END-of-/usr/ports/mail/qmail-scanner/distinfo
echo x - /usr/ports/mail/qmail-scanner/Makefile
sed 's/^X//' >/usr/ports/mail/qmail-scanner/Makefile << 'END-of-/usr/ports/mail/qmail-scanner/Makefile'
X# New ports collection makefile for:   qmail-scanner
X# Date created:	       24 august 2003
X# Whom:                moeti
X#
X# $FreeBSD$
X#
X
XPORTNAME=	qmail-scanner
XPORTVERSION=	1.20r2
XCATEGORIES=	mail security
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	qmail-scanner
XDISTNAME=	${PORTNAME}-1.20rc2
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	moeti-freebsd@ouestil.com
XCOMMENT=	Content/Anti-virus Scanner for qmail
X
X# A normal qmail installation puts everything into /var/qmail/.
X# Must match your qmail installation
XPREFIX?=	/var/qmail
X
XBUILD_DEPENDS=	${PREFIX}/bin/qmail-queue:${PORTSDIR}/mail/qmail \
X		${SITE_PERL}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
X		${LOCALBASE}/bin/reformime:${PORTSDIR}/mail/maildrop-reformime
X
XUSE_PERL5=	yes
XNO_BUILD=	yes
X
X# Barely optionnal
X.if !defined(WITHOUT_TNF)
XBUILD_DEPEND+=	${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef
X.endif
X
X# Options
XQMAILSCAN_ADMIN?=	root
XQMAILSCAN_NOTIFY?=	sender,recips,admin
X.if defined(QMAILSCAN_DOMAIN)
XCONFIGURE_ARGS+=	--domain ${QMAILSCAN_DOMAIN}
X.endif
X.if defined(QMAILSCAN_LOCALDOMAINS)
XCONFIGURE_ARGS+=	--local-domains  "${QMAILSCAN_LOCALDOMAINS}"
X.endif
X
XSPOOLDIR=	${PREFIX}/qmailscan
X
XHAS_CONFIGURE=	yes
XCONFIGURE_ARGS+=--qmaildir ${PREFIX} --spooldir ${SPOOLDIR} --bindir ${PREFIX}/bin \
X		--admin ${QMAILSCAN_ADMIN} --notify "${QMAILSCAN_NOTIFY}" \
X		--silent-viruses auto \
X		--archive no --redundant yes --unzip yes \
X		--add-dscr-hdrs yes \
X		--scanners auto \
X		--fix-mime yes \
X		--log-details syslog --debug no \
X		--batch
X
Xdo-install:
X.for i in quarantine working archives
X.for j in tmp cur new
X	${MKDIR} ${SPOOLDIR}/$i/$j
X	${TOUCH} ${SPOOLDIR}/$i/$j/.empty
X.endfor
X.endfor
X	${CP} ${WRKSRC}/quarantine-attachments.txt ${SPOOLDIR}/quarantine-attachments.sample
X.if !exists(${SPOOLDIR}/quarantine-attachments.txt)
X	${CP} ${WRKSRC}/quarantine-attachments.txt ${SPOOLDIR}
X.endif
X	${CHOWN} -R qmailq:qmail ${SPOOLDIR}
X	${CP} ${WRKSRC}/qmail-scanner-queue.pl ${PREFIX}/bin/
X	${CHOWN} -R qmailq:qmail ${PREFIX}/bin/
X	${CHMOD} 4755 ${PREFIX}/bin/qmail-scanner-queue.pl
X
X	${PREFIX}/bin/qmail-scanner-queue.pl -z
X	${PREFIX}/bin/qmail-scanner-queue.pl -g
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
Xpost-deinstall:
X	@${ECHO_MSG}
X	@${ECHO_MSG} "If you're not updating this ports, you can delete directory '${SPOOLDIR}'."
X	@${ECHO_MSG} ""
X
Xtest:
X	@${WRKSRC}/contrib/test_installation.sh -doit
X
X.include <bsd.port.mk>
END-of-/usr/ports/mail/qmail-scanner/Makefile
echo x - /usr/ports/mail/qmail-scanner/pkg-descr
sed 's/^X//' >/usr/ports/mail/qmail-scanner/pkg-descr << 'END-of-/usr/ports/mail/qmail-scanner/pkg-descr'
XQmail-Scanner, is a Email content scanner that enables a Qmail Email server to
Xscan all Email it receives for certain characteristics (normally viruses),
Xand react accordingly.
X
XIf you have a commercial virus scanner (eg, Sophos sweep, McAfee
Xuvscan, etc) installed when you build qmail-scanner, qmail-scanner
Xwill configure itself to use that.  Otherwise, it will only use its
Xinternal content filter which only allows you to block mail based
Xon text in the subject/body, general types of attachments, etc.
X
X
XWWW: http://qmail-scanner.sourceforge.net/
END-of-/usr/ports/mail/qmail-scanner/pkg-descr
echo x - /usr/ports/mail/qmail-scanner/pkg-plist
sed 's/^X//' >/usr/ports/mail/qmail-scanner/pkg-plist << 'END-of-/usr/ports/mail/qmail-scanner/pkg-plist'
Xbin/qmail-scanner-queue.pl
Xqmailscan/qmail-scanner-queue-version.txt
Xqmailscan/quarantine-attachments.db
Xqmailscan/quarantine-attachments.sample
Xqmailscan/archives/cur/.empty
Xqmailscan/archives/new/.empty
Xqmailscan/archives/tmp/.empty
Xqmailscan/quarantine/cur/.empty
Xqmailscan/quarantine/new/.empty
Xqmailscan/quarantine/tmp/.empty
Xqmailscan/working/cur/.empty
Xqmailscan/working/new/.empty
Xqmailscan/working/tmp/.empty
X@dirrm qmailscan/archives/cur
X@dirrm qmailscan/archives/new
X@dirrm qmailscan/archives/tmp
X@dirrm qmailscan/archives
X@dirrm qmailscan/quarantine/cur
X@dirrm qmailscan/quarantine/new
X@dirrm qmailscan/quarantine/tmp
X@dirrm qmailscan/quarantine
X@dirrm qmailscan/working/cur
X@dirrm qmailscan/working/new
X@dirrm qmailscan/working/tmp
X@dirrm qmailscan/working
END-of-/usr/ports/mail/qmail-scanner/pkg-plist
echo c - /usr/ports/mail/qmail-scanner/files
mkdir -p /usr/ports/mail/qmail-scanner/files > /dev/null 2>&1
echo x - /usr/ports/mail/qmail-scanner/files/patch-configure
sed 's/^X//' >/usr/ports/mail/qmail-scanner/files/patch-configure << 'END-of-/usr/ports/mail/qmail-scanner/files/patch-configure'
X--- configure.orig	Fri Aug 22 02:06:54 2003
X+++ configure	Sun Aug 24 23:32:50 2003
X@@ -48,6 +48,8 @@
X     QSLANG="en_GB"
X fi
X 
X+QSLANG=`echo $QSLANG|sed 's/\..*//'`
X+
X if [ ! -d "./locale/$QSLANG" ]; then
X     echo "
X 
END-of-/usr/ports/mail/qmail-scanner/files/patch-configure
echo x - /usr/ports/mail/qmail-scanner/pkg-message
sed 's/^X//' >/usr/ports/mail/qmail-scanner/pkg-message << 'END-of-/usr/ports/mail/qmail-scanner/pkg-message'
X****************************************************
XNOTES:
X - You have to configure your anti-virus and anti-spams products!
X - You HAVE to reinstall this port each time you add or remove one!
X
XNow, you have to modify your qmail startup files to call qmail-scanner.
XIn most case, you just need to add:
X  export QMAILQUEUE="${PREFIX}/bin/qmail-scanner-queue.pl"
Xto your tcpserver startup file.
X
XYou can test installation by running 'make test' in port dir.
X****************************************************
END-of-/usr/ports/mail/qmail-scanner/pkg-message
exit
--- qmail-scanner.shar ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sergei 
Responsible-Changed-By: sergei 
Responsible-Changed-When: Fri Oct 24 06:45:18 PDT 2003 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55941 

From: =?iso-8859-1?Q?MOULIN_Cl=E9ment?= <mais@ouestil.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <sergei@freebsd.org>
Cc:  
Subject: Re: ports/55941: New port: qmail-scanner (anti-virus and spam scanner for qmail)
Date: Sat, 25 Oct 2003 05:45:32 +0200

 Mmmm
 
 In fact, at this stage, i am a more up-to-date version to submit to you.
 And the port himself is more 'clean' (use of pkg-install) ;-)
 
 IMPORTANT NOTICE
 Since qmail-scanner-1.20r3 we need a user 'qscand:qscand', created by
 pkg-install script with uid/gid of 98.
 
 Thank you for including this in FreeBSD!
 
 --- qmail-scanner-1.20r4.shar begins here ---
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #       qmail-scanner/
 #       qmail-scanner/distinfo
 #       qmail-scanner/Makefile
 #       qmail-scanner/pkg-descr
 #       qmail-scanner/pkg-plist
 #       qmail-scanner/files
 #       qmail-scanner/files/patch-configure
 #       qmail-scanner/files/patch-spams
 #       qmail-scanner/pkg-message
 #       qmail-scanner/pkg-install
 #
 echo c - qmail-scanner/
 mkdir -p qmail-scanner/ > /dev/null 2>&1
 echo x - qmail-scanner/distinfo
 sed 's/^X//' >qmail-scanner/distinfo << 'END-of-qmail-scanner/distinfo'
 XMD5 (qmail-scanner-1.20rc4.tgz) =3D 3324c752ce4d0d85d5a68821722d7240
 END-of-qmail-scanner/distinfo
 echo x - qmail-scanner/Makefile
 sed 's/^X//' >qmail-scanner/Makefile << 'END-of-qmail-scanner/Makefile'
 X# New ports collection makefile for:   qmail-scanner
 X# Date created:               24 august 2003
 X# Whom:                moeti
 X#
 X# $FreeBSD$
 X#
 X
 XPORTNAME=3D      qmail-scanner
 XPORTVERSION=3D   1.20r4
 XCATEGORIES=3D    mail security
 XMASTER_SITES=3D  ${MASTER_SITE_SOURCEFORGE}
 XMASTER_SITE_SUBDIR=3D    qmail-scanner
 XDISTNAME=3D      ${PORTNAME}-1.20rc4
 XEXTRACT_SUFX=3D  .tgz
 X
 XMAINTAINER=3D    moeti-freebsd@ouestil.com
 XCOMMENT=3D       Content/Anti-virus Scanner for qmail
 X
 X# A normal qmail installation puts everything into /var/qmail/.
 X# Must match your qmail installation
 XPREFIX?=3D       /var/qmail
 X
 XBUILD_DEPENDS=3D ${PREFIX}/bin/qmail-queue:${PORTSDIR}/mail/qmail \
 X
 ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes =
 \
 X
 ${LOCALBASE}/bin/reformime:${PORTSDIR}/mail/maildrop-reformime
 X
 XUSE_PERL5=3D     yes
 XNO_BUILD=3D      yes
 X
 X# Barely optionnal
 X.if !defined(WITHOUT_TNF)
 XBUILD_DEPEND+=3D ${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef
 X.endif
 X
 X# Options
 XQMAILSCAN_ADMIN?=3D      root
 X.if defined(QMAILSCAN_ADMINREALNAME)
 XCONFIGURE_ARGS+=3D       --admin-realname "${QMAILSCAN_ADMINREALNAME}"
 X.endif
 XQMAILSCAN_NOTIFY?=3D     sender,recips,admin
 X.if defined(QMAILSCAN_LOCALDOMAINS)
 XCONFIGURE_ARGS+=3D       --local-domains "${QMAILSCAN_LOCALDOMAINS}"
 X.endif
 X.if defined(QMAILSCAN_SPAMSREDIRECT)
 XCONFIGURE_ARGS+=3D       --spams-redirect "${QMAILSCAN_SPAMSREDIRECT}"
 X.endif
 X.if defined(QMAILSCAN_SPAMSTOSUFFIX)
 XCONFIGURE_ARGS+=3D       --spams-tosuffix "${QMAILSCAN_SPAMSTOSUFFIX}"
 X.endif
 X
 XSPOOLDIR=3D      ${PREFIX}/qmailscan
 X
 XHAS_CONFIGURE=3D yes
 XCONFIGURE_ARGS+=3D--qmaildir ${PREFIX} --spooldir ${SPOOLDIR} --bindir
 ${PREFIX}/bin \
 X               --admin "${QMAILSCAN_ADMIN}" --notify =
 "${QMAILSCAN_NOTIFY}"
 \
 X               --silent-viruses auto \
 X               --archive no --redundant yes --unzip yes \
 X               --add-dscr-hdrs yes \
 X               --scanners auto \
 X               --fix-mime yes \
 X               --log-details syslog --debug no \
 X               --batch
 X
 Xpre-configure:
 X       @PKG_PREFIX=3D${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME}
 PRE-INSTALL
 X
 Xdo-install:
 X.if exists(${PREFIX}/bin/qmail-scanner-queue.pl)
 X       ${MV} ${PREFIX}/bin/qmail-scanner-queue.pl
 ${PREFIX}/bin/qmail-scanner-queue.pl.old
 X.endif
 X       ${CP} ${WRKSRC}/qmail-scanner-queue.pl ${PREFIX}/bin/
 X       ${CP} ${WRKSRC}/quarantine-attachments.txt
 ${SPOOLDIR}/quarantine-attachments.sample
 X.if !exists(${SPOOLDIR}/quarantine-attachments.txt)
 X       ${CP} ${WRKSRC}/quarantine-attachments.txt ${SPOOLDIR}
 X.endif
 X       @PKG_PREFIX=3D${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME}
 POST-INSTALL
 X
 Xpost-install:
 X       @${CAT} ${PKGMESSAGE}
 X
 Xpost-deinstall:
 X       @${ECHO_MSG}
 X       @${ECHO_MSG} "If you're not updating this ports, you can delete
 directory '${SPOOLDIR}'."
 X       @${ECHO_MSG} ""
 X
 Xtest:
 X       @${WRKSRC}/contrib/test_installation.sh -doit
 X
 X.include <bsd.port.mk>
 END-of-qmail-scanner/Makefile
 echo x - qmail-scanner/pkg-descr
 sed 's/^X//' >qmail-scanner/pkg-descr << =
 'END-of-qmail-scanner/pkg-descr'
 XQmail-Scanner, is a Email content scanner that enables a Qmail Email =
 server
 to
 Xscan all Email it receives for certain characteristics (normally =
 viruses),
 Xand react accordingly.
 X
 XIf you have a commercial virus scanner (eg, Sophos sweep, McAfee
 Xuvscan, etc) installed when you build qmail-scanner, qmail-scanner
 Xwill configure itself to use that.  Otherwise, it will only use its
 Xinternal content filter which only allows you to block mail based
 Xon text in the subject/body, general types of attachments, etc.
 X
 X
 XWWW: http://qmail-scanner.sourceforge.net/
 X
 X- Moeti
 Xmoeti-freebsd@ouestil.com
 END-of-qmail-scanner/pkg-descr
 echo x - qmail-scanner/pkg-plist
 sed 's/^X//' >qmail-scanner/pkg-plist << =
 'END-of-qmail-scanner/pkg-plist'
 Xbin/qmail-scanner-queue.pl
 Xqmailscan/qmail-scanner-queue-version.txt
 Xqmailscan/quarantine-attachments.db
 Xqmailscan/quarantine-attachments.sample
 X@dirrm qmailscan/archives/cur
 X@dirrm qmailscan/archives/new
 X@dirrm qmailscan/archives/tmp
 X@dirrm qmailscan/archives
 X@dirrm qmailscan/quarantine/cur
 X@dirrm qmailscan/quarantine/new
 X@dirrm qmailscan/quarantine/tmp
 X@dirrm qmailscan/quarantine
 X@dirrm qmailscan/tmp
 END-of-qmail-scanner/pkg-plist
 echo c - qmail-scanner/files
 mkdir -p qmail-scanner/files > /dev/null 2>&1
 echo x - qmail-scanner/files/patch-configure
 sed 's/^X//' >qmail-scanner/files/patch-configure <<
 'END-of-qmail-scanner/files/patch-configure'
 X--- configure.orig     Fri Aug 22 02:06:54 2003
 X+++ configure  Sun Aug 24 23:32:50 2003
 X@@ -48,6 +48,8 @@
 X     QSLANG=3D"en_GB"
 X fi
 X
 X+QSLANG=3D`echo $QSLANG|sed 's/\..*//'`
 X+
 X if [ ! -d "./locale/$QSLANG" ]; then
 X     echo "
 X
 END-of-qmail-scanner/files/patch-configure
 echo x - qmail-scanner/files/patch-spams
 sed 's/^X//' >qmail-scanner/files/patch-spams <<
 'END-of-qmail-scanner/files/patch-spams'
 X--- configure.orig     Tue Sep 30 06:59:35 2003
 X+++ configure  Tue Sep 30 08:26:32 2003
 X@@ -81,7 +81,8 @@
 X FORCE_UNZIP=3D"0"
 X DESCRIPTIVE_HEADERS=3D"0"
 X NOTIFY_ADDRESSES=3D"sender,admin"
 X-USERNAME=3D"$USER"
 X+ADMIN_MAIL=3D"$USER"
 X+ADMIN_REALNAME=3D"System Anti-Virus Administrator"
 X MANUAL_INSTALL=3D"0"
 X INSTALLIT=3D"0"
 X DONOTCONFIRM=3D"0"
 X@@ -97,8 +98,10 @@
 X         --spooldir) if [ "$2" !=3D "" ] ; then  shift ; fi ; =
 AS_QQ=3D"$1" ;;
 X       --qmaildir) if [ "$2" !=3D "" ]; then shift ; fi ; =
 QMAILDIR=3D"$1" ;;
 X       --bindir) if [ "$2" !=3D "" ] ; then  shift ; fi ; BINDIR=3D"$1" =
 ;;
 X-      --user|--admin) if [ "$2" !=3D "" ] ; then  shift ; fi ; =
 USERNAME=3D"$1"
 ;;
 X-      --domain) if [ "$2" !=3D "" ] ; then  shift ; fi ; =
 MAILDOMAIN=3D"$1" ;;
 X+      --admin|--user) if [ "$2" !=3D "" ] ; then shift ; fi ;
 ADMIN_MAIL=3D`echo $1 | sed 's/@/\\\\@/'` ;;
 X+      --admin-realname) if [ "$2" !=3D "" ] ; then shift ; fi ;
 ADMIN_REALNAME=3D`echo $1 | sed 's/_/ /g'` ;;
 X+      --spams-redirect) if [ "$2" !=3D "" ] ; then shift ; fi ;
 SPAMS_REDIRECT=3D`echo $1 | sed 's/@/\\\\@/'` ;;
 X+      --spams-tosuffix) if [ "$2" !=3D "" ] ; then shift ; fi ;
 SPAMS_TOSUFFIX=3D"$1" ;;
 X       --notify) if [ "$2" !=3D "" ]; then shift ; fi ; =
 NOTIFY_ADDRESSES=3D"$1"
 ;;
 X       --batch) DONOTCONFIRM=3D"1" ; if [ "$2" !=3D "" -a "`echo =
 $2|grep '\-'`"
 =3D "" ] ; then  shift ; fi ;;
 X       --silent-viruses) if [ "$2" !=3D "" ]; then shift ; fi ;
 FIND_SILENT_VIRUSES=3D"$1" ;;
 X@@ -126,9 +129,17 @@
 X   --spooldir <spooldir> defaults to $AS_QQ/
 X   --bindir <installdir> where to install qmail-scanner-queue.pl
 X                         Defaults to /var/qmail/bin/
 X-  --admin <username> user to Email alerts to (default: $USERNAME)
 X-  --domain <domain name> "user"@"domain" makes up Email address
 X-       to Email alerts to.
 X+  --admin <email> email to send alerts to (default: $ADMIN_MAIL)
 X+  --admin-realname <...> realname for sending alerts
 X+                         Defaults to "$ADMIN_REALNAME"
 X+                       nb: use '_' instead of ' ' (sorry for
 inconvenience)
 X+  --spams-redirect <email> email to redirect detected spams to
 X+                           Defaults to empty (no redirection)
 X+  --spams-tosuffix <suffix> suffix to alter recipient with
 X+                            i.e. recipient user@domain
 X+                                 will be transform into =
 user-suffix@domain
 X+                            Defaults to empty (do not alter =
 recipients)
 X+                            nb: 'spams-admin' option has precedence on
 this
 X   --scanners <list of installed content scanners>
 X                                   Defaults to "auto" - will use
 X                                   whatever scanners are found on =
 system.
 X@@ -903,12 +914,16 @@
 X if [ "$UNAME" ] ; then FQDN=3D"$UNAME" ; fi
 X if [ "$HOST" ] ; then FQDN=3D"$HOST" ; fi
 X
 X-MAILDOMAIN=3D${MAILDOMAIN:-$FQDN}
 X-LOCAL_DOMAINS_ARRAY=3D${LOCAL_DOMAINS_ARRAY:-$MAILDOMAIN}
 X-CMDLINE=3D"$0 --spooldir $AS_QQ --qmaildir $QMAILDIR --bindir $BINDIR
 --qmail-queue-binary $QMAILQUEUE_BIN  --admin $USERNAME --domain =
 $MAILDOMAIN
 --notify $NOTIFY_ADDRESSES --local-domains $LOCAL_DOMAINS_ARRAY
 --silent-viruses $SILENT_VIRUSES --lang $QSLANG --debug $DEBUG_LEVEL =
 --unzip
 $FORCE_UNZIP --add-dscr-hdrs $DESCRIPTIVE_HEADERS --archive $ARCHIVEIT
 --redundant $REDUNDANT --log-details $LOG_DETAILS --log-crypto =
 $LOG_CRYPTO
 --fix-mime $FIX_MIME  --scanners \"$SCANNERS\""
 X-
 X+LOCAL_DOMAINS_ARRAY=3D${LOCAL_DOMAINS_ARRAY:-$FQDN}
 X+CMDLINE=3D"$0 --spooldir $AS_QQ --qmaildir $QMAILDIR --bindir $BINDIR
 --qmail-queue-binary $QMAILQUEUE_BIN  --admin $ADMIN_MAIL =
 --admin-realname
 \"$ADMIN_REALNAME\" --notify $NOTIFY_ADDRESSES --local-domains
 $LOCAL_DOMAINS_ARRAY --silent-viruses $SILENT_VIRUSES --lang $QSLANG =
 --debug
 $DEBUG_LEVEL --unzip $FORCE_UNZIP --add-dscr-hdrs $DESCRIPTIVE_HEADERS
 --archive $ARCHIVEIT --redundant $REDUNDANT --log-details $LOG_DETAILS
 --log-crypto $LOG_CRYPTO --fix-mime $FIX_MIME  --scanners \"$SCANNERS\""
 X
 X
 X+if [ -n "$SPAMS_REDIRECT" ]; then
 X+    CMDLINE=3D"$CMDLINE --spams-redirect $SPAMS_REDIRECT"
 X+fi
 X+if [ -n "$SPAMS_TOSUFFIX" ]; then
 X+    CMDLINE=3D"$CMDLINE --spams-tosuffix $SPAMS_TOSUFFIX"
 X+fi
 X if [ "$MANUAL_INSTALL" =3D "1" ]; then
 X     CMDLINE=3D"$CMDLINE --no-QQ-check $MANUAL_INSTALL"
 X fi
 X@@ -1278,7 +1293,7 @@
 X     fi
 X fi
 X
 X-USERNAME=3D${USERNAME:-$LOGNAME}
 X+ADMIN_MAIL=3D${ADMIN_MAIL:-$LOGNAME}
 X
 X SCANNER_ARRAY=3D`echo $SCANNER_ARRAY|sed 's/^,//g'`
 X
 X@@ -1352,7 +1367,13 @@
 X     fi
 X     echo "archiving $ASTRING into $AS_QQ/$ARCHIVEDIR/"
 X fi
 X-echo "virus-admin=3D$USERNAME@$MAILDOMAIN"
 X+echo "admin=3D$ADMIN_MAIL"
 X+if [ -n "$SPAMS_REDIRECT" ]; then
 X+  echo "spams-admin=3D$SPAMS_REDIRECT"
 X+fi
 X+if [ -n "$SPAMS_TOSUFFIX" ]; then
 X+  echo "spams-suffix=3D$SPAMS_TOSUFFIX"
 X+fi
 X echo "local-domains=3D$LOCAL_DOMAINS_ARRAY"
 X echo "silent-viruses=3D$FIND_SILENT_VIRUSES_ARRAY"
 X echo "scanners=3D$SCANNER_ARRAY"
 X@@ -1496,10 +1517,12 @@
 X s?SPAMC_BINARY?$SPAMC_BINARY?g;
 X s?SPAMC_OPTIONS?$SPAMC_OPTIONS?g;
 X s?SPAMC_SUBJECT?$SPAMC_SUBJECT?g;
 X-s?USERNAME?$USERNAME?g;
 X+s?ADMIN_MAIL?$ADMIN_MAIL?g;
 X+s?ADMIN_REALNAME?$ADMIN_REALNAME?g;
 X+s?SPAMS_REDIRECT?$SPAMS_REDIRECT?g;
 X+s?SPAMS_TOSUFFIX?$SPAMS_TOSUFFIX?g;
 X s?SKIP_TEXT_MSGS?$SKIP_TEXT_MSGS?g;
 X s?FQDN?$FQDN?g;
 X-s?MAILDOMAIN?$MAILDOMAIN?g;
 X s?LOCAL_DOMAINS_ARRAY?$LOCAL_DOMAINS_ARRAY?g;
 X s?NOTIFY_ADDRESSES?$NOTIFY_ADDRESSES?g;
 X s?FIND?$FIND?g;
 X--- qmail-scanner-queue.template.orig  Tue Sep 30 06:23:42 2003
 X+++ qmail-scanner-queue.template       Tue Sep 30 07:53:05 2003
 X@@ -85,11 +85,17 @@
 X
 X
 X #From: line  information used when making reports
 X-my $V_FROM=3D'USERNAME@MAILDOMAIN';
 X-my $V_FROMNAME=3D'System Anti-Virus Administrator';
 X+my $V_FROM=3D'ADMIN_MAIL';
 X+my $V_FROMNAME=3D'ADMIN_REALNAME';
 X
 X # Address carbon-copied on any virus reports
 X-my $QUARANTINE_CC=3D'USERNAME@MAILDOMAIN';
 X+my $QUARANTINE_CC=3D'ADMIN_MAIL';
 X+
 X+# Address to where spams are redirected
 X+my $SPAMSADMIN=3D'SPAMS_REDIRECT';
 X+
 X+# Suffix to alter recipients with (when spam detected)
 X+my $SPAMSSUFFIX=3D'SPAMS_TOSUFFIX';
 X
 X #Array of local domains that are checked against for
 X #deciding whether or not to send recipient alerts to
 X@@ -289,6 +295,7 @@
 X chdir($scandir);
 X umask(0077);
 X my $quarantine_event=3D0;
 X+my $spam_event=3D0;
 X
 X my $file_id =3D &uniq_id();
 X
 X@@ -410,7 +417,18 @@
 X     &email_quarantine_report;
 X   } else {
 X     &qmail_parent_check;
 X-
 &qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file_=
 id"
 );
 X+    if ($spam_event) {
 X+      if ($SPAMSADMIN) {
 X+
 &qmail_requeue($env_returnpath,"T$SPAMSADMIN\0\0","$scandir/$wmaildir/new=
 /$f
 ile_id");
 X+      } elsif ($SPAMSSUFFIX) {
 X+      $env_recips =3D~ s/\@/\-$SPAMSSUFFIX\@/g;
 X+
 &qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file_=
 id"
 );
 X+      } else {
 X+
 &qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file_=
 id"
 );
 X+      }
 X+    } else {
 X+
 &qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file_=
 id"
 );
 X+    }
 X   }
 X   alarm 0;
 X };
 X--- sub-spamassassin.pl.orig   Tue Sep 30 07:11:51 2003
 X+++ sub-spamassassin.pl        Tue Sep 30 07:12:14 2003
 X@@ -57,6 +57,7 @@
 X     $tag_score .=3D "SA:1($sa_score/$sa_max):";
 X     $sa_comment =3D "Yes, hits=3D$sa_score required=3D$sa_max" if
 ($spamc_options =3D~ /\-c/);
 X     &debug("SA: yup, this smells like SPAM");
 X+    $spam_event =3D 1;
 X   }
 X   $stop_spamassassin_time=3D[gettimeofday];
 X   $spamassassin_time =3D tv_interval ($start_spamassassin_time,
 $stop_spamassassin_time);
 END-of-qmail-scanner/files/patch-spams
 echo x - qmail-scanner/pkg-message
 sed 's/^X//' >qmail-scanner/pkg-message <<
 'END-of-qmail-scanner/pkg-message'
 X****************************************************
 XNOTES:
 X - You have to configure your anti-virus and anti-spams products!
 X - You HAVE to reinstall this port each time you add or remove one!
 X
 XNow, you have to modify your qmail startup files to call qmail-scanner.
 XIn most case, you just need to add:
 X  export QMAILQUEUE=3D"${PREFIX}/bin/qmail-scanner-queue.pl"
 Xto your tcpserver startup file.
 X
 XYou can test installation by running 'make test' in port dir.
 X****************************************************
 END-of-qmail-scanner/pkg-message
 echo x - qmail-scanner/pkg-install
 sed 's/^X//' >qmail-scanner/pkg-install <<
 'END-of-qmail-scanner/pkg-install'
 X#!/bin/sh
 X
 XCHMOD=3D/bin/chmod
 XCHOWN=3D/usr/sbin/chown
 XMKDIR=3D/bin/mkdir
 XPW=3D/usr/sbin/pw
 X
 XGU_ID=3D98
 XGU_NAME=3Dqscand
 X
 XPREFIX=3D${PKG_PREFIX}
 XSPOOLDIR=3D${PREFIX}/qmailscan
 X
 Xcase "$2" in
 XPRE-INSTALL)
 X  # User and group
 X  ${PW} groupshow -n ${GU_NAME} >/dev/null 2>&1 \
 X    || ${PW} groupadd -n ${GU_NAME} -g ${GU_ID}
 X  ${PW} usershow -n ${GU_NAME} >/dev/null 2>&1 \
 X    || ${PW} useradd ${GU_NAME} -g ${GU_NAME} -u ${GU_ID} -s no
 X  break;;
 XPOST-INSTALL)
 X  # Directories
 X  for i in working quarantine archives; do
 X    for j in tmp cur new; do
 X      ${MKDIR} -p ${SPOOLDIR}/$i/$j
 X    done
 X  done
 X  ${MKDIR} -p ${SPOOLDIR}/tmp
 X
 X  # Setuid qmail-scanner-queue.pl script
 X  ${CHOWN} ${GU_NAME}:${GU_NAME} ${PREFIX}/bin/qmail-scanner-queue.pl
 X  ${CHMOD} 4755 ${PREFIX}/bin/qmail-scanner-queue.pl
 X
 X  # Initialize
 X  ${PREFIX}/bin/qmail-scanner-queue.pl -z
 X  ${PREFIX}/bin/qmail-scanner-queue.pl -g
 X
 X  # Mode and owner
 X  ${CHOWN} -R ${GU_NAME}:${GU_NAME} ${SPOOLDIR}
 X  break;;
 Xesac
 END-of-qmail-scanner/pkg-install
 exit
 --- qmail-scanner-1.20r4.shar ends here ---
 
 --
 MOULIN Cl=E9ment
 SimpleRezo - http://www.simplerezo.com/
 
 
State-Changed-From-To: open->closed 
State-Changed-By: sergei 
State-Changed-When: Thu Dec 11 04:49:54 PST 2003 
State-Changed-Why:  
New port added, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55941 
>Unformatted:
