Stubborn Idealism

RSS Feed

Page: << 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 >>

The Spaminator

Date: Fri 1 December 2006
Time: 3:52 PM EST

I've been getting more and more spam lately. It's up to about 30 junk emails a day. So I decided to Do Something About It. Sending spam complaints to the spammers' ISPs manually would take too much time, so I decided to write a Perl script to do it. I created a special directory called 'spam' and started saving copies of all new spam emails into it. Then I wrote the Perl script to scan that directory and parse the 'Received' headers in each email to see who sent it.

At that point I ran into a problem. How do you know who to send the complaint to? You can do a whois on the sender's IP address, but whois output doesn't follow any standard format, so writing code to parse it would be a nightmare.

In desperation, I did a google search on "how to fight spam" and hit upon abuse.net. They have a DNS service that lets you look up the proper abuse contacts for any domain. For example, if you get junk email from an IP address with a PTR record of some.slimey.spammer.com, then you can ask abuse.net for the proper abuse contacts by looking up the TXT records for some.slimey.spammer.com.contacts.abuse.net. To make it really easy, they provide a snippet of Perl code that will do that and return the abuse contacts in an array.

Here's a typical 'Received' header:

Received: from 70-32-6-138.frdrmd.adelphia.net (70-32-6-138.frdrmd.adelphia.net [70.32.6.138]) by gravitywars.wbrameld4.name (8.13.7/8.13.7) with ESMTP id kB1G8wlw032309 for ; Fri, 1 Dec 2006 11:08:59 -0500

So my script extracts the 70-32-6-138.frdrmd.adelphia.net part and asks abuse.net for the abuse contacts for that domain. Then it forwards the junk email to those contacts with a blurb at the top asking that they please put a stop to the spammer's activities.

I set up a cron job to run that script every 10 minutes to check for new junk emails to complain about. I can't tell yet if this is actually helping my spam problem since I just started doing it yesterday. I might post a follow-up entry on this in a few weeks.

The only problem with this approach is that it works only on spam sent from IP addresses that have PTR records, but not all addresses do. Roughly 1 out of every 5 junk emails I get come from IP addresses without PTR records. I'd like to configure my mail server to accept only emails that come from addresses that have PTR records, but that's another little project. I find sendmail's configuration files intimidating.

Chaotic Prose

Date: Sat 11 November 2006
Time: 7:02 PM EST

I had trouble falling asleep last night so to relieve the boredom I threw together a fun little activity that anybody can participate in. It's a story that we all make up as we go. It promises to be a riot...there have only been two additions to the story since I started it and already the protagonist is bleeding from the mouth and ears. Is Peter dying? His fate is in your hands!

More Mandelbrot

Date: Tue 31 October 2006
Time: 1:38 AM EST

I worked on the Mandelbrot set program all weekend, and I've still got more features in mind. Here's another image (click for the full-sized version):

I'm using that one as my desktop background.

Page: << 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 >>

FairTax     Stop Sylvia Browne