From b909aca79083fbcc01da44e7f2dd4e954e55fe98 Mon Sep 17 00:00:00 2001 From: Ryan Haggerty Date: Wed, 2 Nov 2005 20:36:13 +0000 Subject: [PATCH] adding configuration for spamassassin. --- testing/spamassassin/.forward | 1 + testing/spamassassin/.procmailrc | 40 ++++++++++++++++++++++++++++++++ testing/spamassassin/README | 13 +++++++++++ 3 files changed, 54 insertions(+) create mode 100644 testing/spamassassin/.forward create mode 100644 testing/spamassassin/.procmailrc create mode 100644 testing/spamassassin/README diff --git a/testing/spamassassin/.forward b/testing/spamassassin/.forward new file mode 100644 index 00000000..515bbf89 --- /dev/null +++ b/testing/spamassassin/.forward @@ -0,0 +1 @@ +"|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #foo" diff --git a/testing/spamassassin/.procmailrc b/testing/spamassassin/.procmailrc new file mode 100644 index 00000000..bdb92890 --- /dev/null +++ b/testing/spamassassin/.procmailrc @@ -0,0 +1,40 @@ +# SpamAssassin sample procmailrc +# +# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc' +# if you use the spamc/spamd combination) +# +# The condition line ensures that only messages smaller than 250 kB +# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam +# isn't bigger than a few k and working with big messages can bring +# SpamAssassin to its knees. +# +# The lock file ensures that only 1 spamassassin invocation happens +# at 1 time, to keep the load down. +# +:0fw: spamassassin.lock +* < 256000 +| spamassassin + +# Mails with a score of 15 or higher are almost certainly spam (with 0.05% +# false positives according to rules/STATISTICS.txt). Let's put them in a +# different mbox. (This one is optional.) +:0: +* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +almost-certainly-spam + +# All mail tagged as spam (eg. with a score higher than the set threshold) +# is moved to "probably-spam". +:0: +* ^X-Spam-Status: Yes +probably-spam + +# Work around procmail bug: any output on stderr will cause the "F" in "From" +# to be dropped. This will re-add it. +:0 +* ^^rom[ ] +{ + LOG="*** Dropped F off From_ header! Fixing up. " + + :0 fhw + | sed -e '1s/^/F/' +} diff --git a/testing/spamassassin/README b/testing/spamassassin/README new file mode 100644 index 00000000..df51d51c --- /dev/null +++ b/testing/spamassassin/README @@ -0,0 +1,13 @@ +this set up is a per user set up + +put .forward and .procmailrc in the root of a users home directory. + +in .forward change foo to the user you want to test (or just make a user called foo) + +apprently this will initilize the the Bayes Database + sa-learn --sync + +send the user some mail, it should get put through procmail and spamassassin. + +send this as the body of a message, it should always be detected as spam and not reach the user. + XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X