Low memory spam reduction using Greylisting

January 16, 2007 Link to post  Permalink

In my search for reducing memory usage on my OpenVZ VPS, I took a look at my email server configuration. I originally used the configuration instructions from Howto Forge to setup my server. Even with adjusting the configuration, the memory used by all the mail components, especially the protection system – Spamassassin, ClamAV and the pieces necessary to run them – was over 100MB.

However, if I remove this protection, bad stuff will get through!

What about greylisting, I thought.

In summary, a server that performs greylisting denies the first incoming mail request. Any regular SMTP server will retry the request later, and this request will be allowed through. Spammers use custom software that usually doesn’t retry, they just move on to the next email in their list. Regular mail gets through with a delay the first time and spam is effectively blocked.

I uninstalled all the postfix add-ons I’d added-on, and used apt-get install postgrey to add greylisting to Postfix on my server.

Some spam still gets through, but 90% is gone. I use Thunderbird to access my email account here, and this detects the junk mail very well (actually better than my install of Spamassassin did).

Greylisting works better than I thought it would, and the best part is that the server uses less than 12MB of my precious OpenVZ memory allocation