[Mimedefang] Per domain filtering

Kevin A. McGrail kmcgrail at pccc.com
Fri Nov 14 11:58:36 EST 2003


Alan,

I am actually working on a similar problem.  The main solution I am sure
revolves around using stream_by_domain.  stream_by_domain() can only be used
in filter_begin.

Here is some untested pseudo code based on another email I wrote a few weeks
ago but still haven't had time to implement:

sub filter_begin {
   if (stream_by_domain()) {
                        return;
   }
  etc....
}

sub filter {
   my($entity, $fname, $ext, $type) = @_;

   #DOMAINS TO DO A/V & ANTI/SPAM
   my (%hash_to_check);
   $hash_to_check{'domain1.com'} = 1;
   $hash_to_check{'domain2.com'} = 1;
   $hash_to_check{'domain3.com'} = 1;

    if ($hash_to_check{$Domain} > 0) {
     #Do filtering
   } else {
     #Don't Filter
   }
}

Regards,
KAM

> Here is what i need to do :
>
> I got on a mail server about 15 different domains. For 5 of theses domain
i
> need to do antivirus and antiSPAM filtering using spamassassin and
> bitdefender. For the other 10 domains nothing should be done. So is there
a
> way to tell mimedefang to do nothing with some domains and to do "some
> filtering"   (antivirux + antiSPAM) with other domains ?



More information about the MIMEDefang mailing list