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 decoy 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.
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 decoy 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.
Trackback: http://publish.creative-weblogging.com/publish/mt-tb.pl/34698
Mr Wong
Vote for Automated spam learning on Linux with SpamAssassin:
|
Rating: 10.00 out of 1 vote(s) cast.
|
Response from:
bsdwork
(03/12/08 7:32pm)
Honestly, I have to say that amazingly, this still works. Pretty cool, eh?
Subscribe
Use the search to look for other interesting posts
| RSS | See all blog subscribe options |
|
What is RSS? | |
| Yahoo! |
|
| Addthis |
|
| Bloglines |
|
| Newsletter | |
| Follow us on Twitter! |










