[Mimedefang] Stream_by_recipient

Stefano McGhee SMcGhee at ARCweb.com
Mon Jan 6 15:07:01 EST 2003


So, purely for the benefit of others, and not myself <*cough*> I alter the
contents of filter_end?  I only say filter end so that I can take advantage
of virus checking and other great MD actions, just not SA.  I looked in the
archives and found a suggestion for a somewhat related issue by Rick
Mallett.  Like this:

sub filter_end ($) {
    my($entity) = @_;

    # No sense doing any extra work
    return if message_rejected();

    # First let's see if we have someone who doesn't want SA Filtering
   foreach $recipient (@Recipients) {
   		if $recipient =~
/spamlover\@mydomain.com|otherspamlover\@mydomain.com/i;
			return()
	}
    # Spam checks if SpamAssassin is installed
    if ($Features{"SpamAssassin"}) {
        if (-s "./INPUTMSG" < 100*1024 && $RelayAddr ne "127.0.0.1" &&
blah, blah , blah

> > Oy vay!  Complexity is not what I seek! :-)  Would it be 
> easier to evaluate
> > the recipients array (@RECIPIENTS) for the spam wanting 
> users in MD before
> > calling SA, but after calling stream_by_recipient and just 
> pass the message
> > on?
> 
> Yup.  Tha;'s how I would do it.
> 




More information about the MIMEDefang mailing list