From mranner@dwarf.jawa.at  Sun Aug  8 11:54:31 2004
Return-Path: <mranner@dwarf.jawa.at>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2639016A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  8 Aug 2004 11:54:31 +0000 (GMT)
Received: from dwarf.jawa.at (62-99-193-150.static.adsl-line.inode.at [62.99.193.150])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4B5FA43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  8 Aug 2004 11:54:29 +0000 (GMT)
	(envelope-from mranner@dwarf.jawa.at)
Received: from dwarf.jawa.at (localhost.jawa.at [127.0.0.1])
	by dwarf.jawa.at (8.12.11/8.12.9) with ESMTP id i78Bs4Jn016540
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 8 Aug 2004 13:54:04 +0200 (CEST)
	(envelope-from mranner@dwarf.jawa.at)
Received: (from root@localhost)
	by dwarf.jawa.at (8.12.11/8.12.9/Submit) id i78Bs3Al016539;
	Sun, 8 Aug 2004 13:54:03 +0200 (CEST)
	(envelope-from mranner)
Message-Id: <200408081154.i78Bs3Al016539@dwarf.jawa.at>
Date: Sun, 8 Aug 2004 13:54:03 +0200 (CEST)
From: Michael Ranner <mranner@inode.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [NEW PORT] mail/spamass-rules_du_jour: Automatic updates of custom rulesets for SpamAssassin
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         70161
>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 08 12:00:40 GMT 2004
>Closed-Date:    Tue Oct 12 15:32:04 GMT 2004
>Last-Modified:  Tue Oct 12 15:32:04 GMT 2004
>Originator:     Michael Ranner
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
>Environment:
System: FreeBSD dwarf.jawa.at 4.10-RELEASE FreeBSD 4.10-RELEASE #0: Fri Jun 25 23:02:44 CEST 2004
>Description:
Automatic updates of custom rulesets for SpamAssassin which are not
part of the official distro.

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

Generated with FreeBSD Port Tools 0.50
>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				wget:${PORTSDIR}/ftp/wget
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	Mon Aug  2 21:15:18 2004
X+++ config	Mon Aug  2 21:33:06 2004
X@@ -0,0 +1,52 @@
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="$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:

From: Michael Ranner <mranner@inode.at>
To: freebsd-gnats-submit@FreeBSD.org, mranner@inode.at
Cc:  
Subject: Re: ports/70161: [NEW PORT] mail/spamass-rules_du_jour: Automatic updates of custom rulesets for SpamAssassin
Date: Sun, 8 Aug 2004 14:11:46 +0200

 Oops:
 
 - Please remove last "\" in OPTIONS
 
 - I should not use do-build target
 

From: Mathieu Arnold <mat@FreeBSD.org>
To: Michael Ranner <mranner@inode.at>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/70161: [NEW PORT] mail/spamass-rules_du_jour:
 Automatic	updates of custom rulesets for SpamAssassin
Date: Sun, 08 Aug 2004 14:31:36 +0200

 --==========03E2A2568C72B2B5124C==========
 Content-Type: text/plain; charset=iso-8859-1
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 +-le 08/08/2004 12:20 +0000, Michael Ranner =E9crivait :
 | The following reply was made to PR ports/70161; it has been noted by GNATS.
 |=20
 | From: Michael Ranner <mranner@inode.at>
 | To: freebsd-gnats-submit@FreeBSD.org, mranner@inode.at
 | Cc: =20
 | Subject: Re: ports/70161: [NEW PORT] mail/spamass-rules_du_jour: Automatic
 | updates of custom rulesets for SpamAssassin Date: Sun, 8 Aug 2004 14:11:46
 | +0200
 |=20
 |  Oops:
 | =20
 |  - Please remove last "\" in OPTIONS
 | =20
 |  - I should not use do-build target
 
 Could you resubmit a shar with these changes ?
 Could you also remove the bash dependency and have the script work with
 /bin/sh instead of /bin/bash (it should be painless, and it would be better
 not to install bash just to run the script :-)
 
 --=20
 Mathieu Arnold
 --==========03E2A2568C72B2B5124C==========
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (MingW32)
 
 iQEVAwUBQRYdKVvROjYJ63c1AQI2DAf8DIXvlwAW3s7oYZ35r79WUW3ZjYIyEzKv
 rFRKXagYrraVIdlgFzNZqg79HibYV2QSvfalWlXkUuZkTfco9MouOoVr6HFVSexn
 O0zlwsHKwmOCBNyWz9rMb46Vq68ffR9C9N/X6JJ0nVQWOPteITpcLhcyootbAOBB
 CtH6/NGxp72yNPTAbJW84YRz06ZlPV8h2j2OzUFeuuYd5eW+Jy/zw0qBLRWU1f9y
 OtEOVHEqI3NMQjhJOTAsN/ez7XUS0zFF8rDV1fuOgexq+do+XlOLxbFOk3azIvHH
 5LThvwFR1gTMdox2yctzd910BslZS0bFe313rfKGiHpjaKtL0f1eBQ==
 =sUgm
 -----END PGP SIGNATURE-----
 
 --==========03E2A2568C72B2B5124C==========--
 

