Skip site navigation (1)Skip section navigation (2)
Date:      15 Mar 2004 01:36:59 -0000
From:      Clement@mail.ouestil.com, Moulin@mail.ouestil.com, "[SimpleRezo]@mail.ouestil.com" <freebsd@simplerezo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        freebsd@simplerezo.com
Subject:   ports/64274: [maintainer-update] mail/qmail-scanner : lot of fixes and update to 1.21 
Message-ID:  <20040315013659.13744.qmail@mail.ouestil.com>
Resent-Message-ID: <200403150140.i2F1eCZp038059@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         64274
>Category:       ports
>Synopsis:       [maintainer-update] mail/qmail-scanner : lot of fixes and update to 1.21
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 14 17:40:12 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Clement Moulin
>Release:        FreeBSD 4.9-RELEASE-p3 i386
>Organization:
SimpleRezo [www.simplerezo.com]
>Environment:

System: FreeBSD xeon-web.ouestil.com 4.9-RELEASE-p3 FreeBSD 4.9-RELEASE-p3 #9: Fri Mar 5 13:21:03 CET 2004 root@xeon.ouestil.com:/usr/obj/usr/src/sys/KERNEL i386

>Description:

+ fix configure for japanese (thanks to Fumihiko Kimura, PR#63956)
+ add option QMAILSCAN_SILENTVIRUSES
+ add description for QMAILSCAN_NOTIFY
+ now ports install qs2mrtg script
+ updated to qmail-scanner 1.21
  - new option of blocking password-protected zip files (enabled by default)
    this require unzip ports and can be disabled with QMAILSCANNER_NOTBLKZIPPW
  - Qmail-Scanner now defaults to only sending alerts to "psender,recips".
    i.e. only alert sender and recipient when the e-mail isn't associated with
    a mailing-list, and the quarantining event is due to a policy block
    instead of an AV block. The rationale behind defaulting to not notifying
    senders of viruses is that the vast majority of viruses now alter the
    envelope from header, so there is no point in notifying someone who didn't
    send the virus - that they have a virus!

>How-To-Repeat:

    man repeat ;-)

>Fix:

--- qmail-scanner-1.21.diff begins here ---
diff -ruN qmail-scanner/Makefile qmail-scanner.updated/Makefile
--- qmail-scanner/Makefile	Mon Jan  5 07:27:20 2004
+++ qmail-scanner.updated/Makefile	Mon Mar 15 01:40:41 2004
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	qmail-scanner
-PORTVERSION=	1.20
-PORTREVISION=	2
+PORTVERSION=	1.21
 CATEGORIES=	mail security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -39,15 +38,20 @@
 .if defined(QMAILSCAN_ADMINREALNAME)
 CONFIGURE_ARGS+=	--admin-realname "${QMAILSCAN_ADMINREALNAME}"
 .endif
-QMAILSCAN_NOTIFY?=	sender,recips
+QMAILSCAN_NOTIFY?=	psender,recips
 .if defined(QMAILSCAN_LOCALDOMAINS)
 CONFIGURE_ARGS+=	--local-domains "${QMAILSCAN_LOCALDOMAINS}"
 .endif
+.if !defined(QMAILSCAN_NOTBLKZIPPW)
+BUILD_DEPENDS+=		unzip:${PORTSDIR}/archivers/unzip
+CONFIGURE_ARGS+=	--block-password-protected
+.endif
 .if defined(QMAILSCAN_SCANNERS)
 CONFIGURE_ARGS+=	--scanners "${QMAILSCAN_SCANNERS}"
 .else
 CONFIGURE_ARGS+=	--scanners auto
 .endif
+QMAILSCAN_SILENTVIRUSES?=	auto
 .if defined(QMAILSCAN_SPAMSREDIRECT)
 CONFIGURE_ARGS+=	--spams-redirect "${QMAILSCAN_SPAMSREDIRECT}"
 .endif
@@ -63,10 +67,9 @@
 		--qmaildir ${QMAIL_DIR} --spooldir ${SPOOLDIR} \
 		--bindir ${PREFIX}/bin --qmail-queue-binary ${QMAIL_QUEUE} \
 		--admin "${QMAILSCAN_ADMIN}" --notify "${QMAILSCAN_NOTIFY}" \
-		--silent-viruses auto \
+		--silent-viruses "${QMAILSCAN_SILENTVIRUSES}" \
 		--redundant yes --unzip yes \
 		--add-dscr-hdrs yes \
