about summary refs log tree commit homepage
path: root/sa_config
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-01-09 23:13:37 +0000
committerEric Wong <e@80x24.org>2014-01-09 22:37:54 +0000
commit3e96cf129ba5fc2834b691314c504aa363fd5cf4 (patch)
treedd5c42532049bc5dd2a420126edb9f07e9a5b9a0 /sa_config
downloadpublic-inbox-3e96cf129ba5fc2834b691314c504aa363fd5cf4.tar.gz
Diffstat (limited to 'sa_config')
-rw-r--r--sa_config/Makefile17
-rw-r--r--sa_config/README19
-rw-r--r--sa_config/root/etc/spamassassin/public-inbox.pre9
-rw-r--r--sa_config/user/.spamassassin/user_prefs26
4 files changed, 71 insertions, 0 deletions
diff --git a/sa_config/Makefile b/sa_config/Makefile
new file mode 100644
index 00000000..a90c857f
--- /dev/null
+++ b/sa_config/Makefile
@@ -0,0 +1,17 @@
+INSTALL = install
+all::
+        @cat README
+
+ROOT_FILES = etc/spamassassin/public-inbox.pre
+install-root:
+        @mkdir -p /etc/spamassassin
+        for f in $(ROOT_FILES); do $(INSTALL) -m 0644 root/$$f /$$f; done
+diff-root:
+        for f in $(ROOT_FILES); do diff -u root/$$f /$$f; done
+
+USER_FILES = .spamassassin/user_prefs
+install-user:
+        @mkdir -p ~/.spamassassin/
+        for f in $(USER_FILES); do $(INSTALL) -m 0644 user/$$f ~/$$f; done
+diff-user:
+        for f in $(USER_FILES); do diff -u user/$$f ~/$$f; done
diff --git a/sa_config/README b/sa_config/README
new file mode 100644
index 00000000..6703c38f
--- /dev/null
+++ b/sa_config/README
@@ -0,0 +1,19 @@
+SpamAssassin configs for public-inbox.org
+-----------------------------------------
+
+root/ - files for system-wide use (plugins, rule definitions,
+        new rules should have a zero score which should be overridden)
+user/ - per-user config (keep as much in here as possible)
+        These files go into the users home directory
+
+All files in these example directory are CC0:
+To the extent possible under law, Eric Wong has waived all copyright and
+related or neighboring rights to these examples.
+
+Make targets
+------------
+
+        install-root - install system-wide files
+                       (run as root)
+        install-user - install user-specific files
+                       (run as the user public-inbox runs as)
diff --git a/sa_config/root/etc/spamassassin/public-inbox.pre b/sa_config/root/etc/spamassassin/public-inbox.pre
new file mode 100644
index 00000000..161e2109
--- /dev/null
+++ b/sa_config/root/etc/spamassassin/public-inbox.pre
@@ -0,0 +1,9 @@
+# public-inbox.org uses the Debian spamd installation + init and sets
+# CRON=1 in /etc/default/spamassassin for automatic rule updates
+
+# compile rules to C, sa-compile(1) must be run as the appropriate user
+# (debian-spamd on Debian).  sa-compile(1) will also be run by the cronjob
+loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody
+
+# for ok_languages in user_prefs
+loadplugin Mail::SpamAssassin::Plugin::TextCat
diff --git a/sa_config/user/.spamassassin/user_prefs b/sa_config/user/.spamassassin/user_prefs
new file mode 100644
index 00000000..9919b98e
--- /dev/null
+++ b/sa_config/user/.spamassassin/user_prefs
@@ -0,0 +1,26 @@
+# raise or lower as needed
+required_score 5.0
+
+# do not mess with the original message body, only notify in headers
+clear_report_template
+clear_unsafe_report_template
+report_safe 0
+
+# we do not use nor support this on NFS
+lock_method flock
+
+# do not throw off Bayes
+bayes_ignore_header X-Bogosity
+bayes_ignore_header X-Spam-Flag
+bayes_ignore_header X-Spam-Status
+bayes_ignore_header X-Spam-Report
+
+# English-only for all lists on public-inbox.org
+ok_locales en
+# we have "loadplugin Mail::SpamAssassin::Plugin::TextCat" in a *.pre file
+ok_languages en
+
+# uncomment the following for importing archives:
+# dns_available no
+# skip_rbl_checks 1
+# skip_uribl_checks 1