[Mimedefang] Block all spam from one user?
Rich West
Rich.West at wesmo.com
Mon Dec 2 08:51:01 EST 2002
> > 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;
> > }
>
> this will ALSO discard mail to another recipient if it happened to be
> addressed to both support and another recipient.
That was what I thought...
> This may not be a problem,
> but if it is, you'll want to put something like this in filter_begin:
>
> foreach $recip (@Recipients) {
> $recip =~ tr/<>//d; # Nuke angle brackets
> $recip = lc($recip); # Lower-case
> if ($recip eq 'support at mydomain.com') {
> if (stream_by_recipient()) {
> return;
> }
> }
> }
Ahh.. ok.. much better..
> stream_by_recipient() does some powerful magic; see mimedefang-filter(5).
Looking into this now! Thanks!
-Rich
More information about the MIMEDefang
mailing list