diff options
author | pav <pav@FreeBSD.org> | 2004-05-30 08:37:26 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-05-30 08:37:26 +0800 |
commit | 65d8b338b26f711b2da0ca2527abab35036906b7 (patch) | |
tree | 1b2ba179dc2750144ce1bd0d8bf5e6d5abbd66b0 /mail/qmail-scanner | |
parent | 727e06dd31c4bac9de704a9d0f8cb483ba959c65 (diff) | |
download | freebsd-ports-gnome-65d8b338b26f711b2da0ca2527abab35036906b7.tar.gz freebsd-ports-gnome-65d8b338b26f711b2da0ca2527abab35036906b7.tar.zst freebsd-ports-gnome-65d8b338b26f711b2da0ca2527abab35036906b7.zip |
- Update to 1.22
PR: ports/65974
Submitted by: <freebsd@simplerezo.com> (maintainer)
Diffstat (limited to 'mail/qmail-scanner')
-rw-r--r-- | mail/qmail-scanner/Makefile | 33 | ||||
-rw-r--r-- | mail/qmail-scanner/distinfo | 3 | ||||
-rw-r--r-- | mail/qmail-scanner/files/patch-configure | 46 | ||||
-rw-r--r-- | mail/qmail-scanner/files/patch-qmail-scanner-queue.template | 10 | ||||
-rw-r--r-- | mail/qmail-scanner/files/patch-sub-spamassassin.pl | 12 | ||||
-rw-r--r-- | mail/qmail-scanner/pkg-install | 1 | ||||
-rw-r--r-- | mail/qmail-scanner/pkg-plist | 2 |
7 files changed, 65 insertions, 42 deletions
diff --git a/mail/qmail-scanner/Makefile b/mail/qmail-scanner/Makefile index cef2aca7ede7..bf51b21a987e 100644 --- a/mail/qmail-scanner/Makefile +++ b/mail/qmail-scanner/Makefile @@ -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} @@ -39,15 +38,26 @@ QMAILSCAN_ADMIN?= root .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 +73,9 @@ CONFIGURE_ARGS+= \ --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 +89,17 @@ pre-configure: @${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 +118,9 @@ pre-configure: 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 +131,8 @@ do-install: ${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 --git a/mail/qmail-scanner/distinfo b/mail/qmail-scanner/distinfo index be798405e4af..b03ac402d191 100644 --- a/mail/qmail-scanner/distinfo +++ b/mail/qmail-scanner/distinfo @@ -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 --git a/mail/qmail-scanner/files/patch-configure b/mail/qmail-scanner/files/patch-configure index a1d52dc8fe3a..f447881360eb 100644 --- a/mail/qmail-scanner/files/patch-configure +++ b/mail/qmail-scanner/files/patch-configure @@ -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 12 12:29:06 2004 ++++ configure Sun May 30 02:11:14 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,17 +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 +@@ -946,9 +963,14 @@ --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\"" + 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\"" - -+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\"" - ++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 + CMDLINE="$CMDLINE --spams-redirect $SPAMS_REDIRECT" @@ -78,7 +74,7 @@ if [ "$MANUAL_INSTALL" = "1" ]; then CMDLINE="$CMDLINE --no-QQ-check $MANUAL_INSTALL" fi -@@ -1284,7 +1305,7 @@ +@@ -1312,7 +1334,7 @@ fi fi @@ -87,7 +83,7 @@ SCANNER_ARRAY=`echo $SCANNER_ARRAY|sed 's/^,//g'` -@@ -1358,7 +1379,13 @@ +@@ -1389,7 +1411,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 +1573,12 @@ s?SPAMC_BINARY?$SPAMC_BINARY?g; s?SPAMC_OPTIONS?$SPAMC_OPTIONS?g; s?SPAMC_SUBJECT?$SPAMC_SUBJECT?g; diff --git a/mail/qmail-scanner/files/patch-qmail-scanner-queue.template b/mail/qmail-scanner/files/patch-qmail-scanner-queue.template index 33c3ac10a4e2..aa2d3c6788a0 100644 --- a/mail/qmail-scanner/files/patch-qmail-scanner-queue.template +++ b/mail/qmail-scanner/files/patch-qmail-scanner-queue.template @@ -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 --git a/mail/qmail-scanner/files/patch-sub-spamassassin.pl b/mail/qmail-scanner/files/patch-sub-spamassassin.pl index fe3cd89f5f7c..8daf87ded5c2 100644 --- a/mail/qmail-scanner/files/patch-sub-spamassassin.pl +++ b/mail/qmail-scanner/files/patch-sub-spamassassin.pl @@ -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 --git a/mail/qmail-scanner/pkg-install b/mail/qmail-scanner/pkg-install index e861383a19e2..e42be90badcb 100644 --- a/mail/qmail-scanner/pkg-install +++ b/mail/qmail-scanner/pkg-install @@ -19,6 +19,7 @@ PRE-INSTALL) ${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 --git a/mail/qmail-scanner/pkg-plist b/mail/qmail-scanner/pkg-plist index 628c006a5729..088ee682eb54 100644 --- a/mail/qmail-scanner/pkg-plist +++ b/mail/qmail-scanner/pkg-plist @@ -1,8 +1,10 @@ @comment $FreeBSD$ 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 |