scohen wrote:
> Hello,
> 
> I am trying to find a way to drop all outgoing mail that gets
> marked as
> spam while still passing along incomming mail. I realize that I can
> do something like this: 
> 
> if ( $Sender=~/[EMAIL PROTECTED]/ ) {
>       action_quarantine_entire_message();
>       action_discard();
> }
> 
> underneath the section that begins with:
> if ($hits >= $req) {
> 
> But what do I do if I have outgoing mail from many different domains?
> 
> Steve Cohen

You could do this (untested)

at top slave level:
my @localdomains = (...)

in filter_end:
        for my $recip (@Recipients)
        {       my $islocal = 0;
                for my $domain (@localdomains)
                {       if ($recip =~ /[EMAIL PROTECTED]>?$/i)
                        {       $islocal = 1;
                                last;
                        }
                }

                if (not $islocal)
                {       action_quarantine_entire_message();
                        delete_recipient $recip;
                }
        }

If an email is to some local and some nonlocal recipients I believe this does what you 
mean
I believe that if all recipients are deleted this has the same effect as an 
action_discard

Matthew.van.Eerde (at) hbinc.com                 805.964.4554 x902
Hispanic Business Inc./HireDiversity.com         Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to