summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorLukenShiro <lukenshiro@ngi.it>2010-05-13 00:38:18 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:38:18 +0200
commitd755c90cf3358b54b62b671972259ff9a3757882 (patch)
tree31880758f690482c076de243e6dd25503b824d44 /network
parentcd3c2891edd50e9b4536626c6955715621f0a791 (diff)
downloadslackbuilds-d755c90cf3358b54b62b671972259ff9a3757882.tar.gz
network/spamassassin: Updated for version 3.3.0
Diffstat (limited to 'network')
-rw-r--r--network/spamassassin/README19
-rw-r--r--network/spamassassin/README.SLACKWARE11
-rw-r--r--network/spamassassin/doinst.sh2
-rw-r--r--network/spamassassin/sa-update.sh7
-rw-r--r--network/spamassassin/slack-desc8
-rw-r--r--network/spamassassin/spamassassin-db.sql64
-rw-r--r--network/spamassassin/spamassassin.SlackBuild23
-rw-r--r--network/spamassassin/spamassassin.info10
8 files changed, 123 insertions, 21 deletions
diff --git a/network/spamassassin/README b/network/spamassassin/README
index f0558e3253..824d692028 100644
--- a/network/spamassassin/README
+++ b/network/spamassassin/README
@@ -7,10 +7,19 @@ advanced statistical methods. It has a modular architecture that allows
other technologies to be quickly wielded against spam and is designed for
easy integration into virtually any email system.
-spamassassin requires:
-- for basic functions, perl-digest-sha1, perl-net-dns and perl-html-parser.
-- for sa-compile (to compile regex into c code): re2c.
-- for sa-update (to update spamassassin rules): libwww-perl.
+For a complete user experience (basic and advanced functions) spamassassin
+requires: perl-Test-Pod, perl-Encode-Detect, perl-Image-Info, perl-TimeDate,
+perl-Net-LibIDN, Net-SSLeay, perl-Socket6, perl-IO-Socket-SSL,
+perl-IO-Socket-INET6, perl-Crypt-OpenSSL-Bignum, perl-Crypt-OpenSSL-Random,
+perl-Crypt-OpenSSL-RSA, perl-Geography-Countries, perl-IP-Country,
+perl-digest-sha1, perl-digest-hmac, perl-html-tagset, perl-html-parser, re2c,
+libwww-perl, perl-NetAddr-IP, perl-Net-Server, perl-Net-Ident, perl-MailTools,
+perl-net-ip, perl-net-dns, perl-Net-DNS-Resolver-Programmable, perl-Mail-SPF
+perl-Mail-DKIM.
+
+You may want to install pyzor, too.
+
All required packages are available from SlackBuilds.org.
-For advanced functions it may rely on other (optional) perl modules.
+Before using, please read README.SLACKWARE file.
+
diff --git a/network/spamassassin/README.SLACKWARE b/network/spamassassin/README.SLACKWARE
new file mode 100644
index 0000000000..41f93e711a
--- /dev/null
+++ b/network/spamassassin/README.SLACKWARE
@@ -0,0 +1,11 @@
+After installation, as spamassassin source does NOT include rules anymore, you
+have to run "sa-update" script then restart "/etc/rc.d/rc.spamd", in order to
+retrieve updated rules, *BEFORE* using spamassassin or spamc for the first time.
+Rules will be installed in a sub-directory of /var/lib/spamassassin/<version>/
+directory: don't manually move them!
+
+Upstream developers recommend rules to be kept up-to-date regularly.
+A really minimal cron script is provided in /etc/cron.weekly/ to dynamically
+check, download and install new rules every week. If you need a different
+periodicity you can move the cron script accordingly.
+
diff --git a/network/spamassassin/doinst.sh b/network/spamassassin/doinst.sh
index 470032e47d..0f1a4cd01e 100644
--- a/network/spamassassin/doinst.sh
+++ b/network/spamassassin/doinst.sh
@@ -27,6 +27,6 @@ config etc/mail/spamassassin/local.cf.new
config etc/mail/spamassassin/v310.pre.new
config etc/mail/spamassassin/v312.pre.new
config etc/mail/spamassassin/v320.pre.new
+config etc/mail/spamassassin/v330.pre.new
config etc/rc.d/rc.spamd.new
config etc/spamassassin.conf.new
-
diff --git a/network/spamassassin/sa-update.sh b/network/spamassassin/sa-update.sh
new file mode 100644
index 0000000000..519578f9f0
--- /dev/null
+++ b/network/spamassassin/sa-update.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+/usr/bin/sa-update > /dev/null
+if [ $? -eq 0 ]; then
+ [ -x /etc/rc.d/rc.spamd ] && /etc/rc.d/rc.spamd restart > /dev/null
+fi
+
diff --git a/network/spamassassin/slack-desc b/network/spamassassin/slack-desc
index 472bd54517..fa68158fb2 100644
--- a/network/spamassassin/slack-desc
+++ b/network/spamassassin/slack-desc
@@ -12,8 +12,8 @@ spamassassin: It is an intelligent email filter which uses a diverse range
spamassassin: of tests to identify unsolicited bulk email, more commonly
spamassassin: known as Spam. These tests are applied to email headers and
spamassassin: content to classify email using advanced statistical methods.
-spamassassin:
+spamassassin:
spamassassin: Homepage: http://spamassassin.apache.org
-spamassassin:
-spamassassin:
-spamassassin:
+spamassassin:
+spamassassin:
+spamassassin:
diff --git a/network/spamassassin/spamassassin-db.sql b/network/spamassassin/spamassassin-db.sql
new file mode 100644
index 0000000000..44b9818eba
--- /dev/null
+++ b/network/spamassassin/spamassassin-db.sql
@@ -0,0 +1,64 @@
+CREATE TABLE awl (
+ username varchar(100) NOT NULL default '',
+ email varchar(255) NOT NULL default '',
+ ip varchar(40) NOT NULL default '',
+ count int(11) NOT NULL default '0',
+ totscore float NOT NULL default '0',
+ signedby varchar(255) NOT NULL default '',
+ PRIMARY KEY (username,email,signedby,ip)
+) TYPE=InnoDB;
+
+CREATE TABLE userpref (
+ username varchar(100) NOT NULL default '',
+ preference varchar(50) NOT NULL default '',
+ value varchar(100) NOT NULL default '',
+ prefid int(11) NOT NULL auto_increment,
+ PRIMARY KEY (prefid),
+ KEY username (username)
+) TYPE=InnoDB;
+
+CREATE TABLE bayes_expire (
+ id int(11) NOT NULL default '0',
+ runtime int(11) NOT NULL default '0',
+ KEY bayes_expire_idx1 (id)
+) TYPE=InnoDB;
+
+CREATE TABLE bayes_global_vars (
+ variable varchar(30) NOT NULL default '',
+ value varchar(200) NOT NULL default '',
+ PRIMARY KEY (variable)
+) TYPE=InnoDB;
+
+INSERT INTO bayes_global_vars VALUES ('VERSION','3');
+
+CREATE TABLE bayes_seen (
+ id int(11) NOT NULL default '0',
+ msgid varchar(200) binary NOT NULL default '',
+ flag char(1) NOT NULL default '',
+ PRIMARY KEY (id,msgid)
+) TYPE=InnoDB;
+
+CREATE TABLE bayes_token (
+ id int(11) NOT NULL default '0',
+ token char(5) NOT NULL default '',
+ spam_count int(11) NOT NULL default '0',
+ ham_count int(11) NOT NULL default '0',
+ atime int(11) NOT NULL default '0',
+ PRIMARY KEY (id, token),
+ INDEX bayes_token_idx1 (id, atime)
+) TYPE=InnoDB;
+
+CREATE TABLE bayes_vars (
+ id int(11) NOT NULL AUTO_INCREMENT,
+ username varchar(200) NOT NULL default '',
+ spam_count int(11) NOT NULL default '0',
+ ham_count int(11) NOT NULL default '0',
+ token_count int(11) NOT NULL default '0',
+ last_expire int(11) NOT NULL default '0',
+ last_atime_delta int(11) NOT NULL default '0',
+ last_expire_reduce int(11) NOT NULL default '0',
+ oldest_token_age int(11) NOT NULL default '2147483647',
+ newest_token_age int(11) NOT NULL default '0',
+ PRIMARY KEY (id),
+ UNIQUE bayes_vars_idx1 (username)
+) TYPE=InnoDB;
diff --git a/network/spamassassin/spamassassin.SlackBuild b/network/spamassassin/spamassassin.SlackBuild
index d4def1edd1..5f463bdfc2 100644
--- a/network/spamassassin/spamassassin.SlackBuild
+++ b/network/spamassassin/spamassassin.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for spamassassin
-# Copyright 2008 LukenShiro <lukenshiro@ngi.it>
+# Copyright 2008-2010 LukenShiro <lukenshiro@ngi.it>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,8 +22,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Thanks to Nishant Limbachia for providing a SQL script to be used with
+# spamassassin database, and most of spamassassin's dependencies.
+
PRGNAM=spamassassin
-VERSION=${VERSION:-3.2.5}
+VERSION=${VERSION:-3.3.0}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -35,7 +38,7 @@ OUTPUT=${OUTPUT:-/tmp}
SRC_PRGNAM=Mail-SpamAssassin
DOCFILES="Changes CREDITS INSTALL LICENSE NOTICE PACKAGING procmailrc.example \
-sample-nonspam.txt sample-spam.txt README TRADEMARK UPGRADE USAGE"
+README sample-nonspam.txt sample-spam.txt TRADEMARK UPGRADE USAGE sql/"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -62,8 +65,7 @@ find . \
echo "y" | perl Makefile.PL INSTALLDIRS=vendor
-CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" \
-make
+make CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
make install DESTDIR=$PKG
# Move man-pages to appropriate place
@@ -80,7 +82,7 @@ find $PKG -depth -type d -empty -exec rm -rf {} \;
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
+
# Compress man pages
( cd $PKG/usr/man || exit 1
find . -type f -exec gzip -9 {} \;
@@ -94,6 +96,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
mv v310.pre v310.pre.new
mv v312.pre v312.pre.new
mv v320.pre v320.pre.new
+ mv v330.pre v330.pre.new
)
# Copy init script to /etc/rc.d and modify it for name consistency
@@ -106,8 +109,14 @@ cat > $PKG/etc/spamassassin.conf.new << EOF
ENABLED=1
EOF
+# Copy cron script
+mkdir -p $PKG/etc/cron.weekly/
+install -m 0755 $CWD/sa-update.sh $PKG/etc/cron.weekly/
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/spamassassin-db.sql > $PKG/usr/doc/$PRGNAM-$VERSION/spamassassin-db.sql
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -115,4 +124,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/spamassassin/spamassassin.info b/network/spamassassin/spamassassin.info
index 5db5de641a..a8c0d92e34 100644
--- a/network/spamassassin/spamassassin.info
+++ b/network/spamassassin/spamassassin.info
@@ -1,8 +1,10 @@
PRGNAM="spamassassin"
-VERSION="3.2.5"
+VERSION="3.3.0"
HOMEPAGE="http://spamassassin.apache.org/"
-DOWNLOAD="http://mirror.tomato.it/apache/spamassassin/source/Mail-SpamAssassin-3.2.5.tar.bz2"
-MD5SUM="695f9107b240383e48df8938f2de334e"
+DOWNLOAD="http://mirror.tomato.it/apache/spamassassin/source/Mail-SpamAssassin-3.3.0.tar.bz2"
+MD5SUM="15af629a95108bf245ab600d78ae754b"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
MAINTAINER="LukenShiro"
EMAIL="lukenshiro@ngi.it"
-APPROVED="David Somero"
+APPROVED="dsomero"