[SpamCop-List] Plugging my free filtering program
Peter Pearson
pxpearson at spamxcop.net
Tue Feb 21 09:49:37 EST 2006
spamcopfilter.py is a Python-language program that I wrote
to help manage my Spamcop mail account. It uses the IMAP
remote-mail-management protocol to ask Spamcop for the
headers of all the messages in my Held Mail folder, and then
instructs Spamcop to move the spammy-looking ones into a
"Spam for sure" folder. I have improved it to the point where
it is a significant advance over the filtering capabilities
built into a Spamcop mail account. I run it just before
viewing my Held Mail folder, and it reduces the number of
messages by about 80%, which greatly reduces the risk that
I'll overlook the occasional (extremely rare) non-spam
message that lands in Held Mail.
You can get spamcopfilter.py (for free, of course) from
http://webpages.charter.net/curryfans/peter/downloads.html
Good features:
- The code is written to be easily understood, and Python
is a very readable language.
- You can customize it for your needs with just a
text editor. (But you need a Python interpreter to run
it. Available free, for Windows, Mac, and Linux, at python.org.)
- Basic customization amounts to editing these lines:
my_name = "xxxxxxx at spamcop.net" # Put your Spamcop address here.
my_password = "???????" # Put your password here.
purgatory_name = "INBOX.Held Mail" # We look at messages from here,
hell_name = "INBOX.Spam for sure" # and move spam to here.
logfile = open( "/home/peter/spamlog.txt", "a" )
The Unix-style string-matching language lets you react to . . .
- patterns specifically at the beginning of the
subject line: "Cheapest ...", "Impress your ...".
- any digit between letters: catch V1AGRA and C1AL1S
with a single rule. ( . . . but also P2P and B2B, if
you deal with those . . . )
- stuttered letters: catch viagra, viiagra, viaagra,
and viagggra with a single rule.
- non-adjacent keywords: catch "hidden xxx camera" for
any xxx, or none.
- patterns appearing as distinct words: catch "sex",
but not "essex" or "sexagesimal".
I hope someone will find this useful.
Peter
--
Remove the two x's to get a good email address.
More information about the SpamCop-List
mailing list