September 2005
S M T W T F S
 123
45678910
11121314151617
18192021222324
252627282930  

About

I am The Cyberwolfe and these are my ramblings. All original content is protected under a Creative Commons license - always ask first.
Creative Commons License

spammy update

Well, SpamAssassin seems to have it’s sights set fairly well right out of the gate, but I have had to teach it a few things. Me being lazy, I developed the following script to automate the process of telling SA to read each of my three inboxes and the Spam folder to catalog the collection.
——————————————————————————————
#!/bin/bash

# SpamAssassin Teacher

echo "Reading SPAM folder..."
sa-learn --spam --dir /home/your-username-here/Mail/Spam/cur

echo "Reading Inbox1..."
sa-learn --ham --dir /home/your-username-here/Mail/inbox/cur

echo "Reading Inbox2..."
sa-learn --ham --dir /home/your-username-here/Mail/inbox2/cur

echo "Reading Inbox3..."
sa-learn --ham --dir /home/your-username-here/Mail/inbox3/cur

echo "Done!"

exit
———————————————————————————————-

To use the script, save it to your home directory as spammy.sh. You will then need to set it as an executable file with this command:chmod 777 spammy.sh, and call it using ./spammy.sh in a terminal window.

I really love it when I get a chance to do a script, since it’s very close to the programming I learned waaaaay back in high school (DOS-based stuff and Pascal). Unfortunately, I don’t do many repetitive tasks that would benefit from being scripted.

Of course, if I did, I’d end up going whole hog and becomming a programmer again. I don’t need that kind of workaholicism :)

Comments are closed.