Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Oct 2004 13:49:20 +0200 (CEST)
From:      Michael Ranner <mranner@inode.at>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/72483: [NEW PORT] mail/spamass-rules_du_jour: Automatic updates of custom rulesets for SpamAssassin
Message-ID:  <200410101149.i9ABnKlR019283@dwarf.jawa.at>
Resent-Message-ID: <200410101150.i9ABoT9W092779@freefall.freebsd.org>

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

>Number:         72483
>Category:       ports
>Synopsis:       [NEW PORT] mail/spamass-rules_du_jour: Automatic updates of custom rulesets for SpamAssassin
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 10 11:50:29 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Michael Ranner
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
>Environment:
System: FreeBSD dwarf.jawa.at 4.10-RELEASE FreeBSD 4.10-RELEASE #1: Mon Oct  4 20:31:14 CEST
>Description:
Automatic updates of custom rulesets for SpamAssassin which are not
part of the official distro.

WWW: http://www.exit0.us/index.php/RulesDuJour

- Obsoletes ports/70161

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- spamass-rules_du_jour-1.17a.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:
#
#	spamass-rules_du_jour
#	spamass-rules_du_jour/pkg-descr
#	spamass-rules_du_jour/distinfo
#	spamass-rules_du_jour/Makefile
#	spamass-rules_du_jour/pkg-message
#	spamass-rules_du_jour/files
#	spamass-rules_du_jour/files/patch-rules_du_jour
#	spamass-rules_du_jour/files/patch-config
#	spamass-rules_du_jour/pkg-plist
#
echo c - spamass-rules_du_jour
mkdir -p spamass-rules_du_jour > /dev/null 2>&1
echo x - spamass-rules_du_jour/pkg-descr
sed 's/^X//' >spamass-rules_du_jour/pkg-descr << 'END-of-spamass-rules_du_jour/pkg-descr'
XAutomatic updates of custom rulesets for SpamAssassin which are not
Xpart of the official distro.
X
XWWW: http://www.exit0.us/index.php/RulesDuJour
END-of-spamass-rules_du_jour/pkg-descr
echo x - spamass-rules_du_jour/distinfo
sed 's/^X//' >spamass-rules_du_jour/distinfo << 'END-of-spamass-rules_du_jour/distinfo'
XMD5 (rules_du_jour-1.17a.tar.gz) = ed54abc68d8fe15abc2936481ea43653
XSIZE (rules_du_jour-1.17a.tar.gz) = 14276
END-of-spamass-rules_du_jour/distinfo
echo x - spamass-rules_du_jour/Makefile
sed 's/^X//' >spamass-rules_du_jour/Makefile << 'END-of-spamass-rules_du_jour/Makefile'
X# New ports collection makefile for: spamass-rules
X# Date created:         20040802
X# Whom:                 mranner@inode.at
X#
X# $FreeBSD$
X#
X
XPORTNAME=	rules_du_jour
XPORTVERSION=	1.17a
XCATEGORIES=	mail
XMASTER_SITES=	http://www.ranner.jawa.at/stuff/
XPKGNAMEPREFIX=	spamass-
X
XMAINTAINER=	mranner@inode.at
XCOMMENT=	Automatic updates of custom rulesets for SpamAssassin
X
XRUN_DEPENDS=	bash:${PORTSDIR}/shells/bash2 \
X				spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin
X
XOPTIONS=	ANTIDRUG "Catch those pesky 'pill spams'" on \
X		BOGUS_VIRUS "Catch 'collateral spam' caused by viruses" on \
X		EVILNUMBERS "Phone numbers, PO boxes, ... from spam " on \
X		RANDOM "Detects spamware mistakes like: %RANDOM_WORD" on \
X		SARE "Installs safe SARE rules" on \
X		TRIPWIRE "Matches 3 chars that shouldn't be together" off
XPLIST_FILES=	bin/rules_du_jour etc/mail/rulesdujour.sample
XPKGMESSAGE=		${WRKDIR}/pkg-message
XNO_BUILD=		yes
XSPAMASS_CONF=	etc/mail/spamassassin
XSPAMASS_DIR=	${PREFIX}/${SPAMASS_CONF}
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_ANTIDRUG)
XSPAMASS_FILES+=	ANTIDRUG
X.endif
X
X.if defined(WITH_BOGUS_VIRUS)
XSPAMASS_FILES+=	BOGUSVIRUS
X.endif
X
X.if defined(WITH_EVILNUMBERS)
XSPAMASS_FILES+=	EVILNUMBERS
X.endif
X
X.if defined(WITH_RANDOM)
XSPAMASS_FILES+=	RANDOMVAL
X.endif
X
X.if defined(WITH_SARE)
X.for i in SARE_ADULT SARE_FRAUD SARE_BML SARE_RATWARE SARE_SPOOF \
X	SARE_BAYES_POISON_NXM SARE_OEM SARE_RANDOM SARE_SPECIFIC
XSPAMASS_FILES+=	$i
X.endfor
X.endif
X
X.if defined(WITH_TRIPWIRE)
XSPAMASS_FILES+=	TRIPWIRE
X.endif
X
Xdo-build:
X	@${DO_NADA}
X
Xpre-install:
X	@${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
X		-e 's|%%DOCSDIR%%|${DOCSDIR}|g' <${.CURDIR}/pkg-message >${PKGMESSAGE}
X	@${SED} -e 's|TRIPWIRE EVILNUMBERS SARE_RANDOM|${SPAMASS_FILES}|' \
X		-e 's|PREFIX="/usr/local"|PREFIX="${LOCALBASE}"|' \
X		<${WRKSRC}/config >${WRKSRC}/config.sample
X
Xdo-install:
X	@${INSTALL} -d -o root -g wheel -m 0755 ${SPAMASS_DIR}/RulesDuJour
X	@${INSTALL} ${WRKSRC}/rules_du_jour ${LOCALBASE}/bin
X	@${INSTALL_DATA} ${WRKSRC}/config.sample ${LOCALBASE}/etc/mail/rulesdujour.sample
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-spamass-rules_du_jour/Makefile
echo x - spamass-rules_du_jour/pkg-message
sed 's/^X//' >spamass-rules_du_jour/pkg-message << 'END-of-spamass-rules_du_jour/pkg-message'
X*************************************************************************
X
XPlease edit the configuration in %%LOCALBASE%%/etc/mail/rulesdujour
XRun %%LOCALBASE%%/bin/rules_du_jour to fetch the latest rulesets
XThe custom rulesets are updated in %%LOCALBASE%%/etc/mail/spamassassin
X
XAfter updating the rules please do the following:
X
X1. Read any extra info available with the rules, including the comments
X   in the .cf files.
X2. Check to make sure that the default scores in these rules fit your
X   installation. You might want to modify scores.
X3. Test the new rulesets. Keep an eye on hits from the new rules to
X   determine if the scoring is right for you.
X4. Run %%LOCALBASE%%/bin/rules_du_jour ONLY once per day.
X
XYou may visit http://www.exit0.us/index.php/RulesDuJour before you use
XRulesDuJour.
X
X*************************************************************************
END-of-spamass-rules_du_jour/pkg-message
echo c - spamass-rules_du_jour/files
mkdir -p spamass-rules_du_jour/files > /dev/null 2>&1
echo x - spamass-rules_du_jour/files/patch-rules_du_jour
sed 's/^X//' >spamass-rules_du_jour/files/patch-rules_du_jour << 'END-of-spamass-rules_du_jour/files/patch-rules_du_jour'
X--- rules_du_jour.orig	Mon Aug  2 20:38:44 2004
X+++ rules_du_jour	Mon Aug  2 22:29:32 2004
X@@ -1,4 +1,4 @@
X-#!/bin/bash
X+#!/usr/local/bin/bash
X # Version 1.17a   Added support for curl by default (instead of wget). Requires curl 7.10 or higher.  Integrated "email me only when RDJ has been updated" patch (thanks, Daniel Cohen!) rev 17a: fixed extraneous debug print
X 
X ##########################
X@@ -52,7 +52,7 @@
X # (my_rules_du_jour wrapper script is no longer recommended)
X # Reads persistent configuration files from /etc, if one exists.  
X # /etc/rulesdujour/config is the recommended configuration file location.
X-for i in /etc/rulesdujour/config /etc/rulesdujour /etc/mail/rulesdujour /etc/sysconfig/RulesDuJour /etc/sysconfig/rulesdujour ; do
X+for i in /usr/local/etc/rulesdujour/config /usr/local/etc/rulesdujour /usr/local/etc/mail/rulesdujour ; do
X     [ -f $i ] && source $i ;
X done;
X 
X@@ -133,7 +133,7 @@
X #### Here are settings for Tripwire. ####
X TRIPWIRE=0; # Index of Tripwire data into the arrays is 0
X               CF_URLS[0]="http://www.rulesemporium.com/rules/99_FVGT_Tripwire.cf";
X-             CF_FILES[0]="tripwire.cf";
X+             CF_FILES[0]="99_FVGT_Tripwire.cf";
X              CF_NAMES[0]="TripWire";
X PARSE_NEW_VER_SCRIPTS[0]="${PERL} -ne 'print if /^\s*#.*(vers?|version|rev|revision)[:\.\s]*[0-9]/i;' | sort | ${TAIL}";
X #    CF_MUNGE_SCRIPTS[0]="nothing necessary for this ruleset.";
END-of-spamass-rules_du_jour/files/patch-rules_du_jour
echo x - spamass-rules_du_jour/files/patch-config
sed 's/^X//' >spamass-rules_du_jour/files/patch-config << 'END-of-spamass-rules_du_jour/files/patch-config'
X--- config.orig	Sun Aug  8 14:56:31 2004
X+++ config	Sun Aug  8 14:58:41 2004
X@@ -0,0 +1,55 @@
X+TRUSTED_RULESETS="TRIPWIRE EVILNUMBERS SARE_RANDOM";
X+PREFIX="/usr/local"
X+
X+#### Local SpamAssassin/system Settings ####
X+#### Modify these to match your system. ####
X+SA_DIR="/usr/local/etc/mail/spamassassin";	# Change this to your SA local config 
X+											# directory, probably /etc/mail/spamassassin.
X+
X+MAIL_ADDRESS="root";	# Where do Email notifications go
X+
X+SINGLE_EMAIL_ONLY="true";	# Set this to "true" to send only one notification
X+							# email per RDJ run with "interesting"
X+							# activity. Set to "" to send a separate
X+							# for each interesting activity.
X+
X+EMAIL_RDJ_UPDATE_ONLY="true";	# Set this to "true" to send notifications only 
X+								# when an update for RDJ has been retrieved.  Set 
X+								# to "" (default) to send notifications whenever a ruleset 
X+								# has changed. (Has no effect unless SINGLE_EMAIL_ONLY is set)
X+
X+SA_LINT="$PREFIX/bin/spamassassin --lint";	# Command used to lint the rules
X+
X+SA_RESTART="$PREFIX/etc/rc.d/spamd.sh restart";	# Command used to restart spamd
X+												# May be /etc/rc.d/init.d/spamassassin restart
X+												# For amavisd, may be /etc/init.d/amavisd restart
X+												# For minedefang, may be /etc/init.d/mimedefang restart
X+
X+CURL_PROG="$PREFIX/bin/curl";								# Location of the curl program
X+CURL_OPTS="-w %{http_code} --compressed -O -R -s -S -z";	# Parameters of the curl program
X+
X+WGET_PROG="fetch";	# Use FreeBSD's fetch instead of wget
X+WGET_OPTS="-m";		# Parameter of the fetch program
X+
X+#WGET_PROG="$PREFIX/bin/wget";	# Location of the wget program
X+#WGET_OPTS="-N";					# Parameters of the wget program
X+
X+#PERL="perl";		# Location of the perl program
X+#GREP="grep";		# Location of the grep program 
X+#TAIL="tail -1";	# Location (and parameters) for 'tail -n1'
X+#HEAD="head -1";	# Location (and parameters) for 'head -n1'
X+#MAILCMD="mail";	# Location of the mail program 
X+					# that takes and understand the -s flag
X+#DEBUG="true";		# Uncomment this to force debug mode on (or use -D)
X+#### End Local SpamAssassin Settings    ####
X+
X+#TMPDIR="${SA_DIR}/RulesDuJour";	# Where we store old rulesets.  If you delete
X+									# this directory, RuleSets may be detected as
X+									# out of date the next time you run rules_du_jour.
X+
X+
X+#### Do not change next lines        ####
X+#### or script will break on FreeBSD ####
X+
X+DONT_CHECK_FOR_RDJ_UPDATES="true";	# Do not change, or periodic run will break on FreeBSD
X+RDJ_URL="http://sandgnat.com/rdj/rules_du_jour";	# URL to update this script
END-of-spamass-rules_du_jour/files/patch-config
echo x - spamass-rules_du_jour/pkg-plist
sed 's/^X//' >spamass-rules_du_jour/pkg-plist << 'END-of-spamass-rules_du_jour/pkg-plist'
X@unexec rmdir %D/etc/mail/spamassassin/RulesDuJour 2>/dev/null || true
X@unexec rmdir %D/etc/mail/spamassassin 2>/dev/null || true
X@unexec rmdir %D/etc/mail 2>/dev/null || true
END-of-spamass-rules_du_jour/pkg-plist
exit
--- spamass-rules_du_jour-1.17a.shar ends here ---

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



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