From: Michael Ranner <mranner@inode.at>
To: Mathieu Arnold <mat@FreeBSD.org>
Cc:  
Subject: Re: ports/70161: [NEW PORT] mail/spamass-rules_du_jour:
 Automatic	updates of custom rulesets for SpamAssassin
Date: Sun, 8 Aug 2004 14:45:44 +0200

 Am Sonntag, 8. August 2004 14:31 schrieben Sie:
 > Could you resubmit a shar with these changes ?
 
 This should no problem
 
 > Could you also remove the bash dependency and have the script work with
 > /bin/sh instead of /bin/bash (it should be painless, and it would be better
 > not to install bash just to run the script :-)
 
 Yes I tried it for the first time, but AFAIK /bin/sh did not support arrays
 like this:
 
 CF_URLS[7]="http://mywebpages.comcast.net/mkettler/sa/antidrug.cf"
 CF_FILES[7]="antidrug.cf";
 
 Zsh also supports arrays but I think its not really an alternative.
 Otherwise I had to change it to some kind of CF_URLS_7 but this will break the 
 config between FreeBSD and bash running systems.
 
 -- 
 /\/\ichael Ranner
 
 mranner@inode.at - mranner@jawa.at - mranner@bugat.at
 -----------------------------------------------------
    BSD Usergroup Austria - http://www.bugat.at/
 
 -----BEGIN GEEK CODE BLOCK-----
 GIT/CS/AT dx(-) s+:(++:) a- C++ UBLVS++++$ P++>+++$ L-(+)$ E---
 W+++$ N+(++) o-- K- w--()$ O-(--) M@ V-(--) PS+>++ PE(-) Y+ PGP(-)
 t+ 5+ X+++(++++) R* tv++ b+(++) DI++ D-(--) G- e h--(*) r++ y?
 ------END GEEK CODE BLOCK------
 
 

From: Mathieu Arnold <mat@FreeBSD.org>
To: Michael Ranner <mranner@inode.at>
Cc: gnats <freebsd-gnats-submit@FreeBSD.org>
Subject: Re: ports/70161: [NEW PORT] mail/spamass-rules_du_jour:
 Automatic	updates of custom rulesets for SpamAssassin
Date: Sun, 08 Aug 2004 14:52:38 +0200

 +-le 08/08/2004 14:45 +0200, Michael Ranner =E9crivait :
 | Am Sonntag, 8. August 2004 14:31 schrieben Sie:
 |> Could you resubmit a shar with these changes ?
 |=20
 | This should no problem
 |=20
 |> Could you also remove the bash dependency and have the script work with
 |> /bin/sh instead of /bin/bash (it should be painless, and it would be =
 better
 |> not to install bash just to run the script :-)
 |=20
 | Yes I tried it for the first time, but AFAIK /bin/sh did not support arrays
 | like this:
 |=20
 | CF_URLS[7]=3D"http://mywebpages.comcast.net/mkettler/sa/antidrug.cf"
 | CF_FILES[7]=3D"antidrug.cf";
 |=20
 | Zsh also supports arrays but I think its not really an alternative.
 | Otherwise I had to change it to some kind of CF_URLS_7 but this will break
 | the  config between FreeBSD and bash running systems.
 
 Ok, just give me a new shar with bash and the changes you said up there :-)
 
 --=20
 Mathieu Arnold

