Comment 4 for bug 889635

Revision history for this message
Joseph Fall (powderflask) wrote :

Browsing the source for the 3.x series, it looks like one possible way to handle this might be to add a new digest format - say "Flexible Plain Text Digest".

class FlexibleTextDigester(RFC1153Digester):

would simply override a few things in the init() method to pull in user-defined alternatives to the RFC1153 defaults from the mlist object to override the config settings, but otherwise rely on the base digester to do the work.

That would ensure no existing lists using RFC1153 plain text digests would be affected in any way.
Of course MailingList(Model) would need to define a new field(s) - DB schema change - that's a bummer.

I saw a few other feature requests for non-compliant RFC1153 digests that might be consolidated with this approach?

BTW - looks like there is a minor coding error (v. 3.0.0a8+ ) on line 242 in runners.digest.py
class RFC1153Digester(Digester):
      def add_message(self, msg, count):
         ....
         for header in config.digests.plain_digest_keep_headers.split():
             ...

should read

         for header in self._keepers:

I doubt this causes a bug at present, but has the potential to, if I've understood the code correctly.