[Mimedefang] Next generation mimedefang-filter

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


On Thu, May 12, 2005 at 03:37:23PM +0100, Nik Clayton wrote:
> >So, I split up the mimedefang config file into a parts directory:
> 
> But it doesn't:
> 
>  1. Make it easy to unit test your functionality.
> 
>     be a fairly time consuming process.  So it would be nice to have a
>     way to unit test the filter's functionality to catch any regressions
>     before you have to go in to the test lab.

This is on my TODO list for the modular mimedefang-filter that I
just posted about. It's currently easy enough to just drop one
filter in the local sendmail running on my desktop, restart,
and test it that way.

But it would be very convenient to be able to give an email to
a certain wrapper script, which would create a fake mimedefang-filter
runtime environment, and drop you in the perl debugger right where
your filter starts. Or run a set of regression tests against the
filter.

>  2. Make it easy to share specific changes to the filter, or integrate
>     third party changes in to your filter.
> 
>     Hands up everyone who wrote their own code to do SPF checks, or dig
>     inside .zip files, or allow whitelists/blacklists?  At the moment
>     the best we've got for sharing code is things like:
> 
>     http://www.mimedefang.org/kwiki/index.cgi?SpamReportAddress
>     http://www.mimedefang.org/kwiki/index.cgi?RelayCheckAddresses
> 
>     Wouldn't it be simpler to:
> 
>        perl -MCPAN -e 'install 
> MimeDefang::Filter::Plugin::SpamReportAddress"

In my setup, it would just be a matter of copying
MailFilter/SpamReportAddress.pm to the right location, and adding 
MailFilter::SpamReportAddress to the config file. 

Except... um, what is "SpamReportAddress" supposed to do, anyway?
Add a header with the correct address to report spam to, to each
incoming email?

If it's a general utility function that gets a report address based
on for example an IP address, then that _is_ a general enough module
that you could upload to CPAN and install via CPAN, too. And it doesn't
have to live in MimeDefang::Filter to be available to Mimedefang.

-- 
#!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