Date: 25 Apr 2004 23:25:44 -0000 From: "freebsd@simplerezo.com" <freebsd@simplerezo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/65974: [maintainer-update] mail/qmail-scanner : lot of fixes and update to 1.22 Message-ID: <20040425232544.15601.qmail@mail.simplerezo.net> Resent-Message-ID: <200404252330.i3PNUJN5011746@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 65974 >Category: ports >Synopsis: [maintainer-update] mail/qmail-scanner : lot of fixes and update to 1.22 >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sun Apr 25 16:30:19 PDT 2004 >Closed-Date: >Last-Modified: >Originator: freebsd@simplerezo.com >Release: FreeBSD 4.9-RELEASE-p3 i386 >Organization: SimpleRezo [http://www.simplerezo.com] >Environment: System: FreeBSD xeon.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: = includes all fixes of PR#64274 + update to qmail-scanner 1.22 - new option "--log-crypto" - lot of fixed bugs!! >How-To-Repeat: echo echo echoooo >Fix: --- qmail-scanner-1.22.diff begins here --- diff -ruN qmail-scanner/Makefile qmail-scanner.updated/Makefile --- qmail-scanner/Makefile Mon Mar 22 18:16:28 2004 +++ qmail-scanner.updated/Makefile Sun Apr 25 18:08:06 2004 @@ -6,8 +6,7 @@ # PORTNAME= qmail-scanner -PORTVERSION= 1.20 -PORTREVISION= 2 +PORTVERSION= 1.22 CATEGORIES= mail security MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -19,7 +18,8 @@ BUILD_DEPENDS= ${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail \ ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ - reformime:${PORTSDIR}/mail/maildrop + reformime:${PORTSDIR}/mail/maildrop \ + perl:${PORTSDIR}/lang/perl5 # A normal qmail installation puts everything into /var/qmail/. # Must match your qmail installation @@ -39,15 +39,26 @@ .if defined(QMAILSCAN_ADMINREALNAME) CONFIGURE_ARGS+= --admin-realname "${QMAILSCAN_ADMINREALNAME}" .endif -QMAILSCAN_NOTIFY?= sender,recips +.if defined(QMAILSCAN_ARCHIVE) +CONFIGURE_ARGS+= --archive yes +.endif +QMAILSCAN_NOTIFY?= psender,recips .if defined(QMAILSCAN_LOCALDOMAINS) CONFIGURE_ARGS+= --local-domains "${QMAILSCAN_LOCALDOMAINS}" .endif +.if defined(QMAILSCAN_LOGCRYPTO) +CONFIGURE_ARGS+= --log-crypto yes +.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 +74,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 +90,17 @@ @${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_LOGCRYPTO simply notes in the log record if the message" + @${ECHO_MSG} " contained any form of digital signing or encryption" + @${ECHO_MSG} " (S/MIME, PGP and password protected files)" + @${ECHO_MSG} " default is disabled" + @${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" @@ -100,6 +119,9 @@ exit 1; \ fi +post-configure: + ${TEST} -f ${WRKSRC}/qmail-scanner-queue.pl + do-install: -${TEST} -f ${PREFIX}/bin/qmail-scanner-queue.pl && \ ${MV} ${PREFIX}/bin/qmail-scanner-queue.pl \ @@ -110,6 +132,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 Sun Apr 25 18:09:57 2004 @@ -1 +1,2 @@ -MD5 (qmail-scanner-1.20.tgz) = d1e1753bd966fe6b20a7ef46ed2da524 +MD5 (qmail-scanner-1.22.tgz) = ae9124b43e1194d577951c8260a258bd +SIZE (qmail-scanner-1.22.tgz) = 148568 diff -ruN qmail-scanner/files/patch-configure qmail-scanner.updated/files/patch-configure --- qmail-scanner/files/patch-configure Sun Apr 25 18:16:29 2004 +++ qmail-scanner.updated/files/patch-configure Mon Apr 26 00:35:34 2004 @@ -1,29 +1,29 @@ ---- configure.orig Wed Nov 5 03:04:26 2003 -+++ configure Sun Jan 4 16:20:01 2004 -@@ -48,6 +48,12 @@ +--- configure.orig Mon Apr 26 00:28:08 2004 ++++ configure Mon Apr 26 00:34:57 2004 +@@ -51,6 +51,12 @@ + #reset all English to en_GB 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" +@@ -87,7 +93,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 @@ +@@ -104,8 +111,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 @@ +@@ -136,9 +145,17 @@ --spooldir <spooldir> defaults to $AS_QQ/ --bindir <installdir> where to install qmail-scanner-queue.pl Defaults to /var/qmail/bin/ @@ -57,16 +57,12 @@ --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 --ignore-eol-check $DISABLE_EOL_CHECK --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 --block-password-protected $QUARANTINE_PASSWORD_PROTECTED --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\"" +@@ -946,9 +963,15 @@ + + 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 --block-password-protected $QUARANTINE_PASSWORD_PROTECTED --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 --block-password-protected $QUARANTINE_PASSWORD_PROTECTED --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 +74,7 @@ if [ "$MANUAL_INSTALL" = "1" ]; then CMDLINE="$CMDLINE --no-QQ-check $MANUAL_INSTALL" fi -@@ -1284,7 +1305,7 @@ +@@ -1312,7 +1335,7 @@ fi fi @@ -87,7 +83,7 @@ SCANNER_ARRAY=`echo $SCANNER_ARRAY|sed 's/^,//g'` -@@ -1358,7 +1379,13 @@ +@@ -1389,7 +1412,13 @@ fi echo "archiving $ASTRING into $AS_QQ/$ARCHIVEDIR/" fi @@ -102,7 +98,7 @@ echo "local-domains=$LOCAL_DOMAINS_ARRAY" echo "silent-viruses=$FIND_SILENT_VIRUSES_ARRAY" echo "scanners=$SCANNER_ARRAY" -@@ -1504,10 +1531,12 @@ +@@ -1545,10 +1574,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 22 18:17:14 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 22 18:17:14 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 Mon Mar 22 18:17:14 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 Mon Mar 22 18:17:15 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.22.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?20040425232544.15601.qmail>