[Mimedefang] dnsbl

Murat Isik murat.isik at megatek.com.tr
Tue Apr 20 04:28:17 EDT 2004


Hello,

I am using mimedefang 2.39 on FC1 machine successfully and I am really happy
with it. What I am wondering is that is there a way or code to use
sendmail's dnsbl checks like

FEATURE(dnsbl,`bl.spamcop.net', `554 Spam blocked see:
http://spamcop.net/bl.shtml?$&{client_addr}')dnl
FEATURE(dnsbl,`dnsbl.njabl.org',`554 Spam blocked see:
http://njabl.org/')dnl
FEATURE(dnsbl, `relays.ordb.org', `554 Spam blocked see:
http://ordb.org/')dnl

within mimedefang itself, not on sendmail. I am trying to do this since I
will exclude some domains from spam checking like:

if($sender= whatever)
{
accept
}else{
do dnsbl checks
}

I have implemented the following code within filter_relay:

sub filter_relay {

        my ( $ip, $name, $helo) = @_;
        if (relay_is_blacklisted($ip, "bl.spamcop.net")) {
                return('REJECT', "You are listed in sbl.spamcop.net, see
url=$ip for more details");
                }
        if (relay_is_blacklisted($ip, "dnsbl.njabl.org")) {
                return('REJECT', "You are listed in dnsbl.njabl.org, see
url=$ip for more details");
                }
        if (relay_is_blacklisted($ip, "relays.ordb.org")) {
                return('REJECT', "You are listed in relays.ordb.org, see
url=$ip for more details");
                }

}

but it doesnot work.

Any ideas?

Have a nice day.

Murat Isik



More information about the MIMEDefang mailing list