Our VPS was running low on free memory the last few weeks. After a bit of research, we realized that our email greylisting software, Milter-Greylist was using the most memory of everything installed on our server. More than our database engine, web server, email server, and everything else (not combined)!
For those who don’t know, Grey Listing delays emails in an attempt to foil spammers which don’t typically follow standards for retrying email messages. Milter-greylist is a package that works with sendmail, our SMTP server. Milter-greylist is great, however, it keeps it’s working history in memory, which was OK for the two years that we have run it. However, the amount of spam attempts continues to rise… why don’t home users notice that their computers have become SPAM zombies anyway?
So, the milter-greylist was storing tens of thousands of records in memory. It had to be reduced. Rather than switch to a database driven greylisting package, we decided to start blocking some SPAM attempts earlier in the process.
We enabled the outright blocking of inbound email attempts by any IP address listed on Spamhaus.org’s SBL+XBL list. SBL+XBL are lists of computers (built by crazy wizardry) that one can use to blacklist email attempts. I’m uncomfortable using blacklists like this, but, what can you do? The odds of good mail being lost are very small, and hopefully, anyone who happens to get bounced unintentionally can phone us.
So, following the simple instructions here:
http://www.joeldare.com/papers/spamhaus.pdf
We were able to reduce the traffic to Milter-Greylist and it’s memory usage by 2/3 to 3/4! Uptime and performance of our VPS and therefore everything hosted on it should be slightly better.
Spammers suck.