-		--fix-mime yes \
 		--log-details syslog --debug no \
 		--batch
 
@@ -80,8 +83,13 @@
 	@${ECHO_MSG} "                         (do not use spaces but underscores here)"
 	@${ECHO_MSG} "QMAILSCAN_LOCALDOMAINS   domains classified as local domains preventing alerts"
 	@${ECHO_MSG} "                         of externals users (and mailing-lists...)"
+	@${ECHO_MSG} "QMAILSCAN_NOTBLKZIPPW    zip password protected are blocked by default"
+	@${ECHO_MSG} "                         setting this variable to disable this function"
+	@${ECHO_MSG} "QMAILSCAN_NOTIFY         who has to be notify of viruses/spams"
+	@${ECHO_MSG} "                         defaults to 'psender,recips'"
 	@${ECHO_MSG} "QMAILSCAN_SCANNERS       list of installed content scanner"
 	@${ECHO_MSG} "                         default is automatic, so you do not need to set this"
+	@${ECHO_MSG} "QMAILSCAN_SILENTVIRUSES  viruses that qs shoud not notify about"
 	@${ECHO_MSG} "QMAILSCAN_SPAMSREDIRECT* set this if you want to redirect all spams to a"
 	@${ECHO_MSG} "                         specific email address"
 	@${ECHO_MSG} "QMAILSCAN_SPAMSTOSUFFIX* suffix to alter spams recipients with"
@@ -110,6 +118,8 @@
 		${SPOOLDIR}/quarantine-attachments.sample
 	${TEST} -f ${SPOOLDIR}/quarantine-attachments.txt || \
 		${INSTALL_DATA} ${WRKSRC}/quarantine-attachments.txt ${SPOOLDIR}
+	${INSTALL_DATA} ${WRKSRC}/contrib/mrtg-qmail-scanner.cfg \
+		${PREFIX}/share/examples/qs2mrtg
 	@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL
 	@${CAT} ${PKGMESSAGE}
 
diff -ruN qmail-scanner/distinfo qmail-scanner.updated/distinfo
--- qmail-scanner/distinfo	Mon Dec 29 16:17:30 2003
+++ qmail-scanner.updated/distinfo	Mon Mar 15 01:05:15 2004
@@ -1 +1,2 @@
-MD5 (qmail-scanner-1.20.tgz) = d1e1753bd966fe6b20a7ef46ed2da524
+MD5 (qmail-scanner-1.21.tgz) = bc32fa5ac9940eafbb648e9e6d256565
+SIZE (qmail-scanner-1.21.tgz) = 145467
diff -ruN qmail-scanner/files/patch-configure qmail-scanner.updated/files/patch-configure
--- qmail-scanner/files/patch-configure	Tue Mar  9 15:44:02 2004
+++ qmail-scanner.updated/files/patch-configure	Mon Mar 15 01:28:36 2004
@@ -1,29 +1,29 @@
---- configure.orig	Wed Nov  5 03:04:26 2003
-+++ configure	Sun Jan  4 16:20:01 2004
+--- configure.orig	Thu Mar 11 00:41:47 2004
++++ configure	Mon Mar 15 01:25:27 2004
 @@ -48,6 +48,12 @@
      QSLANG="en_GB"
  fi
  
 +QSLANG=`echo $QSLANG|sed 's/\..*//'`
 +if [ "$QSLANG" = "ja_JP" ]; then
-+    #reset all Japanese to jp_JP.EUC
-+    QSLANG="jp_JP.EUC"
++    #reset all Japanese to ja_JP.EUC
++    QSLANG="ja_JP.EUC"
 +fi
 +
  if [ ! -d "./locale/$QSLANG" ]; then
      echo "
  
-@@ -81,7 +87,8 @@
- FORCE_UNZIP="0"
+@@ -83,7 +89,8 @@
+ QUARANTINE_PASSWORD_PROTECTED="0"
  DESCRIPTIVE_HEADERS="0"
- NOTIFY_ADDRESSES="sender,admin"
+ NOTIFY_ADDRESSES="psender,nmlvadm"
 -USERNAME="$USER"
 +ADMIN_MAIL="$USER"
 +ADMIN_REALNAME="System Anti-Virus Administrator"
  MANUAL_INSTALL="0"
  INSTALLIT="0"
  DONOTCONFIRM="0"
