Skipping filtering for outbound mail (was Re: [Mimedefang] MIMEDefang 2.28-BETA-2 is available)
David F. Skoll
dfs at roaringpenguin.com
Tue Dec 10 21:02:00 EST 2002
On Tue, 10 Dec 2002, Philip Clever wrote:
> Hey David can you supply an example of code using this to block a couple of
> ranges for outbound mail? Some of us aren't real Perl savvy but getting
> this feature to work would ROCK! Does this need to go in a filter_sender
> sub? I don't think we have one in our current filter.
It should go in filter_relay, and you need the "-r" option on
mimedefang. Anyway, let's say you don't want to scan mail from
127.0.0.1, 192.168.3/24 or 192.168.4.4. This will do the trick:
sub filter_relay {
my($hostip, $hostname, $helo) = @_;
if ($hostip eq '127.0.0.1' or
$hostip eq '192.168.4.4' or
$hostip =~ /^192\.168\.3\./) {
return ('ACCEPT_AND_NO_MORE_FILTERING', "ok");
}
return ('CONTINUE', "ok");
}
--
David.
More information about the MIMEDefang
mailing list