aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2004-10-12 15:39:39 +0000
committerMathieu Arnold <mat@FreeBSD.org>2004-10-12 15:39:39 +0000
commitd196e6c25ce85c073cc7aba23b74025eea1ccd7f (patch)
treec5bb579bffde2e278e117387b79c57021a8fa819
parent8140c5484d2c7496369912eff55fbb3887c814ef (diff)
downloadports-d196e6c25ce85c073cc7aba23b74025eea1ccd7f.tar.gz
ports-d196e6c25ce85c073cc7aba23b74025eea1ccd7f.zip
Notes
-rw-r--r--mail/Makefile1
-rw-r--r--mail/spamass-rules_du_jour/Makefile79
-rw-r--r--mail/spamass-rules_du_jour/distinfo2
-rw-r--r--mail/spamass-rules_du_jour/files/patch-config58
-rw-r--r--mail/spamass-rules_du_jour/files/patch-rules_du_jour26
-rw-r--r--mail/spamass-rules_du_jour/pkg-descr4
-rw-r--r--mail/spamass-rules_du_jour/pkg-message20
-rw-r--r--mail/spamass-rules_du_jour/pkg-plist3
8 files changed, 193 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 839396782c7f..d4dae2149b8c 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -412,6 +412,7 @@
SUBDIR += sortmail
SUBDIR += spamass-milter
SUBDIR += spamass-rules
+ SUBDIR += spamass-rules_du_jour
SUBDIR += spambnc
SUBDIR += spamd
SUBDIR += spamguard
diff --git a/mail/spamass-rules_du_jour/Makefile b/mail/spamass-rules_du_jour/Makefile
new file mode 100644
index 000000000000..fc297f8dfd8e
--- /dev/null
+++ b/mail/spamass-rules_du_jour/Makefile
@@ -0,0 +1,79 @@
+# New ports collection makefile for: spamass-rules
+# Date created: 20040802
+# Whom: mranner@inode.at
+#
+# $FreeBSD$
+#
+
+PORTNAME= rules_du_jour
+PORTVERSION= 1.17a
+CATEGORIES= mail
+MASTER_SITES= http://www.ranner.jawa.at/stuff/
+PKGNAMEPREFIX= spamass-
+
+MAINTAINER= mranner@inode.at
+COMMENT= Automatic updates of custom rulesets for SpamAssassin
+
+RUN_DEPENDS= bash:${PORTSDIR}/shells/bash2 \
+ spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin
+
+OPTIONS= ANTIDRUG "Catch those pesky 'pill spams'" on \
+ BOGUS_VIRUS "Catch 'collateral spam' caused by viruses" on \
+ EVILNUMBERS "Phone numbers, PO boxes, ... from spam " on \
+ RANDOM "Detects spamware mistakes like: %RANDOM_WORD" on \
+ SARE "Installs safe SARE rules" on \
+ TRIPWIRE "Matches 3 chars that shouldn't be together" off
+PLIST_FILES= bin/rules_du_jour etc/mail/rulesdujour.sample
+PKGMESSAGE= ${WRKDIR}/pkg-message
+NO_BUILD= yes
+SPAMASS_CONF= etc/mail/spamassassin
+SPAMASS_DIR= ${PREFIX}/${SPAMASS_CONF}
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_ANTIDRUG)
+SPAMASS_FILES+= ANTIDRUG
+.endif
+
+.if defined(WITH_BOGUS_VIRUS)
+SPAMASS_FILES+= BOGUSVIRUS
+.endif
+
+.if defined(WITH_EVILNUMBERS)
+SPAMASS_FILES+= EVILNUMBERS
+.endif
+
+.if defined(WITH_RANDOM)
+SPAMASS_FILES+= RANDOMVAL
+.endif
+
+.if defined(WITH_SARE)
+.for i in SARE_ADULT SARE_FRAUD SARE_BML SARE_RATWARE SARE_SPOOF \
+ SARE_BAYES_POISON_NXM SARE_OEM SARE_RANDOM SARE_SPECIFIC
+SPAMASS_FILES+= $i
+.endfor
+.endif
+
+.if defined(WITH_TRIPWIRE)
+SPAMASS_FILES+= TRIPWIRE
+.endif
+
+do-build:
+ @${DO_NADA}
+
+pre-install:
+ @${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ -e 's|%%DOCSDIR%%|${DOCSDIR}|g' <${.CURDIR}/pkg-message >${PKGMESSAGE}
+ @${SED} -e 's|TRIPWIRE EVILNUMBERS SARE_RANDOM|${SPAMASS_FILES}|' \
+ -e 's|PREFIX="/usr/local"|PREFIX="${LOCALBASE}"|' \
+ <${WRKSRC}/config >${WRKSRC}/config.sample
+
+do-install:
+ @${INSTALL} -d -o root -g wheel -m 0755 ${SPAMASS_DIR}/RulesDuJour
+ @${INSTALL} ${WRKSRC}/rules_du_jour ${LOCALBASE}/bin
+ @${INSTALL_DATA} ${WRKSRC}/config.sample ${LOCALBASE}/etc/mail/rulesdujour.sample
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/mail/spamass-rules_du_jour/distinfo b/mail/spamass-rules_du_jour/distinfo
new file mode 100644
index 000000000000..7440bab1492c
--- /dev/null
+++ b/mail/spamass-rules_du_jour/distinfo
@@ -0,0 +1,2 @@
+MD5 (rules_du_jour-1.17a.tar.gz) = ed54abc68d8fe15abc2936481ea43653
+SIZE (rules_du_jour-1.17a.tar.gz) = 14276
diff --git a/mail/spamass-rules_du_jour/files/patch-config b/mail/spamass-rules_du_jour/files/patch-config
new file mode 100644
index 000000000000..0b1703d3c391
--- /dev/null
+++ b/mail/spamass-rules_du_jour/files/patch-config
@@ -0,0 +1,58 @@
+--- config.orig Sun Aug 8 14:56:31 2004
++++ config Sun Aug 8 14:58:41 2004
+@@ -0,0 +1,55 @@
++TRUSTED_RULESETS="TRIPWIRE EVILNUMBERS SARE_RANDOM";
++PREFIX="/usr/local"
++
++#### Local SpamAssassin/system Settings ####
++#### Modify these to match your system. ####
++SA_DIR="/usr/local/etc/mail/spamassassin"; # Change this to your SA local config
++ # directory, probably /etc/mail/spamassassin.
++
++MAIL_ADDRESS="root"; # Where do Email notifications go
++
++SINGLE_EMAIL_ONLY="true"; # Set this to "true" to send only one notification
++ # email per RDJ run with "interesting"
++ # activity. Set to "" to send a separate
++ # for each interesting activity.
++
++EMAIL_RDJ_UPDATE_ONLY="true"; # Set this to "true" to send notifications only
++ # when an update for RDJ has been retrieved. Set
++ # to "" (default) to send notifications whenever a ruleset
++ # has changed. (Has no effect unless SINGLE_EMAIL_ONLY is set)
++
++SA_LINT="$PREFIX/bin/spamassassin --lint"; # Command used to lint the rules
++
++SA_RESTART="$PREFIX/etc/rc.d/spamd.sh restart"; # Command used to restart spamd
++ # May be /etc/rc.d/init.d/spamassassin restart
++ # For amavisd, may be /etc/init.d/amavisd restart
++ # For minedefang, may be /etc/init.d/mimedefang restart
++
++CURL_PROG="$PREFIX/bin/curl"; # Location of the curl program
++CURL_OPTS="-w %{http_code} --compressed -O -R -s -S -z"; # Parameters of the curl program
++
++WGET_PROG="fetch"; # Use FreeBSD's fetch instead of wget
++WGET_OPTS="-m"; # Parameter of the fetch program
++
++#WGET_PROG="$PREFIX/bin/wget"; # Location of the wget program
++#WGET_OPTS="-N"; # Parameters of the wget program
++
++#PERL="perl"; # Location of the perl program
++#GREP="grep"; # Location of the grep program
++#TAIL="tail -1"; # Location (and parameters) for 'tail -n1'
++#HEAD="head -1"; # Location (and parameters) for 'head -n1'
++#MAILCMD="mail"; # Location of the mail program
++ # that takes and understand the -s flag
++#DEBUG="true"; # Uncomment this to force debug mode on (or use -D)
++#### End Local SpamAssassin Settings ####
++
++#TMPDIR="${SA_DIR}/RulesDuJour"; # Where we store old rulesets. If you delete
++ # this directory, RuleSets may be detected as
++ # out of date the next time you run rules_du_jour.
++
++
++#### Do not change next lines ####
++#### or script will break on FreeBSD ####
++
++DONT_CHECK_FOR_RDJ_UPDATES="true"; # Do not change, or periodic run will break on FreeBSD
++RDJ_URL="http://sandgnat.com/rdj/rules_du_jour"; # URL to update this script
diff --git a/mail/spamass-rules_du_jour/files/patch-rules_du_jour b/mail/spamass-rules_du_jour/files/patch-rules_du_jour
new file mode 100644
index 000000000000..720d35b7c8d7
--- /dev/null
+++ b/mail/spamass-rules_du_jour/files/patch-rules_du_jour
@@ -0,0 +1,26 @@
+--- rules_du_jour.orig Mon Aug 2 20:38:44 2004
++++ rules_du_jour Mon Aug 2 22:29:32 2004
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/local/bin/bash
+ # 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
+
+ ##########################
+@@ -52,7 +52,7 @@
+ # (my_rules_du_jour wrapper script is no longer recommended)
+ # Reads persistent configuration files from /etc, if one exists.
+ # /etc/rulesdujour/config is the recommended configuration file location.
+-for i in /etc/rulesdujour/config /etc/rulesdujour /etc/mail/rulesdujour /etc/sysconfig/RulesDuJour /etc/sysconfig/rulesdujour ; do
++for i in /usr/local/etc/rulesdujour/config /usr/local/etc/rulesdujour /usr/local/etc/mail/rulesdujour ; do
+ [ -f $i ] && source $i ;
+ done;
+
+@@ -133,7 +133,7 @@
+ #### Here are settings for Tripwire. ####
+ TRIPWIRE=0; # Index of Tripwire data into the arrays is 0
+ CF_URLS[0]="http://www.rulesemporium.com/rules/99_FVGT_Tripwire.cf";
+- CF_FILES[0]="tripwire.cf";
++ CF_FILES[0]="99_FVGT_Tripwire.cf";
+ CF_NAMES[0]="TripWire";
+ PARSE_NEW_VER_SCRIPTS[0]="${PERL} -ne 'print if /^\s*#.*(vers?|version|rev|revision)[:\.\s]*[0-9]/i;' | sort | ${TAIL}";
+ # CF_MUNGE_SCRIPTS[0]="nothing necessary for this ruleset.";
diff --git a/mail/spamass-rules_du_jour/pkg-descr b/mail/spamass-rules_du_jour/pkg-descr
new file mode 100644
index 000000000000..881b8e499602
--- /dev/null
+++ b/mail/spamass-rules_du_jour/pkg-descr
@@ -0,0 +1,4 @@
+Automatic updates of custom rulesets for SpamAssassin which are not
+part of the official distro.
+
+WWW: http://www.exit0.us/index.php/RulesDuJour
diff --git a/mail/spamass-rules_du_jour/pkg-message b/mail/spamass-rules_du_jour/pkg-message
new file mode 100644
index 000000000000..bff0cba1d6d3
--- /dev/null
+++ b/mail/spamass-rules_du_jour/pkg-message
@@ -0,0 +1,20 @@
+*************************************************************************
+
+Please edit the configuration in %%LOCALBASE%%/etc/mail/rulesdujour
+Run %%LOCALBASE%%/bin/rules_du_jour to fetch the latest rulesets
+The custom rulesets are updated in %%LOCALBASE%%/etc/mail/spamassassin
+
+After updating the rules please do the following:
+
+1. Read any extra info available with the rules, including the comments
+ in the .cf files.
+2. Check to make sure that the default scores in these rules fit your
+ installation. You might want to modify scores.
+3. Test the new rulesets. Keep an eye on hits from the new rules to
+ determine if the scoring is right for you.
+4. Run %%LOCALBASE%%/bin/rules_du_jour ONLY once per day.
+
+You may visit http://www.exit0.us/index.php/RulesDuJour before you use
+RulesDuJour.
+
+*************************************************************************
diff --git a/mail/spamass-rules_du_jour/pkg-plist b/mail/spamass-rules_du_jour/pkg-plist
new file mode 100644
index 000000000000..db2156461902
--- /dev/null
+++ b/mail/spamass-rules_du_jour/pkg-plist
@@ -0,0 +1,3 @@
+@unexec rmdir %D/etc/mail/spamassassin/RulesDuJour 2>/dev/null || true
+@unexec rmdir %D/etc/mail/spamassassin 2>/dev/null || true
+@unexec rmdir %D/etc/mail 2>/dev/null || true