[NBLUG/talk] Server-side spam filtering?
Lincoln Peters
sampln at sbcglobal.net
Sat Jul 22 14:59:15 PDT 2006
I've set up my computer to download e-mail from my SBC account to a maildir
folder (using getmail--a program that's similar to fetchmail but supports
maildir). I can then access my e-mail using IMAP (running Dovecot), either
on the local system or on my laptop. It seems to work fine except for spam
filtering--the mail applications on both computers offer spam-filtering, but
I don't think I'll get consistent results unless I can do spam-filtering on
the server side.
Thus far, I've been able to configure getmail to pipe incoming mail through
SpamAssassin, so that incoming messages get the appropriate "Spam" headers
(and in the case of actual spam, the summary). What I haven't figured out is
how to make it deliver spam to my "junk" folder instead of my inbox (right
now I've set up KMail to run the "Spam handling" filter on the inbox but not
the SpamAssassin check--at least for now it's keeping my inbox clean!).
Any suggestions? Here's the code to my getmailrc file (edited where necessary
for security reasons):
[retriever]
type = SimplePOP3Retriever
server = pop.sbcglobal.yahoo.com
username = sampln at sbcglobal.net
password = [CENSORED]
timeout = 60
[destination]
type = Maildir
path = ~/Maildir/
[filter-spam]
type = Filter_external
path = /usr/bin/spamassassin
[options]
verbose = 0
delete = true
P.S. I don't think that I have any problems on this part, but in case
anyone's interested, I use a home-brewed shell script to run getmail, and the
script is called by cron every minute. Why use a shell script as a wrapper
for getmail? Because I need to ensure that getmail does not get started when
it's already running (that seems to lead to duplicate messages appearing in
my inbox).
The shell script is:
#!/bin/sh
if [ -e /tmp/checkmail.lock ]
then
exit
fi
touch /tmp/checkmail.lock
getmail
rm /tmp/checkmail.lock
--
Lincoln Peters <sampln at sbcglobal.net>
Subtlety is the art of saying what you think and getting out of the way
before it is understood.
More information about the talk
mailing list