-@@ -98,8 +105,10 @@
+@@ -100,8 +107,10 @@
          --spooldir) if [ "$2" != "" ] ; then  shift ; fi ; AS_QQ="$1" ;;
  	--qmaildir) if [ "$2" != "" ]; then shift ; fi ; QMAILDIR="$1" ;;
  	--bindir) if [ "$2" != "" ] ; then  shift ; fi ; BINDIR="$1" ;;
@@ -36,7 +36,7 @@
  	--notify) if [ "$2" != "" ]; then shift ; fi ; NOTIFY_ADDRESSES="$1" ;;
  	--batch) DONOTCONFIRM="1" ; if [ "$2" != "" -a "`echo $2|grep '\-'`" = "" ] ; then  shift ; fi ;;
  	--silent-viruses) if [ "$2" != "" ]; then shift ; fi ; FIND_SILENT_VIRUSES="$1" ;;
-@@ -128,9 +137,17 @@
+@@ -132,9 +141,17 @@
    --spooldir <spooldir> defaults to $AS_QQ/
    --bindir <installdir> where to install qmail-scanner-queue.pl
                          Defaults to /var/qmail/bin/
@@ -57,16 +57,13 @@
    --scanners <list of installed content scanners>
  				    Defaults to "auto" - will use
  				    whatever scanners are found on system.
-@@ -909,12 +926,16 @@
- if [ "$UNAME" ] ; then FQDN="$UNAME" ; fi
- if [ "$HOST" ] ; then FQDN="$HOST" ; fi
- 
--MAILDOMAIN=${MAILDOMAIN:-$FQDN}
--LOCAL_DOMAINS_ARRAY=${LOCAL_DOMAINS_ARRAY:-$MAILDOMAIN}
--CMDLINE="$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\""
--
-+LOCAL_DOMAINS_ARRAY=${LOCAL_DOMAINS_ARRAY:-$FQDN}
-+CMDLINE="$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\""
+@@ -944,10 +961,16 @@
+ 
+ MAILDOMAIN=${MAILDOMAIN:-$FQDN}
+ LOCAL_DOMAINS_ARRAY=${LOCAL_DOMAINS_ARRAY:-$MAILDOMAIN}
+-CMDLINE="$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  --ignore-eol-check $DISABLE_EOL_CHECK --scanners \"$SCANNERS\""
++CMDLINE="$0 --spooldir $AS_QQ --qmaildir $QMAILDIR --bindir $BINDIR --qmail-queue-binary $QMAILQUEUE_BIN  --admin $ADMIN_MAIL --admin-realname \"$ADMIN_REALNAME\" --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 --ignore-eol-check $DISABLE_EOL_CHECK --scanners \"$SCANNERS\""
+ 
  
  
 +if [ -n "$SPAMS_REDIRECT" ]; then
@@ -78,7 +75,7 @@
  if [ "$MANUAL_INSTALL" = "1" ]; then
      CMDLINE="$CMDLINE --no-QQ-check $MANUAL_INSTALL"
  fi
-@@ -1284,7 +1305,7 @@
+@@ -1317,7 +1340,7 @@
      fi
  fi
  
@@ -87,7 +84,7 @@
  
  SCANNER_ARRAY=`echo $SCANNER_ARRAY|sed 's/^,//g'`
  
-@@ -1358,7 +1379,13 @@
+@@ -1394,7 +1417,13 @@
      fi
      echo "archiving $ASTRING into $AS_QQ/$ARCHIVEDIR/"
  fi
@@ -102,7 +99,7 @@
  echo "local-domains=$LOCAL_DOMAINS_ARRAY"
  echo "silent-viruses=$FIND_SILENT_VIRUSES_ARRAY"
  echo "scanners=$SCANNER_ARRAY"
-@@ -1504,10 +1531,12 @@
+@@ -1550,10 +1579,12 @@
  s?SPAMC_BINARY?$SPAMC_BINARY?g;
  s?SPAMC_OPTIONS?$SPAMC_OPTIONS?g;
  s?SPAMC_SUBJECT?$SPAMC_SUBJECT?g;
