[Mimedefang] Patch: adding custom headers for SpamAssassin

Jan-Pieter Cornet johnpc at xs4all.nl
Fri Sep 22 16:04:13 EDT 2006

Interestingly, we recently made a change almost exactly like the
one Jonas posted, using a global array. So I can confirm that
there certainly is demand for the feature :)

On Fri, Sep 22, 2006 at 10:59:08AM -0700, Kenneth Porter wrote:
> >An object oriented MIMEDefang seems logical.
> >And nice. :-)
> What I look forward to is a system that makes upgrades easier, by allowing 
> me to make minor tweaks that are easy to carry forward to future example 
> filters. One step towards that would be to break up the sample filter into 
> multiple files, so that changes to one piece of the filter don't require me 
> to examine all the other parts for migration issues.

Already done, see http://www.xs4all.nl/~johnpc/mimedefang-modular/

This does two things. First, it provides a CPAN friendly-ish interface
to mimedefang. This particular version exports mimedefang's global
variables into your namespace, keeping it easily compatible with
the existing mimedefang setup.

Second, this allows for several independant modules that you can
call independently. This would make upgrades somewhat easier
if half of your filter was the stock filter.

As for an object-oriented MIMEDefang... I'm not convinced that is
a good idea. OO does add overhead to perl -- certainly, calling
an object method, compared to accessing a global variable, is a very
costly operation... but of course you need to see that in the
big picture, it depends how often you'd call a method.

One might be able to setup a relatively quick test by modifing the
Mimedefang.pm module I wrote, to export tie()ed variables instead
of the actual globals, effectively turning all accesses into a method
call, and then Benchmarking the default filter against that.

Then again, when compared to running SpamAssassin, the difference
is probably not measurable, so maybe I'm overreacting.

Hmm... I just realised that the last time I brought this up,
somebody suggested putting it on a public cvs or svn, I considered
that I good idea.. and... never came around to doing that.
If there's still interest, I can still do so.

Jan-Pieter Cornet <johnpc at xs4all.nl>
!! Disclamer: The addressee of this email is not the intended recipient. !!
!! This is only a test of the echelon and data retention systems. Please !!
!! archive this message indefinitely to allow verification of the logs.  !!

More information about the MIMEDefang mailing list