[Mimedefang] Block all spam from one user?

Rich West Rich.West at wesmo.com
Mon Dec 2 08:48:01 EST 2002


> > I'm sure this has come up before, but I couldn't find exactly what I was 
> > looking for in the archives.  Basically, what I am trying to do is blow 
> > ANYTHING that SpamAssassin (or that contains a virus) from going to one 
> 
> Huh? I'm having a bit of trouble deciphering that sentence, but I presume
> you mean "blow away anything that Spamassassin flags as spam, or anything
> that contains a virus", although that interpretation is somewhat at odds
> with the observation "no matter where they are" which doesn't seem to 
> have any relevance. 

Yes, yes.. I did mean that I wanted to discard, or dispose of completely, any
mail that gets tagged as SPAM via Spamassassin when it is being delivered to one
particular user.

The bit about "no matter where they are" was in reference to the fact that the
user accounts that would be mailing TO this address could be from either within
the local network OR from external internet accounts.

> You probably want action_discard rather than action_bounce and and I 
> don't know where you came up with the variable $recipient but unless its
> a global variable you set in the filter_begin routine, it doesn't exist and
> you have to check against the @Recipients array, and you might want to take
> note that variables in Perl are case sensitive.

Yes, I set it in filter_begin..

> There are many ways to do it
> in Perl, but the most straightforward is probably
> 
>   foreach $recipient (@Recipients) {
>     action_discard() if $recipient =~ /support\@mydomain.com/i;
>   }

action_discard is probably better overall.

Thanks!
-Rich



More information about the MIMEDefang mailing list