aboutsummaryrefslogtreecommitdiff
path: root/mail/dspam/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-07-04 11:58:16 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-07-04 11:58:16 +0000
commita6f3cddb60ccd344cbc350eea6c1e06362ac4458 (patch)
treea480d5c8d79828f4c3e3ac047bc83d9df687be65 /mail/dspam/files
parent0c0723324cd6ccea330ac996382068f97e2525f3 (diff)
downloadports-a6f3cddb60ccd344cbc350eea6c1e06362ac4458.tar.gz
ports-a6f3cddb60ccd344cbc350eea6c1e06362ac4458.zip
Notes
Diffstat (limited to 'mail/dspam/files')
-rw-r--r--mail/dspam/files/README.cgi56
-rw-r--r--mail/dspam/files/convert2db.sql16
-rw-r--r--mail/dspam/files/modify2db.sql12
-rw-r--r--mail/dspam/files/patch-configure6
-rw-r--r--mail/dspam/files/patch-dspam.c17
-rw-r--r--mail/dspam/files/pgsql.data5
-rw-r--r--mail/dspam/files/sync_db.sql3
7 files changed, 95 insertions, 20 deletions
diff --git a/mail/dspam/files/README.cgi b/mail/dspam/files/README.cgi
new file mode 100644
index 000000000000..b30a5c731821
--- /dev/null
+++ b/mail/dspam/files/README.cgi
@@ -0,0 +1,56 @@
+DSPAM CGI
+
+ The CGI will need to function in the same group as the dspam agent. The
+ best way to do this is to create a separate virtualhost specifically for
+ the CGI and assign it to run in the MTA group. If you are using
+ procmail, additional configuration may also be necessary (see below).
+ Please note that Apache users running under suexec do NOT take on the
+ identity of the groups specified in /etc/group; e.g. you will need to
+ specifically assign the group in httpd.conf.
+
+ NOTE: Because the DSPAM CGI is a script, DSPAM will not retain its
+ privileges when called. If you are running procmail, this will become
+ a problem as procmail requires root privileges to deliver. The easiest
+ hack around this is to create a procmail.dspam binary and make it
+ setuid root, then make it executable only by the mail group (or
+ whatever group DSPAM and the CGI run in).
+
+ The DSPAM CGI has a minimal configuration inside the dspam.cgi file. You'll
+ want to check dspam.cgi and make sure all of the settings are correct. In
+ most cases, the only that will be necessary to change are the large-scale
+ or domain-scale flags.
+
+ Once you've configured the CGI, there are two more things you'll want to do.
+
+ 1. Edit templates/nav_performance.html
+ Change yourdomain to whatever your domain name is.
+
+ 2. Make any changes to default.prefs. This will set the default preferences
+ for a user. The file should reflect your system wide defaults. An example
+ is provided in the cgi directory...
+
+trainingMode=TEFT
+spamAction=quarantine
+spamSubject=[SPAM]
+enableBNR=on
+enableWhitelist=on
+
+ By default, the parameters specified on the commandline will be used. If,
+ however, a preference is found for the particular user those preferences
+ will override the commandline. As a result, you'll want to remove any
+ options from the CGI that you don't want users to set (possibly
+ training mode).
+
+ If you plan on leaving DSPAM's logging function enabled, and would like to
+ produce pretty graphs for your users, the graph.cgi script requires the
+ following be installed on your machine:
+
+ - GD Graphics Library (http://www.boutell.com/gd/)
+ - The following PERL modules:
+ (http://www.perl.com/CPAN/modules/by-module/GD/)
+
+ . GD
+ . GD-Graph3d
+ . GDGraph
+ . GDTextUtil
+
diff --git a/mail/dspam/files/convert2db.sql b/mail/dspam/files/convert2db.sql
new file mode 100644
index 000000000000..489965907a7c
--- /dev/null
+++ b/mail/dspam/files/convert2db.sql
@@ -0,0 +1,16 @@
+alter table dspam_stats add spam_learned int;
+alter table dspam_stats add innocent_learned int;
+alter table dspam_stats add spam_classified int;
+alter table dspam_stats add innocent_classified int;
+update dspam_stats set spam_learned = total_spam;
+update dspam_stats set innocent_learned = total_innocent;
+update dspam_stats set spam_classified = 0, innocent_classified = 0;
+alter table dspam_stats drop column total_spam;
+alter table dspam_stats drop column total_innocent;
+alter table dspam_stats add spam_misclassified int;
+alter table dspam_stats add innocent_misclassified int;
+update dspam_stats set spam_misclassified = spam_misses;
+update dspam_stats set innocent_misclassified = false_positives;
+alter table dspam_stats drop column spam_misses;
+alter table dspam_stats drop column false_positives;
+
diff --git a/mail/dspam/files/modify2db.sql b/mail/dspam/files/modify2db.sql
new file mode 100644
index 000000000000..d387b5c7ddf6
--- /dev/null
+++ b/mail/dspam/files/modify2db.sql
@@ -0,0 +1,12 @@
+alter table dspam_stats add spam_learned int;
+alter table dspam_stats add innocent_learned int;
+alter table dspam_stats add spam_classified int;
+alter table dspam_stats add innocent_classified int;
+update dspam_stats set spam_learned = total_spam;
+update dspam_stats set innocent_learned = total_innocent;
+update dspam_stats set spam_classified = 0, innocent_classified = 0;
+alter table dspam_stats add spam_misclassified int;
+alter table dspam_stats add innocent_misclassified int;
+update dspam_stats set spam_misclassified = spam_misses;
+update dspam_stats set innocent_misclassified = false_positives;
+
diff --git a/mail/dspam/files/patch-configure b/mail/dspam/files/patch-configure
index cb3208b2c46a..7cb007066691 100644
--- a/mail/dspam/files/patch-configure
+++ b/mail/dspam/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Wed Nov 26 14:35:34 2003
-+++ configure Thu Dec 11 14:00:18 2003
-@@ -7548,7 +7548,8 @@
+--- configure.orig Sat Jul 3 14:18:37 2004
++++ configure Sat Jul 3 14:18:57 2004
+@@ -19272,7 +19272,8 @@
# This can be used to rebuild libtool when needed
diff --git a/mail/dspam/files/patch-dspam.c b/mail/dspam/files/patch-dspam.c
deleted file mode 100644
index 8bfb29d8adc2..000000000000
--- a/mail/dspam/files/patch-dspam.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- dspam.c.orig Fri Apr 2 18:34:35 2004
-+++ dspam.c Mon Apr 26 23:59:03 2004
-@@ -2422,12 +2422,12 @@
- i++;
- }
- }
-- arg = strsep (&margs, " ");
--
-+
- if (arg != NULL) {
- strlcat (args, a, sizeof(args));
- strlcat (args, " ", sizeof (args));
- }
-+ arg = strsep (&margs, " ");
- }
- free (mmargs);
-
diff --git a/mail/dspam/files/pgsql.data b/mail/dspam/files/pgsql.data
new file mode 100644
index 000000000000..bb564dca581b
--- /dev/null
+++ b/mail/dspam/files/pgsql.data
@@ -0,0 +1,5 @@
+/tmp
+
+username
+password
+dspam_database
diff --git a/mail/dspam/files/sync_db.sql b/mail/dspam/files/sync_db.sql
new file mode 100644
index 000000000000..5c82303510e4
--- /dev/null
+++ b/mail/dspam/files/sync_db.sql
@@ -0,0 +1,3 @@
+
+update dspam_stats set spam_misclassified = spam_misses;
+update dspam_stats set innocent_misclassified = false_positives;