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: https://johnpc.home.xs4all.nl/mimedefang-modular/ 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 <joh...@xs4all.nl> "Any sufficiently advanced incompetence is indistinguishable from malice." - Grey's Law
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang