[Mimedefang] Bypassing outgoing mail - filter_relay blocking all incomming mail
Julian "Netzkind" Hartmann
julian at netzkind.at
Sat Feb 22 17:15:00 EST 2003
On Saturday 22 February 2003 13:15, Rick Knight wrote:
> I also want to allow locally originating messages to bypass the
> SpamAssassin filter so, as instructed here, I've added
>
> sub filter_relay ($$$) {
> my ($ip, $name, $helo) = @_;
> return ('ACCEPT_NO_MORE_FILTERING', "ok") if $ip eq "x.x.x.x";
> }
Which was pretty much a screwup for my filter too.
Rewrote it to the following, now it works perfectly:
sub filter_relay($$$) {
my ($ip, $name, $helo) = @_;
if ($ip eq "xx.xxx.xx.56" || $ip eq "xx.xxx.xx.57" || $ip eq "127.0.0.1")
{
return('ACCEPT_AND_NO_MORE_FILTERING', "ok");
}
else {
return ('CONTINUE', "ok");
}
}
Keep in mind: the machine has several static ips, so i had to match against
any of them. I also included 127.0.0.1 as acceptable relay, as some mail
seems to come from there - especially those newsletters generated locally
which take up awfully much ressources and time when being scanned.
But the most important part should be the "else return('CONTINUE', "ok");"
As stated, works just fine over here.
regards,
julian hartmann
More information about the MIMEDefang
mailing list