[Mimedefang] Next generation mimedefang-filter

Jan Pieter Cornet johnpc at xs4all.nl
Tue May 24 19:52:24 EDT 2005


On Thu, May 12, 2005 at 11:13:08AM -0400, David F. Skoll wrote:
> This is indeed a problem.  What we did in CanIt was separate out the
> "facts" from the "policy".
> 
> So the "facts" modules might say:
> 
> - User xyz at foo.com is whitelisted.
> - Domain foo.com is blacklisted.
> - Message contains a JPEG extension.
> 
> The policy module is presented with these facts, and it decides what to
> do about them.  And given the huge diversity of MIMEDefang implementations,
> I rather doubt that a config file is sufficient.  Ultimately, I think
> the policy module must be written in Perl.  It would be vastly simpler
> than writing a MIMEDefang filter is now, because obtaining all the facts
> is just a matter of having the right plugins.

But then it wouldn't be that much different from the current
mimedefang-filter, which already uses several fact-finding routines
available in mimedefang.pl (message_contains_virus(), re_match($entity, ...)
etc).

Often a lot of "facts" have implied actions, and sites can use those
facts-with-actions as standalone building blocks to quickly build at least
a basic filter. More elaborate filtering, for example settings per
recipient, will require custom coding. Or CanIt, of course :)

But even in the case of custom coding, some filtering might still be
standard in all cases - in which case you can use independent modules.

Anyway - I might be suffering from the hammer-nail syndrome, but I
think the modular mimedefang-filter that I just posted about will allow
such a configuration with dynamic "facts". You'd just put the constant
filters in separate modules, and write a configuration module for all
the dynamic filters, which in turn "use"s the dynamic fact finding
modules (if they're not built into mimedefang anyway).

-- 
#!perl -wpl # mmfppfmpmmpp mmpffm <pmmppfmfpppppfmmmf at fpffmm4mmmpmfpmf.ppppmf>
$p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;                                # Jan-Pieter Cornet



More information about the MIMEDefang mailing list