Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Phred (5358)


Fred is a Perl and PostgreSQL geek. He has made some very small contributions to a few cpan modules and mod_perl.

Journal of Phred (5358)

Friday September 23, 2005
12:22 PM

Spammers: 1, Phred: 2

[ #26860 ]

I host my own mail, and mail for several of my friends, as well as some small clients. Lots of these people like to put their email addresses up o the web unprotected (like me). I've been using Qpsmtpd to manage smtp services, and along with Spamassassin it has been doing an excellent job of keeping the spam volume down. I initially gave myself a point for that.

However over the past couple of months the volume has steadily been increasing and getting to the point where Spamassassin wasn't stopping everything, and I would get at least a dozen spams a day. So I gave up a point to the spammers.

Now Qpsmtpd has a greylist plugin written by Gavin Carr, but I haven't been able to implement it because I have users who can't deal with the fact that this would mean their mail would be delayed by at least 300 seconds. I, however, can't deal with the spam. So I needed domain specific greylisting. This is where perl comes in.

In less than 30 minutes, I was able to add domain specific greylists functionality to the existing greylist plugin. My config/plugins directory now contains the line:

denysoft_greylist domains|

And in the greylist plugin:

my $domains = $config->{domains};
my $host = $rcpt->host;
unless ( $host =~ m/$domains/ ) {
  return DECLINED;
# continue with greylist plugin

Simple eh? This has cut the existing spam volume down by 90% at least, while allowing my other hosted domains to receive mail normally. One point for me, thanks to Perl.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Hi There, I was looking for this (your greylist domain trick) but it seems that this doesn't work over here.. I am not a perl programmer! Eval Global symbol "$config" requires explicit package name at ./plugins/greylisting Do you know what is happening !