Whole Network Most Recent TOP10 FreeBSD Hacks Securing

 

Automated spam learning on Linux with SpamAssassin

Filed in archive Hacks by Michael Hammer on August 29, 2006

First of all, create a new user account, or virtual mail account for your spamtrap. I suggest a mailbox name that has zero chance of receiving legitimate mail. I am also assuming that this mailbox will be located in /var/spool/mail/usernamehere. Finally, you will need a fairly new Spamassassin, since the older ones in many linux distros do not include the bayesian filter.

So next off, we have to create a cron job that will run the spam learning. Mine is here (and a little crude, but it works):

#!/bin/bash
if [[ `cat /var/spool/mail/algoholic | wc -c` -ge 10 ]] ; then
sa-learn --spam --showdots --mbox /var/spool/mail/algoholic
rm -f /var/spool/mail/algoholic

fi

Now that we have the spam learner ready, we can start placing links all over the place which point at our decoylinks user. If you want, you can add a style="display:none" parameter inside of the a href so that the link is invisible to people, but visible to computers.

That is all. It takes a couple of weeks for you to get fully indexed by the spam bots, although you can also hit some reply to unsubscribe links with this email address substituted for your real addy if you want.


Advertisement


Permalink: Automated spam learning on Linux with SpamAssassin
Tags: free  linux  hacks  tips  blog  email  hacking  spam  spam+learning 

Trackback: http://www.creative-weblogging.com/cgi-bin/mt-tb.pl/34698



Related Entries:

Run Linux With Gmail - 29 August 2006

Guide To Hacking The Linux Kernel - 29 August 2006

Linux Powered Home Theatre - 30 August 2006

Turn Your $60 Router To a $600 Router - 30 August 2006

Advertisement


Advertisement


CW ToolbarInstall
RSSrss   | See all blog subscribe options
Googlegoogle   |   What is RSS?
Yahoo!yahoo
AddthisAddThis Feed Button
BloglinesBloglines
Newsletter
Advertisement - Book yours here.

Use our search feature to look for other interesting posts

Just this blog Whole network
 
Advertisement
Book yours here.



  • Other blogs in the same channel in the Creative Weblogging Network

Advertisement -
Book yours here..






Advertisement - Book yours here..
 
Tagcloud: Applications Applicatios Devices Education Entertainment Finding The Right Linux For You FreeBSD Hacks Humor Linux For Windows Users Misc Multimedia Networking Programming Securing Servers Solaris Tips & Tricks Utilities