[Mimedefang] Mulitple Recipients

Kelson Vibber kelson at speed.net
Fri Oct 10 13:49:00 EDT 2003


At 04:54 AM 10/10/2003, Ray Parish wrote:
>Is this more less what you were talking about?
><snip>
>sub filter_begin () {
>
>     # Check if user opt out
>     foreach $check (@optout) {
>         foreach $rcpt (@Recipients) {
>             if (lc($rcpt) eq "<" . $check .">") {
>                 stream_by_recipient();
>                 action_add_header("X-NotScanned", "You elected to not have
>your email scanned for SPAM"
>);
>             }
>         }
>     }

(First of all, let's keep this on the list so future people with the same 
problem can see the whole discussion in the archives.)

No, stream_by_recipient is the end of filtering.  Nothing should happen 
after that.

Also, check the mimedefang-filter man page for examples of using 
stream_by_recipient - among other things, you need to check the return 
value to make sure it succeeded.

Basically you need to check for opt-out recipients twice: once at the start 
of filter_begin, to decide whether or not to call stream_by_recipient, and 
again at the point where you call the spam filter, to decide whether to 
call the filter or add the X-NotScanned header.

Kelson Vibber
SpeedGate Communications <www.speed.net> 





More information about the MIMEDefang mailing list