[Mimedefang] Re: exiting the filter before any processing

Rolf rolf at ses.tas.gov.au
Tue Sep 6 09:21:55 EDT 2005


hello

Yesterday I received several helpful responses to the question below.  
All suggested using filter_relay to avoid further processing.

I have now discovered that what I was initially trying doesn't match 
what the business wants.  What is required is that some parts of the 
filter are to be avoided based on the sending mail server:

If $RelayAddr is the address of the ISP mail server then processing 
continues as usual. If, however, it is the address of the LAN mail 
server then spam, attachments, size, and so on that the filter checks 
are all to be ignored, but append_text_boilerplate() is to be applied.
I can easily apply the boilerplate routine to the right msgs, but I 
can't find a simple way to ignore the rest of the processing for the 
same msg.

Is the only method to insert a collection of conditionals that avoid 
each of the checks through each of the subroutines?  Of the kind "if 
the relay address is not from then LAN then do this virus/spam/mimetype 
check..."?  Seems the only way, and rather clumsy.  Is there a better 
construct?

The man page says that the boilerplate routine is only available in 
filter_end so it seems that any message wanting that kind of processing 
  will at least need to "enter" the filter in the first place.

Many thanks.

r.



> From: Rolf <rolf at ses.tas.gov.au>
> Date: 5 September 2005 9:23:55 PM
> To: mimedefang at lists.roaringpenguin.com
> Subject: exiting the filter before any processing
>
> 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?
>
> thanks
>
> r.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2149 bytes
Desc: not available
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20050906/64d99993/attachment.bin>


More information about the MIMEDefang mailing list