summaryrefslogtreecommitdiff
path: root/mail/spamassassin/files
diff options
context:
space:
mode:
Diffstat (limited to 'mail/spamassassin/files')
-rw-r--r--mail/spamassassin/files/patch-sa-learn.raw27
-rw-r--r--mail/spamassassin/files/pkg-message.in22
-rw-r--r--mail/spamassassin/files/sa-spamd.in39
3 files changed, 88 insertions, 0 deletions
diff --git a/mail/spamassassin/files/patch-sa-learn.raw b/mail/spamassassin/files/patch-sa-learn.raw
new file mode 100644
index 000000000000..635cc317adc9
--- /dev/null
+++ b/mail/spamassassin/files/patch-sa-learn.raw
@@ -0,0 +1,27 @@
+--- sa-learn.raw.orig Wed Aug 8 06:19:47 2007
++++ sa-learn.raw Mon Aug 20 19:05:06 2007
+@@ -101,6 +101,7 @@ GetOptions(
+ 'local|L' => \$opt{'local'},
+ 'no-sync|nosync' => \$opt{'nosync'},
+ 'showdots' => \$opt{'showdots'},
++ 'quiet|q' => \$opt{'quiet'},
+ 'progress' => \$opt{'progress'},
+ 'use-ignores' => \$opt{'use-ignores'},
+ 'no-rebuild|norebuild' => sub { $opt{'nosync'} = 1; warn "The --no-rebuild option has been deprecated. Please use --no-sync instead.\n" },
+@@ -433,7 +434,7 @@ eval {
+ $progress->final() if ($opt{progress} && $progress);
+
+ my $phrase = defined $forget ? "Forgot" : "Learned";
+- print "$phrase tokens from $learnedcount message(s) ($messagecount message(s) examined)\n";
++ print "$phrase tokens from $learnedcount message(s) ($messagecount message(s) examined)\n" if (!$opt{quiet});
+
+ # If we needed to make a tempfile, go delete it.
+ if ( defined $tempfile ) {
+@@ -601,6 +602,7 @@ Options:
+ (default: /etc/mail/spamassassin)
+ --cf='config line' Additional line of configuration
+ -D, --debug [area=n,...] Print debugging messages
++ -q, --quiet Reduce amount of information printed out
+ -V, --version Print version
+ -h, --help Print usage message
+
diff --git a/mail/spamassassin/files/pkg-message.in b/mail/spamassassin/files/pkg-message.in
new file mode 100644
index 000000000000..511f6688edf2
--- /dev/null
+++ b/mail/spamassassin/files/pkg-message.in
@@ -0,0 +1,22 @@
+==========================================================================
+
+You should complete the following post-installation tasks:
+
+ 1) Read %%DOCSDIR%%/INSTALL
+ and %%DOCSDIR%%/UPGRADE
+ BEFORE enabling SpamAssassin for important changes
+
+ 2) Edit the configuration in %%ETCDIR%%,
+ in particular %%ETCDIR%%/init.pre
+ You may get lots of annoying (but harmless) error messages
+ if you skip this step.
+
+ 3) To run spamd, add the following to /etc/rc.conf:
+ spamd_enable="YES"
+
+SECURITY NOTE:
+Unless you deselected the default AS_ROOT, spamd will be running
+as root. If you wish to change this, add the following to /etc/rc.conf:
+spamd_flags="-u spamd -H /var/spool/spamd"
+
+==========================================================================
diff --git a/mail/spamassassin/files/sa-spamd.in b/mail/spamassassin/files/sa-spamd.in
new file mode 100644
index 000000000000..fb2301c3a1da
--- /dev/null
+++ b/mail/spamassassin/files/sa-spamd.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: spamd
+# REQUIRE: LOGIN
+# BEFORE: mail
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable spamd:
+#
+# spamd_enable="YES"
+#
+# You can pass flags to spamd with spamd_flags="..."
+# To change the user that spamd runs as, use
+#
+# spamd_flags="-u USER [-H /path/to/home... we suggest /var/spool/spamd]"
+#
+
+. /etc/rc.subr
+
+name=spamd
+rcvar=${name}_enable
+
+extra_commands="reload"
+load_rc_config $name
+
+# Set defaults
+: ${spamd_enable:="NO"}
+: ${spamd_flags="-c %%SQL_FLAG%% %%RUN_AS_USER%%"}
+
+pidfile=${spamd_pidfile:-"/var/run/${name}/${name}.pid"}
+command=%%PREFIX%%/bin/${name}
+command_args="-d -r ${pidfile}"
+required_dirs=%%PREFIX%%/share/spamassassin
+
+run_rc_command "$1"