[Mimedefang] Request for "Trusted Relay" Feature

David F. Skoll dfs at roaringpenguin.com
Mon Nov 25 20:57:01 EST 2002


On Mon, 25 Nov 2002, Rick Mallett wrote:

> In case you might decide to add this feature, I took the liberty of
> coding it up, using a file called "trusted-relay" in /etc/mail which
> would be expected to contain a one-line regexp which would be matched
> against the hostname and also the hostip in case it turned out to be
> easier to do it that way for some sites.

Hmm... when I hear "regexp", I think "Perl", not "C". :-)

Maybe a compromise would be to have a way for filter_relay and
filter_sender to return a code back which gets translated in
SMFIS_ACCEPT.  That way, you (and I) don't have to code special-case tests
in C.  The overhead of filter_relay and filter_sender is much less than
actual message filtering -- you don't need to parse MIME or anything
like that.  Something like:

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

	if ($hostname eq 'trusted.host.net') {
		return ('ACCEPT', 'accept');
	}
	return(1, 'OK');
}

The special code "ACCEPT" would mean "return SMFIS_ACCEPT to Milter."

Regards,

David.



More information about the MIMEDefang mailing list