[Mailman-Developers] MM3: message held reason

Barry Warsaw barry at list.org
Tue Mar 18 20:19:57 CET 2014


On Mar 17, 2014, at 07:59 PM, Aurelien Bompard wrote:

>On Mailman3, every "message held" notification has "XXX" as the reason. This
>comes from the HoldChain class in mailman/chains/hold.py, where "XXX" is
>hardcoded.  I'd like to fix that. I think there could be a list in the
>message metadata to which each matching rule would add a short description of
>why it matched, like we currently have a list of matching rules in the
>msgdata['rule_hits'] variable.  I'll make sure to mark these descriptions as
>i18n strings.
>
>Are you OK with that? Any trap I'm not seeing?

Yes, it would be pretty cool to implement this.  The main reason I never did
was because I couldn't quite work out a nice way to display multiple reasons
given the rules for template interpolation.  You'll notice the postheld.txt
template has a single *indented* line containing

    $reason

and that has implications for exactly what kind of string can go in there
(e.g. if it's multiple lines, who's responsible for getting everything to line
up correctly).  Maybe that shouldn't be indented, but then the wrapping rules
might interfere.

If you can work out the display issues, keeping in mind an i18n'd postheld.txt
template, and the fact that those templates can be replaced by a site or list
admin, then I think your basic plan is on the right track.

Cheers,
-Barry



More information about the Mailman-Developers mailing list