summaryrefslogtreecommitdiff
path: root/spamassassin/default
diff options
context:
space:
mode:
authorroot <root@jones.dk>2016-10-24 23:23:23 +0200
committerroot <root@jones.dk>2016-10-24 23:23:23 +0200
commit22487bc56bef63ccd5c8d4ba187407f429314078 (patch)
treee3fe113d652d2f6176c9c1deb5e19f52e41e846d /spamassassin/default
parent90975750681e7c72dc45f8eb0dc08643b71c8bdf (diff)
Add SpamAssassin-related tweaks.
Diffstat (limited to 'spamassassin/default')
-rw-r--r--spamassassin/default/spamass-milter31
-rw-r--r--spamassassin/default/spamass-milter.diff23
-rw-r--r--spamassassin/default/spamassassin34
-rw-r--r--spamassassin/default/spamassassin.diff17
4 files changed, 105 insertions, 0 deletions
diff --git a/spamassassin/default/spamass-milter b/spamassassin/default/spamass-milter
new file mode 100644
index 0000000..aacf2de
--- /dev/null
+++ b/spamassassin/default/spamass-milter
@@ -0,0 +1,31 @@
+# spamass-milt startup defaults
+
+# OPTIONS are passed directly to spamass-milter.
+# man spamass-milter for details
+
+# Non-standard configuration notes:
+# See README.Debian if you use the -x option with sendmail
+# You should not pass the -d option in OPTIONS; use SOCKET for that.
+
+# Default, use the spamass-milter user as the default user, ignore
+# messages from localhost
+OPTIONS="-u spamass-milter"
+
+# Reject emails with spamassassin scores > 10.
+OPTIONS="${OPTIONS} -r 10"
+
+# Do not modify Subject:, Content-Type: or body.
+#OPTIONS="${OPTIONS} -m"
+
+# Use UNIX socket
+OPTIONS="${OPTIONS} -- --socket=/var/run/spamassassin/spamd.sock"
+
+######################################
+# If /usr/sbin/postfix is executable, the following are set by
+# default. You can override them by uncommenting and changing them
+# here.
+######################################
+# SOCKET="/var/spool/postfix/spamass/spamass.sock"
+# SOCKETOWNER="postfix:postfix"
+# SOCKETMODE="0660"
+######################################
diff --git a/spamassassin/default/spamass-milter.diff b/spamassassin/default/spamass-milter.diff
new file mode 100644
index 0000000..aab7c18
--- /dev/null
+++ b/spamassassin/default/spamass-milter.diff
@@ -0,0 +1,23 @@
+--- spamass-milter.orig 2015-08-07 04:59:17.000000000 +0200
++++ spamass-milter 2016-10-24 22:36:41.000000000 +0200
+@@ -9,14 +9,17 @@
+
+ # Default, use the spamass-milter user as the default user, ignore
+ # messages from localhost
+-OPTIONS="-u spamass-milter -i 127.0.0.1"
++OPTIONS="-u spamass-milter"
+
+-# Reject emails with spamassassin scores > 15.
+-#OPTIONS="${OPTIONS} -r 15"
++# Reject emails with spamassassin scores > 10.
++OPTIONS="${OPTIONS} -r 10"
+
+ # Do not modify Subject:, Content-Type: or body.
+ #OPTIONS="${OPTIONS} -m"
+
++# Use UNIX socket
++OPTIONS="${OPTIONS} -- --socket=/var/run/spamassassin/spamd.sock"
++
+ ######################################
+ # If /usr/sbin/postfix is executable, the following are set by
+ # default. You can override them by uncommenting and changing them
diff --git a/spamassassin/default/spamassassin b/spamassassin/default/spamassassin
new file mode 100644
index 0000000..561380f
--- /dev/null
+++ b/spamassassin/default/spamassassin
@@ -0,0 +1,34 @@
+# /etc/default/spamassassin
+# Duncan Findlay
+
+# WARNING: please read README.spamd before using.
+# There may be security risks.
+
+# If you're using systemd (default for jessie), the ENABLED setting is
+# not used. Instead, enable spamd by issuing:
+# systemctl enable spamassassin.service
+# Change to "1" to enable spamd on systems using sysvinit:
+ENABLED=0
+
+# Options
+# See man spamd for possible options. The -d option is automatically added.
+
+# SpamAssassin uses a preforking model, so be careful! You need to
+# make sure --max-children is not set to anything higher than 5,
+# unless you know what you're doing.
+
+OPTIONS="--create-prefs --max-children 5 --helper-home-dir -u debian-spamd -g debian-spamd --nouser-config --listen /var/run/spamassassin/spamd.sock --socketowner debian-spamd --socketgroup debian-spamd --socketmode 0660"
+
+# Pid file
+# Where should spamd write its PID to file? If you use the -u or
+# --username option above, this needs to be writable by that user.
+# Otherwise, the init script will not be able to shut spamd down.
+PIDFILE="/var/run/spamd.pid"
+
+# Set nice level of spamd
+#NICE="--nicelevel 15"
+
+# Cronjob
+# Set to anything but 0 to enable the cron job to automatically update
+# spamassassin's rules on a nightly basis
+CRON=1
diff --git a/spamassassin/default/spamassassin.diff b/spamassassin/default/spamassassin.diff
new file mode 100644
index 0000000..960310e
--- /dev/null
+++ b/spamassassin/default/spamassassin.diff
@@ -0,0 +1,17 @@
+--- spamassassin.orig 2014-10-14 06:21:29.000000000 +0200
++++ spamassassin 2016-10-24 21:10:39.000000000 +0200
+@@ -17,7 +17,7 @@
+ # make sure --max-children is not set to anything higher than 5,
+ # unless you know what you're doing.
+
+-OPTIONS="--create-prefs --max-children 5 --helper-home-dir"
++OPTIONS="--create-prefs --max-children 5 --helper-home-dir -u debian-spamd -g debian-spamd --nouser-config --listen /var/run/spamassassin/spamd.sock --socketowner debian-spamd --socketgroup debian-spamd --socketmode 0660"
+
+ # Pid file
+ # Where should spamd write its PID to file? If you use the -u or
+@@ -31,4 +31,4 @@
+ # Cronjob
+ # Set to anything but 0 to enable the cron job to automatically update
+ # spamassassin's rules on a nightly basis
+-CRON=0
++CRON=1