[Mimedefang] Future development
johnpc at xs4all.nl
Mon Nov 23 09:03:59 EST 2020
On 22-11-20 22:21, Richard Laager wrote:
> On 11/22/20 12:32 PM, Dianne Skoll via MIMEDefang wrote:
>> mimedefang.pl is over 7500 lines of
>> Perl in one ugly file with a ton of global variables. It needs a major
>> overhaul. I would start by writing a MD::Filter base class
>> and storing state in the MD::Filter object. Callbacks could be implemented
>> as methods and users could subclass MD::Filter to implement their behaviour.
I've written an OO-like wrapper around current mimedefang ages ago, which is still in use today. Documented here:
Feel free to use any way you like.
If the "mimedefang-filter-select" and "Mimedefang.pm" is incorporated into the main program, then example modules might even be easier to maintain because different things (eg blocking bad extensions vs stripping HTML) are in different files, and can be turned off completely just by removing one line from MailFilter::Settings.pm.
Just a suggestion... and making MD even more modern with better OO sounds good to me. I've basically done this to make it a bit more manageable, back in the days when I started using this.
Jan-Pieter Cornet <johnpc at xs4all.nl>
"Any sufficiently advanced incompetence is indistinguishable from malice."
- Grey's Law
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 840 bytes
Desc: OpenPGP digital signature
More information about the MIMEDefang