From: Michael Ranner <mranner@inode.at>
To: Mathieu Arnold <mat@FreeBSD.org>
Cc:  
Subject: Re: ports/70161: [NEW PORT] mail/spamass-rules_du_jour:
 Automatic	updates of custom rulesets for SpamAssassin
Date: Sun, 8 Aug 2004 14:52:37 +0200

 Am Sonntag, 8. August 2004 14:31 schrieben Sie:
 > |  - Please remove last "\" in OPTIONS
 > |
 > |  - I should not use do-build target
 >
 > Could you resubmit a shar with these changes ?
 
 DO_NADA same problem as with spamass-rules
 
 > Could you also remove the bash dependency and have the script work with
 > /bin/sh instead of /bin/bash (it should be painless, and it would be better
 > not to install bash just to run the script :-)
 
 After some manpage-reading, "wget -N" could be replaced by "fetch -m"
 
 -- 
 /\/\ichael Ranner
 
 mranner@inode.at - mranner@jawa.at - mranner@bugat.at
 -----------------------------------------------------
    BSD Usergroup Austria - http://www.bugat.at/
 
 -----BEGIN GEEK CODE BLOCK-----
 GIT/CS/AT dx(-) s+:(++:) a- C++ UBLVS++++$ P++>+++$ L-(+)$ E---
 W+++$ N+(++) o-- K- w--()$ O-(--) M@ V-(--) PS+>++ PE(-) Y+ PGP(-)
 t+ 5+ X+++(++++) R* tv++ b+(++) DI++ D-(--) G- e h--(*) r++ y?
 ------END GEEK CODE BLOCK------
 
 

From: Mathieu Arnold <mat@FreeBSD.org>
To: Michael Ranner <mranner@inode.at>,
	gnats <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: ports/70161: [NEW PORT] mail/spamass-rules_du_jour:
 Automatic	updates of custom rulesets for SpamAssassin
Date: Sun, 08 Aug 2004 14:55:29 +0200

 +-le 08/08/2004 14:52 +0200, Michael Ranner =E9crivait :
 | Am Sonntag, 8. August 2004 14:31 schrieben Sie:
 |> |  - Please remove last "\" in OPTIONS
 |> |=20
 |> |  - I should not use do-build target
 |>=20
 |> Could you resubmit a shar with these changes ?
 |=20
 | DO_NADA same problem as with spamass-rules
 
 It's a NO_BUILD/OPTIONS conflict, we'll look into it.
 
 |> Could you also remove the bash dependency and have the script work with
 |> /bin/sh instead of /bin/bash (it should be painless, and it would be =
 better
 |> not to install bash just to run the script :-)
 |=20
 | After some manpage-reading, "wget -N" could be replaced by "fetch -m"
 
 Well, it's your port, go ahead :-)
 
 ps: keep freebsd-gnats-submit@FreeBSD.org CCed so that the audit trail is
 kept.
 --=20
 Mathieu Arnold

From: Michael Ranner <mranner@inode.at>
To: Mathieu Arnold <mat@FreeBSD.org>
Cc: gnats <freebsd-gnats-submit@FreeBSD.org>
Subject: Re: ports/70161: [NEW PORT] mail/spamass-rules_du_jour: =?iso-8859-1?q?Automatic=09updates_of_custom_rulesets_for?= SpamAssassin
Date: Sun, 8 Aug 2004 15:16:22 +0200

 Am Sonntag, 8. August 2004 14:55 schrieb Mathieu Arnold:
 > Well, it's your port, go ahead :-)
 >
 > ps: keep freebsd-gnats-submit@FreeBSD.org CCed so that the audit trail is
 > kept.
 
 # 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
 
State-Changed-From-To: open->closed 
State-Changed-By: mat 
State-Changed-When: Tue Oct 12 15:31:59 GMT 2004 
State-Changed-Why:  
Supersceded by 72483 

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