[Mimedefang] exiting the filter before any processing

Mack roaringpenguin.com at bass-speaker.com
Mon Sep 5 08:01:37 EDT 2005


in the mimedefang start script /etc/rc.d/init.d/mimedefang
uncomment the line
# MX_RELAY_CHECK=no
and change it to
MX_RELAY_CHECK=yes

to enable the filter relay, and here's the bit for the filter

       sub filter_relay {
            my ($ip, $name) = @_;
            if ($name =~ /spammer\.com$/) {
                 return ('REJECT', "Sorry; spammer.com is blacklisted");
            }
            return ('CONTINUE', "ok");
       }


as taken from 
man mimedefang-filter
(a good place to read lol)


-----Original Message-----
From: mimedefang-bounces at lists.roaringpenguin.com
[mailto:mimedefang-bounces at lists.roaringpenguin.com]On Behalf Of alan
premselaar
Sent: Monday 05 September 2005 12:53
To: mimedefang at lists.roaringpenguin.com
Subject: Re: [Mimedefang] exiting the filter before any processing


Rolf wrote:
> hello
> 
> I've tried so many combinations and none work.  Feeling a bit silly.
> 
> Where can I put in mimedefang-filter a statement so that the filter 
> exits before any processing happens based on $RelayAddr ??
> 
> I've tried a simple: return if ($RelayAddr eq "ip address");  in various 
> parts of the filter but none make any difference. Do I need such a 
> statement in each of the subroutines?
> 
> What am I missing and/or misunderstanding?
> 
Rolf,

  I think you want to put something like this in filter_relay:

if ($RelayAddr eq 'ip address') {
	return('ACCEPT_AND_NO_MORE_FILTERING', 'ok');
}


and you'll also need to make sure you're calling mimedefang with relay 
checking turned on.

You should check the man pages for how to do this specifically as I 
don't remember off the top of my head.

HTH

alan
_______________________________________________
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

This Email Has Been Anti-Virus Scanned





More information about the MIMEDefang mailing list