Hi

>Hi,
>
>I’ve been using a combination of OpenSMTPd and spamd on OpenBSD (currently at 
>6.5) for some time and with success. However, there are still some 
>false-negatives and I’m looking at ways of reducing those. One way is by 
>making use of RBLs.
>
>(I’ve evaluated delivered spam and the majority of it seems to be coming from 
>IPs that are on various blacklists but aren’t being caught by greylisting.)
>
>spamd doesn’t support RBLs, at least that I’ve found, it can only use lists 
>that can be downloaded locally—the particular service I’m wanting to use only 
>provides DNS-based RBLs. So that’s my problem…
>
>I’m looking for ways of including an RBL in either spamd or OpenSMTPd, 
>preferring to stay in OpenBSD base as much as possible. (In other words, I’d 
>prefer to not rip out spamd or replace or supplement it with SpamAssassin or 
>rspamd—I’d rather find a solution that will plugin _specifically_ for RBLs 
>without all of the other bloat
that SpamAssassin and similar products bring.
>
>Can anyone offer some input on this please?
>
>I’m not opposed to writing an OpenSMTPd filter, though I’d need to locate some 
>documentation for that (I’ve looked but haven’t been able to find it, so I’m 
>probably looking in the wrong places—suggestions welcomed).
>
>~ Tom

I wrote a python script (enclosed) that scans the spamd logs, looks up
new ip address in zen.spamhaus.org and blacklists if found.  It keeps
a cache of what it has done to keep the load down and expires it over
time.  If run at least once within the whitelisting period it will do
the RBL thing for you.

The script has various command line options (mostly for testing) but
oddly if you want to change the RBL you are going to have to edit the
script (hopefully obvious).

I have this line in roots crontab to run it every 15mins

*/15    *       *       *       *       /usr/local/bin/dnsbl-scan.py

Hope that helps

JC

Attachment: dnsbl-scan.py
Description: Binary data

Reply via email to