[Mimedefang] Using relay_check()

David F. Skoll dfs at roaringpenguin.com
Wed Jul 17 16:30:01 EDT 2002


On Wed, 17 Jul 2002, Steve Robb wrote:

> I wanted to try and use the DNSBL relay check that's built into MD but was
> having a bit of trouble figuring out how to get started.

DNSBL is not built into MIMEDefang.  That kind of thing is better
done from the Sendmail configuration file.

However, if you start mimedefang with the "-r" option, and you use the
multiplexor, then every time an SMTP connection is made, the function
filter_relay is called.  Here's an example for your filter file:

sub filter_relay ($$) {
	my($hostip, $hostname) = @_;

	if ($hostip eq "192.168.3.3") {
		return(0, "I don't like you!");
	}

	if ($hostname =~ /\.spammer\.com$/) {
		return(-1, "I'm gonna tempfail you!");
	}

	return (1, "OK, we'll proceed.");
}

If you want to do DNSBL checks, it's up to you to write the Perl
code to do the lookup.  Not hard; just tedious.

Regards,

David.




More information about the MIMEDefang mailing list