How can I use a blocklist to reduce spam?

4 posts / 0 new
Last post
#1 Sat, 08/18/2012 - 17:13
jsp_1983

How can I use a blocklist to reduce spam?

If I want to use a blocklist, like Spamhaus, what do I need to do? Is there an extra module that needs installing or is it something within an existing configuration file?

I'm using Postfix and Webmin/ Virtualmin GPL.

Sat, 08/18/2012 - 17:24
andreychek

Howdy,

You can add those by editing the Postfix configuration.

If you edit your /etc/postfix/main.cf file, look for the line beginning with "smtpd_recipient_restrictions", and add your desired RBL's to the end of that line.

For example, in the case of Spamhaus, you could add this to the end of that line:

reject_rbl_client sbl.spamhaus.org

And then restart Postfix after you've added that.

-Eric

Sun, 08/19/2012 - 07:28
Locutus

In addition to Eric's solution, you might want to make sure that before the "reject_rbl_client" statement you have this in the corresponding line:

permit_sasl_authenticated

That will allow authenticated users to send mail, no matter if their IP address might be blacklisted by the RBL. (Postfix honors the statements in that config line sequentially, so authenticated users take precedence over RBL here.) Failing to do so might annoy your users, if they can't send email cause they happen to have been assigned a dynamic IP that happens to be blacklisted. :)

Sun, 08/19/2012 - 16:39
jsp_1983

Excellent... A refreshingly simple way to get it implemented - thanks!

Topic locked