summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authoradrianp <adrianp>2005-10-20 08:33:13 +0000
committeradrianp <adrianp>2005-10-20 08:33:13 +0000
commit75bdb1533968c519870d38ac60b411658573be70 (patch)
treea0badf8dce05ff857d57315b9fad1c3a2fe3e0ef /mail
parent256b07ae1167eaf01375948d87dd8ba36e305f28 (diff)
downloadpkgsrc-75bdb1533968c519870d38ac60b411658573be70.tar.gz
Update to dspam 3.60
ok'ed xtraeme@ From the RELEASE file: Automatic Whitelisting Improvements Dynamically Loadable Storage Driver Support PostgreSQL Performance Enhancements LDAP Verification Unified Spam Alias / UID in Signature Support Domain Based Delivery Hosts Integrated Clam A/V Support Markovian Discrimination Self-Contained Hash Driver Fallback Domain-Based User Support Improved, Unified Logging Activity logging has also been improved Plused Detail Support Message Fragments Support Domain Blocklisting Support User preferences made case-insensitive LMTP error codes now include messages from relay host RBLInoculate option allows RBL'd emails to be quarantined or learned as spam MySQL and PgSQL object creation scripts updated to improve performance Added 'date' to quarantine display and sorted most recent at top Significant code cleanup and audit Domain-based groups changed from @domain.tld to *@domain.tld X-DSPAM-Result expanded to support Virus, Blacklisted, and Blocklisted results DSPAM WebUI now supports history paging Rewritten documentation for ease of installation
Diffstat (limited to 'mail')
-rw-r--r--mail/dspam/Makefile63
-rw-r--r--mail/dspam/PLIST52
-rw-r--r--mail/dspam/distinfo13
-rw-r--r--mail/dspam/files/dspam.sh9
-rw-r--r--mail/dspam/options.mk79
-rw-r--r--mail/dspam/patches/patch-aa10
-rw-r--r--mail/dspam/patches/patch-ab13
-rw-r--r--mail/dspam/patches/patch-ac15
-rw-r--r--mail/dspam/patches/patch-ad61
9 files changed, 209 insertions, 106 deletions
diff --git a/mail/dspam/Makefile b/mail/dspam/Makefile
index 2dd67dbb936..2a7cf09eca1 100644
--- a/mail/dspam/Makefile
+++ b/mail/dspam/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.38 2005/08/10 20:56:19 jlam Exp $
+# $NetBSD: Makefile,v 1.39 2005/10/20 08:33:13 adrianp Exp $
-DISTNAME= dspam-3.4.9
+DISTNAME= dspam-3.6.0
CATEGORIES= mail
MASTER_SITES= http://www.nuclearelephant.com/projects/dspam/sources/
@@ -14,27 +14,23 @@ USE_LIBTOOL= yes
USE_TOOLS+= perl:run pkg-config
REPLACE_PERL= tools/dspam_genaliases.in \
tools/dspam_corpus.in \
- cgi/*.cgi cgi/configure.pl.in
+ webui/cgi-bin/*.cgi webui/cgi-bin/configure.pl.in
-PKGCONFIG_OVERRIDE+= dspam.pc.in
+PKGCONFIG_OVERRIDE+= src/dspam.pc.in
-SUBST_CLASSES+= cgi cgi2
+SUBST_CLASSES+= cgi
SUBST_STAGE.cgi= post-patch
-SUBST_FILES.cgi= cgi/dspam.cgi cgi/admin.cgi \
- cgi/templates/nav_performance.html \
- cgi/configure.pl.in
-SUBST_SED.cgi= -e "s|/usr/local/bin/dspam|${PREFIX}/bin/dspam|g" \
- -e "s|/var/dspam|${DSPAM_HOME}|g" \
- -e "s|/usr/local|${PREFIX}|g" \
- -e "s|-deaf|${DSPAM_PSFLAGS}|g" \
- -e "s|yourdomain.com|${DSPAM_DOMAIN}|g"
+SUBST_FILES.cgi= webui/cgi-bin/templates/nav_performance.html \
+ webui/cgi-bin/configure.pl.in \
+ webui/cgi-bin/dspam.cgi webui/cgi-bin/admin.cgi \
+ webui/cgi-bin/graph.cgi webui/cgi-bin/admingraph.cgi
+SUBST_SED.cgi= -e "s|auxw|${DSPAM_PSFLAGS}|g" \
+ -e "s|yourdomain.com|${DSPAM_DOMAIN}|g" \
+ -e "s|./admins|${PKG_SYSCONFDIR}/cgi-admins|" \
+ -e "s|configure.pl|${PKG_SYSCONFDIR}/configure.pl|" \
+ -e "s|\"\/\";|\"${DSPAM_WWWHOME}\";|" \
+ -e "s|\$$FILE = \"./default.prefs\";|\$$FILE = \"${PKG_SYSCONFDIR}/cgi-default.prefs\";|"
SUBST_MESSAGE.cgi= "Fixing paths and default options."
-SUBST_STAGE.cgi2= post-patch
-SUBST_FILES.cgi2= cgi/dspam.cgi cgi/admin.cgi cgi/admingraph.cgi \
- cgi/graph.cgi
-SUBST_SED.cgi2= -e "s|./admins|${PKG_SYSCONFDIR}/cgi-admins|" \
- -e "s|\$$FILE = \"./default.prefs\";|\$$FILE = \"${PKG_SYSCONFDIR}/cgi-default.prefs\";|" \
- -e "s|configure.pl|${PKG_SYSCONFDIR}/configure.pl|"
BUILD_DEFS+= DSPAM_HOME
BUILD_DEFS+= DSPAM_SIGNATURE_LIFE
@@ -42,6 +38,7 @@ BUILD_DEFS+= DSPAM_USER DSPAM_GROUP
BUILD_DEFS+= DSPAM_BINMODE
BUILD_DEFS+= DSPAM_LOGDIR
BUILD_DEFS+= DSPAM_DOMAIN
+BUILD_DEFS+= DSPAM_WWWHOME
BUILD_DEFS+= DSPAM_PIDDIR
.include "../../mk/bsd.prefs.mk"
@@ -54,6 +51,7 @@ DSPAM_USER?= dspam
DSPAM_GROUP?= dspam
DSPAM_LOGDIR?= ${DSPAM_HOME}/log
DSPAM_DOMAIN?= yourdomain.com
+DSPAM_WWWHOME?= /dspam
DSPAM_PIDDIR?= ${VARBASE}/run/dspam
CONFIGURE_ARGS+= --with-signature-life=${DSPAM_SIGNATURE_LIFE}
@@ -79,7 +77,7 @@ RCD_SCRIPTS= dspam
PKG_SYSCONFSUBDIR= dspam
CONF_FILES_PERMS= ${EGDIR}/dspam.conf ${PKG_SYSCONFDIR}/dspam.conf \
- ${BINOWN} ${DSPAM_GROUP} 0640
+ ${DSPAM_USER} ${DSPAM_GROUP} 0640
CONF_FILES_PERMS+= ${EGDIR}/cgi-admins ${PKG_SYSCONFDIR}/cgi-admins \
${APACHE_USER} ${APACHE_GROUP} 0640
CONF_FILES_PERMS+= ${EGDIR}/cgi-default.prefs \
@@ -94,7 +92,7 @@ SPECIAL_PERMS= ${PREFIX}/bin/dspam ${DSPAM_USER} ${DSPAM_GROUP} \
${DSPAM_BINMODE}
OWN_DIRS_PERMS= ${DSPAM_HOME} ${DSPAM_USER} ${APACHE_GROUP} 0775
OWN_DIRS_PERMS+= ${DSPAM_LOGDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0775
-OWN_DIRS_PERMS+= ${DSPAM_PIDDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0700
+OWN_DIRS_PERMS+= ${DSPAM_PIDDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0770
FILES_SUBST+= DSPAM_USER=${DSPAM_USER}
FILES_SUBST+= DSPAM_GROUP=${DSPAM_GROUP}
@@ -104,28 +102,35 @@ SUBST_CLASSES+= conf
SUBST_STAGE.conf= pre-install
SUBST_FILES.conf= src/dspam.conf.in
SUBST_SED.conf= -e "s,@dspam_home@,${DSPAM_HOME},g" \
- -e "s,@delivery_agent@,${DSPAM_DELIVERY_AGENT_BIN},g"
+ -e "s,@delivery_agent@,${DSPAM_DELIVERY_AGENT_BIN},g" \
+ -e "s|@PREFIX@|${PREFIX}|g" \
+ -e "s|@VARBASE@|${VARBASE}|g" \
+ -e "s|@DSPAM_PIDDIR@|${DSPAM_PIDDIR}|g"
SUBST_MESSAGE.conf= "Fixing configuration file."
post-install:
${INSTALL_DATA_DIR} ${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/RELEASE.NOTES ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/UPGRADING ${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCDIR}
${INSTALL_DATA_DIR} ${DATADIR}
${INSTALL_DATA_DIR} ${EGDIR}
${INSTALL_DATA} ${WRKSRC}/src/dspam.conf.in ${EGDIR}/dspam.conf
- ${INSTALL_DATA} ${WRKSRC}/cgi/admins ${EGDIR}/cgi-admins
- ${INSTALL_DATA} ${WRKSRC}/cgi/default.prefs ${EGDIR}/cgi-default.prefs
- ${INSTALL_DATA} ${WRKSRC}/cgi/configure.pl ${EGDIR}/configure.pl
-
-.for d in txt cgi
+ ${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/admins ${EGDIR}/cgi-admins
+ ${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/default.prefs \
+ ${EGDIR}/cgi-default.prefs
+ ${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/configure.pl \
+ ${EGDIR}/configure.pl
+ @${RM} ${WRKSRC}/webui/cgi-bin/dspam.cgi.orig
+
+.for d in txt webui/cgi-bin webui/htdocs
${INSTALL_DATA_DIR} ${DATADIR}/${d}
cd ${WRKSRC}/${d} && ${PAX} -rwppm '-s|.*/Makefile.*$$||' \
'-s|./admins.*$$||' '-s|./default.prefs.*$$||' \
'-s|./configure.pl.*$$||' . ${DATADIR}/${d}
.endfor
-.undef d
+
.for drv in mysql pgsql
. if !empty(DSPAM_STORAGE_DRIVER:M${drv})
${INSTALL_DATA_DIR} ${DATADIR}/${drv}
@@ -133,7 +138,7 @@ post-install:
${PAX} -rwppm '-s|.*/Makefile.*$$||' . ${DATADIR}/${drv}
. endif
.endfor
-.undef drv
+
.if !empty(DSPAM_STORAGE_DRIVER:Msqlite*)
${INSTALL_DATA_DIR} ${DATADIR}/sqlite
cd ${WRKSRC}/src/tools.sqlite_drv && \
diff --git a/mail/dspam/PLIST b/mail/dspam/PLIST
index ae678efe58d..10ac065d333 100644
--- a/mail/dspam/PLIST
+++ b/mail/dspam/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.9 2005/05/25 15:36:06 cube Exp $
+@comment $NetBSD: PLIST,v 1.10 2005/10/20 08:33:13 adrianp Exp $
bin/dspam
bin/dspam_2sql
bin/dspam_admin
@@ -22,6 +22,7 @@ include/dspam/libdspam.h
include/dspam/libdspam_objects.h
include/dspam/nodetree.h
include/dspam/storage_driver.h
+include/dspam/tokenizer.h
lib/libdspam.la
lib/pkgconfig/dspam.pc
man/man1/dspam.1
@@ -41,9 +42,10 @@ man/man3/dspam_process.3
man/man3/libdspam.3
share/doc/dspam/README
share/doc/dspam/RELEASE.NOTES
-share/doc/dspam/appliance.txt
+share/doc/dspam/UPGRADING
share/doc/dspam/courier.txt
share/doc/dspam/exim.txt
+share/doc/dspam/markov.txt
share/doc/dspam/mysql_drv.txt
share/doc/dspam/ora_drv.txt
share/doc/dspam/osx.txt
@@ -51,28 +53,28 @@ share/doc/dspam/pgsql_drv.txt
share/doc/dspam/pop3filter.txt
share/doc/dspam/postfix.txt
share/doc/dspam/qmail.txt
+share/doc/dspam/relay.txt
share/doc/dspam/sendmail.txt
share/doc/dspam/sqlite_drv.txt
-share/doc/dspam/win32.txt
-share/dspam/cgi/admin.cgi
-share/dspam/cgi/admingraph.cgi
-share/dspam/cgi/base.css
-share/dspam/cgi/dspam-logo-small.gif
-share/dspam/cgi/dspam.cgi
-share/dspam/cgi/graph.cgi
-share/dspam/cgi/rgb.txt
-share/dspam/cgi/templates/nav_admin_error.html
-share/dspam/cgi/templates/nav_admin_preferences.html
-share/dspam/cgi/templates/nav_admin_status.html
-share/dspam/cgi/templates/nav_admin_user.html
-share/dspam/cgi/templates/nav_alerts.html
-share/dspam/cgi/templates/nav_analysis.html
-share/dspam/cgi/templates/nav_error.html
-share/dspam/cgi/templates/nav_history.html
-share/dspam/cgi/templates/nav_performance.html
-share/dspam/cgi/templates/nav_preferences.html
-share/dspam/cgi/templates/nav_quarantine.html
-share/dspam/cgi/templates/nav_viewmessage.html
+share/dspam/webui/cgi-bin/admin.cgi
+share/dspam/webui/cgi-bin/admingraph.cgi
+share/dspam/webui/cgi-bin/dspam.cgi
+share/dspam/webui/cgi-bin/graph.cgi
+share/dspam/webui/cgi-bin/rgb.txt
+share/dspam/webui/cgi-bin/templates/nav_admin_error.html
+share/dspam/webui/cgi-bin/templates/nav_admin_preferences.html
+share/dspam/webui/cgi-bin/templates/nav_admin_status.html
+share/dspam/webui/cgi-bin/templates/nav_admin_user.html
+share/dspam/webui/cgi-bin/templates/nav_alerts.html
+share/dspam/webui/cgi-bin/templates/nav_analysis.html
+share/dspam/webui/cgi-bin/templates/nav_error.html
+share/dspam/webui/cgi-bin/templates/nav_history.html
+share/dspam/webui/cgi-bin/templates/nav_performance.html
+share/dspam/webui/cgi-bin/templates/nav_preferences.html
+share/dspam/webui/cgi-bin/templates/nav_quarantine.html
+share/dspam/webui/cgi-bin/templates/nav_viewmessage.html
+share/dspam/webui/htdocs/base.css
+share/dspam/webui/htdocs/dspam-logo-small.gif
${MYSQL}share/dspam/mysql/mysql_objects-4.1.sql
${MYSQL}share/dspam/mysql/mysql_objects-space.sql
${MYSQL}share/dspam/mysql/mysql_objects-speed.sql
@@ -98,8 +100,10 @@ share/examples/rc.d/dspam
${PGSQL}@dirrm share/dspam/pgsql
${MYSQL}@dirrm share/dspam/mysql
${SQLITE}@dirrm share/dspam/sqlite
-@dirrm share/dspam/cgi/templates
-@dirrm share/dspam/cgi
+@dirrm share/dspam/webui/cgi-bin/templates
+@dirrm share/dspam/webui/cgi-bin
+@dirrm share/dspam/webui/htdocs
+@dirrm share/dspam/webui
@dirrm share/dspam
@dirrm share/doc/dspam
@dirrm include/dspam
diff --git a/mail/dspam/distinfo b/mail/dspam/distinfo
index 3ca979fee8b..388bde8f5a0 100644
--- a/mail/dspam/distinfo
+++ b/mail/dspam/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.22 2005/08/24 01:44:07 jwise Exp $
+$NetBSD: distinfo,v 1.23 2005/10/20 08:33:13 adrianp Exp $
-SHA1 (dspam-3.4.9.tar.gz) = e697774e0f2eb4a9a363cf80257072219641f8e3
-RMD160 (dspam-3.4.9.tar.gz) = f4088017e3e5984101bba7d5e5e313d35076d469
-Size (dspam-3.4.9.tar.gz) = 701069 bytes
-SHA1 (patch-aa) = 15c6fc58dd0d91799f0c97554f4188cbe68dbd96
-SHA1 (patch-ab) = 96c77d23174f51cd8df46a91ff9d8c38cd98d8a7
+SHA1 (dspam-3.6.0.tar.gz) = 19c0064902544bde90d0302b5d657782a4f2cc8f
+RMD160 (dspam-3.6.0.tar.gz) = eb4b7ff0f260a12508b47d5141a9bf1a0cf49326
+Size (dspam-3.6.0.tar.gz) = 732042 bytes
+SHA1 (patch-aa) = 04e94e3da9de06c15863425d0a827858b5dd4a6c
+SHA1 (patch-ac) = 3367158c25a6f50467359e3a09936ad7b9bb0be0
+SHA1 (patch-ad) = ec80ac306fa6fcd62b4f531b11de773a7a28833f
diff --git a/mail/dspam/files/dspam.sh b/mail/dspam/files/dspam.sh
index 7f911b65e06..539dbce9f19 100644
--- a/mail/dspam/files/dspam.sh
+++ b/mail/dspam/files/dspam.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: dspam.sh,v 1.3 2005/10/12 20:22:55 xtraeme Exp $
+# $NetBSD: dspam.sh,v 1.4 2005/10/20 08:33:13 adrianp Exp $
#
# PROVIDE: dspam
@@ -24,8 +24,9 @@ dspam_precmd()
{
if [ ! -d @DSPAM_PIDDIR@ ]; then
@MKDIR@ @DSPAM_PIDDIR@
- @CHMOD@ 0700 @DSPAM_PIDDIR@
+ @CHMOD@ 0770 @DSPAM_PIDDIR@
@CHOWN@ @DSPAM_USER@ @DSPAM_PIDDIR@
+ @CHGRP@ @DSPAM_GROUP@ @DSPAM_PIDDIR@
fi
}
@@ -65,7 +66,3 @@ else
;;
esac
fi
-
-if checkyesno "${rcvar}" && [ "$1" != "stop" -o "$1" != "status" ]; then
- echo $(check_process $command) > $pidfile
-fi
diff --git a/mail/dspam/options.mk b/mail/dspam/options.mk
index 887e4ffd752..473a5a75bbd 100644
--- a/mail/dspam/options.mk
+++ b/mail/dspam/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.10 2005/05/25 15:36:06 cube Exp $
+# $NetBSD: options.mk,v 1.11 2005/10/20 08:33:13 adrianp Exp $
.if defined(DSPAM_DELIVERY_AGENT) && !empty(DSPAM_DELIVERY_AGENT:Mcustom)
DSPAM_DELIVERY_AGENT:= ${DSPAM_DELIVERY_AGENT_ARGS}
@@ -7,7 +7,7 @@ DSPAM_DELIVERY_AGENT:= ${DSPAM_DELIVERY_AGENT_ARGS}
PKG_OPTIONS_VAR= PKG_OPTIONS.dspam
PKG_SUPPORTED_OPTIONS= largescale homedir long-usernames graphs \
domainscale virtualusers preferences-extension \
- neural
+ neural clamav ldap debug verbose-debug
.include "../../mk/bsd.options.mk"
@@ -41,15 +41,19 @@ PKG_FAIL_REASON+= "${PKGBASE}: unknown delivery agent \`${DSPAM_DELIVERY_AGENT}'
### This is the backend database used to store the DSPAM signatures as
### well as other state information. The recommended storage driver is
### "mysql", even for small installations.
-### Possible: mysql, pgsql, bdb, sqlite or sqlite3
-### Default: sqlite
+### Possible: mysql, pgsql, bdb, sqlite, sqlite3 or hash
+### Default: hash
###
-DSPAM_STORAGE_DRIVER?= sqlite
+DSPAM_STORAGE_DRIVER?= hash
BUILD_DEFS+= DSPAM_STORAGE_DRIVER
.if empty(DSPAM_STORAGE_DRIVER:Mmysql) && empty(DSPAM_STORAGE_DRIVER:Mpgsql)
PKG_OPTIONS:= ${PKG_OPTIONS:Nvirtualusers}
+PKG_OPTIONS:= ${PKG_OPTIONS:Npreferences-extension}
+PKG_OPTIONS:= ${PKG_OPTIONS:Nldap}
.endif
-.if !empty(DSPAM_STORAGE_DRIVER:Mmysql)
+.if !empty(DSPAM_STORAGE_DRIVER:Mhash)
+CONFIGURE_ARGS+= --with-storage-driver=hash_drv
+.elif !empty(DSPAM_STORAGE_DRIVER:Mmysql)
. include "../../mk/mysql.buildlink3.mk"
CONFIGURE_ARGS+= --enable-mysql4-initialization
CONFIGURE_ARGS+= --with-storage-driver=mysql_drv
@@ -65,9 +69,7 @@ CONFIGURE_ARGS+= \
--with-pgsql-libraries=${PGSQL_PREFIX}/lib
PGSQL_PLIST_SUBST= PGSQL=
.elif !empty(DSPAM_STORAGE_DRIVER:Mbdb)
-BDB_ACCEPTED= db4 db3
-. include "../../mk/bdb.buildlink3.mk"
-CONFIGURE_ARGS+= --with-storage-driver=lib${BDB_TYPE}_drv
+PKG_FAIL_REASON+= "Berkeley DB3/4 is deprecated (not recommended). Please migrate to a different storage driver."
.elif !empty(DSPAM_STORAGE_DRIVER:Msqlite)
. include "../../databases/sqlite/buildlink3.mk"
CONFIGURE_ARGS+= --with-storage-driver=sqlite_drv
@@ -80,9 +82,10 @@ SQLITE_PLIST_SUBST+= SQLITE=
PKG_FAIL_REASON+= "${PKGBASE}: unknown storage driver \`${DSPAM_STORAGE_DRIVER}\'"
.endif
-# daemon mode only supports MySQL and PostgreSQL
+# daemon mode only supports MySQL, PostgreSQL or hash
.if !empty(DSPAM_STORAGE_DRIVER:Mmysql) || \
- !empty(DSPAM_STORAGE_DRIVER:Mpgsql)
+ !empty(DSPAM_STORAGE_DRIVER:Mpgsql) || \
+ !empty(DSPAM_STORAGE_DRIVER:Mhash)
CONFIGURE_ARGS+= --enable-daemon
.endif
@@ -95,14 +98,16 @@ PLIST_SUBST+= ${PGSQL_PLIST_SUBST}
PLIST_SUBST+= ${SQLITE_PLIST_SUBST}
###
-### Only available for mysql and pgsql backends.
+### The following are only available for mysql and pgsql backends.
###
.if !empty(DSPAM_STORAGE_DRIVER:Mmysql) || !empty(DSPAM_STORAGE_DRIVER:Mpgsql)
-PKG_SUPPORTED_OPTIONS+= preferences-extension virtualusers
+PKG_SUPPORTED_OPTIONS+= preferences-extension virtualusers ldap
.endif
-# Used to store user prefernces in the backend instead of flat files
-# (built-in method)
+###
+### Used to store user preferences in the backend instead of flat files
+### (built-in method).
+###
.if !empty(PKG_OPTIONS:Mpreferences-extension)
CONFIGURE_ARGS+= --enable-preferences-extension
.endif
@@ -116,6 +121,13 @@ CONFIGURE_ARGS+= --enable-virtual-users
.endif
###
+### Enable LDAP support via libldap
+###
+.if !empty(PKG_OPTIONS:Mldap)
+CONFIGURE_ARGS+= --enable-ldap
+.endif
+
+###
### Use of home directory dot file for opt-in/opt-out
###
.if !empty(PKG_OPTIONS:Mhomedir)
@@ -135,12 +147,6 @@ DEPENDS+= p5-GDGraph3d-[0-9]*:../../graphics/p5-GDGraph3d
###
.if !empty(PKG_OPTIONS:Mlargescale)
CONFIGURE_ARGS+= --enable-large-scale
-SUBST_CLASSES+= large
-SUBST_STAGE.large= pre-configure
-SUBST_FILES.large= cgi/dspam.cgi cgi/admin.cgi
-SUBST_SED.large= \
- -e "s|CONFIG{'LARGE_SCALE'}.*=.*0|CONFIG{'LARGE_SCALE'} = 1|"
-SUBST_MESSAGE.large= "Enabling large-scale option in DSPAM."
.endif
###
@@ -161,7 +167,7 @@ CONFIGURE_ARGS+= --enable-domain-scale
### EXPERIMENTAL:
### Support for neural networking, please take a look at the docs.
###
-.if !empty(DSPAM_STORAGE_DRIVER:Mmysql)
+.if !empty(DSPAM_STORAGE_DRIVER:Mmysql) || !empty(DSPAM_STORAGE_DRIVER:Mpgsql)
PKG_SUPPORTED_OPTIONS+= neural
. if !empty(PKG_OPTIONS:Mneural)
CONFIGURE_ARGS+= --enable-neural-networking
@@ -172,8 +178,35 @@ CONFIGURE_ARGS+= --enable-neural-networking
### These are the flags used when invoking ps(1) to list all processes.
###
BUILD_DEFS+= DSPAM_PSFLAGS
-.if ${OPSYS} == "Linux"
+.if ${OPSYS} == "Linux" || ${OPSYS} == "SunOS"
DSPAM_PSFLAGS?= -deaf
.else
DSPAM_PSFLAGS?= aux
.endif
+
+###
+### Enables support for Clam Antivirus. DSPAM can interface directly with
+### clamd to perform virus scanning and can be configured to react in
+### different ways to viruses.
+###
+.if !empty(PKG_OPTIONS:Mclamav)
+CONFIGURE_ARGS+= --enable-clamav
+.include "../../mail/clamav/buildlink3.mk
+.endif
+
+###
+### Enable debugging support for DSPAM.
+### Don't enable this unless something needs testing!
+###
+.if !empty(PKG_OPTIONS:Mdebug)
+CONFIGURE_ARGS+= --enable-debug
+.endif
+
+###
+### Cause DSPAM produce verbose debug output and write them into
+### LOGDIR/dspam.debug file. Implies '--enable-debug'.
+### Never enable this for production builds !
+###
+.if !empty(PKG_OPTIONS:Mverbose-debug)
+CONFIGURE_ARGS+= --enable-verbose-debug
+.endif
diff --git a/mail/dspam/patches/patch-aa b/mail/dspam/patches/patch-aa
index c55a1ba61c4..bed1d6e5fb0 100644
--- a/mail/dspam/patches/patch-aa
+++ b/mail/dspam/patches/patch-aa
@@ -1,13 +1,13 @@
-$NetBSD: patch-aa,v 1.3 2005/03/21 21:35:52 xtraeme Exp $
+$NetBSD: patch-aa,v 1.4 2005/10/20 08:33:13 adrianp Exp $
---- src/Makefile.in.orig 2005-02-17 15:16:55.000000000 +0100
-+++ src/Makefile.in 2005-02-17 15:17:01.000000000 +0100
-@@ -251,7 +251,7 @@
+--- src/Makefile.in.orig 2005-10-17 14:07:30.000000000 +0100
++++ src/Makefile.in
+@@ -373,7 +373,7 @@ DIST_SUBDIRS = . \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dspam.pc
etcdir = $(sysconfdir)
-etc_SCRIPTS = dspam_conf
+etc_SCRIPTS =
+ libversion = 7:0:0
# Defaults from dspam.conf
- EXTRA_DIST = example.c dspam-button.gif dspam.pc.in dspam-uninstalled.pc.in \
diff --git a/mail/dspam/patches/patch-ab b/mail/dspam/patches/patch-ab
deleted file mode 100644
index aabd91ff4a5..00000000000
--- a/mail/dspam/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/dspam.c.orig 2005-04-20 10:07:19.000000000 -0400
-+++ src/dspam.c 2005-04-28 10:49:13.000000000 -0400
-@@ -3094,6 +3094,10 @@
- DRIVER_CTX DTX;
- char *pidfile;
-
-+#ifdef __NetBSD__
-+ daemon(0, 0);
-+#endif
-+
- __daemon_run = 1;
- __num_threads = 0;
- __hup = 0;
diff --git a/mail/dspam/patches/patch-ac b/mail/dspam/patches/patch-ac
new file mode 100644
index 00000000000..7b4384c2c55
--- /dev/null
+++ b/mail/dspam/patches/patch-ac
@@ -0,0 +1,15 @@
+$NetBSD: patch-ac,v 1.1 2005/10/20 08:33:13 adrianp Exp $
+
+--- webui/cgi-bin/dspam.cgi.orig 2005-10-17 15:31:46.000000000 +0100
++++ webui/cgi-bin/dspam.cgi
+@@ -195,8 +195,8 @@ sub DisplayHistory {
+ }
+ close (LINES);
+
+- $end = $all_lines - (($history_site-1) * $CONFIG{'HISTORY_PER_SITE'});
+- $begin = $end - $CONFIG{'HISTORY_PER_SITE'} + 1 ;
++ $end = $all_lines - (($history_site-1) * $CONFIG{'HISTORY_PER_PAGE'});
++ $begin = $end - $CONFIG{'HISTORY_PER_PAGE'} + 1 ;
+
+ if ($begin < 0) {
+ $begin = 1;
diff --git a/mail/dspam/patches/patch-ad b/mail/dspam/patches/patch-ad
new file mode 100644
index 00000000000..620011e1aa6
--- /dev/null
+++ b/mail/dspam/patches/patch-ad
@@ -0,0 +1,61 @@
+$NetBSD: patch-ad,v 1.1 2005/10/20 08:33:13 adrianp Exp $
+
+--- src/dspam.conf.in.orig 2005-10-10 14:52:21.000000000 +0100
++++ src/dspam.conf.in
+@@ -24,7 +24,7 @@ Home @dspam_home@
+ # this option. If you do not wish to lose all of your data, you will need to
+ # migrate it to the new backend before making this change.
+ #
+-StorageDriver @libdir@/@storage_driver@
++#StorageDriver @libdir@/@storage_driver@
+
+ #
+ # Trusted Delivery Agent: Specifies the local delivery agent DSPAM should call
+@@ -53,7 +53,7 @@ TrustedDeliveryAgent "@delivery_agent@"
+ # the user DSPAM is processing mail for. This configuration parameter is only
+ # necessary if you plan on allowing untrusted processing.
+ #
+-#UntrustedDeliveryAgent "/usr/bin/procmail -d %u"
++#UntrustedDeliveryAgent "@PREFIX@/bin/procmail -d %u"
+
+ #
+ # SMTP or LMTP Delivery: Alternatively, you may wish to use SMTP or LMTP
+@@ -73,7 +73,7 @@ TrustedDeliveryAgent "@delivery_agent@"
+ # a quarantine agent which will be called with all messages DSPAM thinks is
+ # spam. Use %u to specify the user DSPAM is processing mail for.
+ #
+-#QuarantineAgent "/usr/bin/procmail -d spam"
++#QuarantineAgent "@PREFIX@/bin/procmail -d spam"
+
+ #
+ # DSPAM can optionally process "plused users" (addresses in the user+detail
+@@ -249,7 +249,7 @@ AllowOverride whitelistThreshold
+ # Storage driver settings: Specific to a particular storage driver. Uncomment
+ # the configuration specific to your installation, if applicable.
+ #
+-#MySQLServer /var/lib/mysql/mysql.sock
++#MySQLServer /tmp/mysql.sock
+ #MySQLPort
+ #MySQLUser dspam
+ #MySQLPass changeme
+@@ -590,9 +590,9 @@ Opt out
+ # specified. If you want the client machine to perform delivery, use
+ # the --stdout option in conjunction with a local setup.
+ #
+-#ServerPort 24
++#ServerPort 2400
+ #ServerQueueSize 32
+-#ServerPID /var/run/dspam.pid
++#ServerPID @DSPAM_PIDDIR@/dspam.pid
+
+ #
+ # ServerMode specifies the type of LMTP server to start. This can be one of:
+@@ -646,7 +646,7 @@ Opt out
+ # If you are a reporting streamlined blackhole list participant, you can
+ # touch ip addresses within the directory the rabl_client process is watching.
+ #
+-#RABLQueue /var/spool/rabl
++#RABLQueue @VARBASE@/spool/rabl
+
+ # DataSource: If you are using any type of data source that does not include
+ # email-like headers (such as documents), uncomment the line below. This