[Mimedefang] dnsbl

Bryan Martin registration at myplaceinspace.com
Tue Apr 20 12:28:38 EDT 2004


sub filter_relay {

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

Bryan Martin

----- Original Message ----- 
From: "Murat Isik" <murat.isik at megatek.com.tr>
To: "mimedefang" <mimedefang at lists.roaringpenguin.com>
Sent: Tuesday, April 20, 2004 4:28 AM
Subject: [Mimedefang] dnsbl


> 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
>
> _______________________________________________
> Visit http://www.mimedefang.org and http://www.canit.ca
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang




More information about the MIMEDefang mailing list