diff -ruN qmail-scanner/files/patch-qmail-scanner-queue.template qmail-scanner.updated/files/patch-qmail-scanner-queue.template
--- qmail-scanner/files/patch-qmail-scanner-queue.template	Mon Jan  5 07:27:20 2004
+++ qmail-scanner.updated/files/patch-qmail-scanner-queue.template	Mon Mar 15 01:30:05 2004
@@ -1,5 +1,5 @@
---- qmail-scanner-queue.template.orig	Wed Nov  5 01:26:47 2003
-+++ qmail-scanner-queue.template	Sun Jan  4 16:17:55 2004
+--- qmail-scanner-queue.template.orig	Wed Mar 10 21:02:05 2004
++++ qmail-scanner-queue.template	Mon Mar 15 01:26:52 2004
 @@ -85,11 +85,17 @@
  
  
@@ -21,15 +21,15 @@
  
  #Array of local domains that are checked against for
  #deciding whether or not to send recipient alerts to
-@@ -294,6 +300,7 @@
+@@ -302,6 +308,7 @@
  }
  
- my $quarantine_event=0;
+ my ($quarantine_event,$quarantine_event_tmp)=0;
 +my $spam_event=0;
  
  my $file_id = &uniq_id();
  
-@@ -415,7 +422,18 @@
+@@ -424,7 +431,18 @@
      &email_quarantine_report;
    } else {
      &qmail_parent_check;
diff -ruN qmail-scanner/files/patch-sub-spamassassin.pl qmail-scanner.updated/files/patch-sub-spamassassin.pl
--- qmail-scanner/files/patch-sub-spamassassin.pl	Mon Jan  5 07:27:20 2004
+++ qmail-scanner.updated/files/patch-sub-spamassassin.pl	Mon Mar 15 01:30:34 2004
@@ -1,10 +1,10 @@
---- sub-spamassassin.pl.orig	Mon Sep 29 04:17:22 2003
-+++ sub-spamassassin.pl	Sun Jan  4 16:17:55 2004
-@@ -57,6 +57,7 @@
+--- sub-spamassassin.pl.orig	Thu Dec  4 22:17:55 2003
++++ sub-spamassassin.pl	Mon Mar 15 01:27:28 2004
+@@ -61,6 +61,7 @@
      $tag_score .= "SA:1($sa_score/$sa_max):";
-     $sa_comment = "Yes, hits=$sa_score required=$sa_max" if ($spamc_options =~ /\-c/);
+     $sa_comment = "Yes, hits=$sa_score required=$sa_max" if ($sa_fast);
      &debug("SA: yup, this smells like SPAM");
 +    $spam_event = 1;
    }	
-   $stop_spamassassin_time=[gettimeofday];
-   $spamassassin_time = tv_interval ($start_spamassassin_time, $stop_spamassassin_time);
+   if ($sa_score > 0) {
+     $sa_score=int($sa_score);
diff -ruN qmail-scanner/pkg-install qmail-scanner.updated/pkg-install
--- qmail-scanner/pkg-install	Sat Jan  3 01:21:12 2004
+++ qmail-scanner.updated/pkg-install	Wed Jan  7 09:56:35 2004
@@ -19,6 +19,7 @@
   ${PW} usershow -n ${GU_NAME} >/dev/null 2>&1 \
     || ${PW} useradd ${GU_NAME} -g ${GU_NAME} -u ${GU_ID} -s /sbin/nologin
   ${MKDIR} -p ${SPOOLDIR}
+  ${MKDIR} -p ${PREFIX}/share/examples/qs2mrtg
   ;;
 POST-INSTALL)
   # Directories
diff -ruN qmail-scanner/pkg-plist qmail-scanner.updated/pkg-plist
--- qmail-scanner/pkg-plist	Sun Jan  4 03:01:52 2004
+++ qmail-scanner.updated/pkg-plist	Wed Jan  7 09:53:45 2004
@@ -1,8 +1,10 @@
 @comment $FreeBSD: ports/mail/qmail-scanner/pkg-plist,v 1.3 2004/01/03 17:32:22 sergei Exp $
 bin/qmail-scanner-queue.pl
 bin/qs2mrtg.pl
+share/examples/qs2mrtg/mrtg-qmail-scanner.cfg
 %%SPOOLDIR%%/quarantine-attachments.sample
 %%SPOOLDIR%%/quarantine-attachments.txt
+@unexec rmdir share/examples/qs2mrtg 2>/dev/null || true
 @unexec rmdir %%SPOOLDIR%%/archives/cur 2>/dev/null || true
 @unexec rmdir %%SPOOLDIR%%/archives/new 2>/dev/null || true
 @unexec rmdir %%SPOOLDIR%%/archives/tmp 2>/dev/null || true
--- qmail-scanner-1.21.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040315013659.13744.qmail>