From b4a695842a60f63b489f23cbfae30840f18a8fbf Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Thu, 27 Dec 2001 06:53:20 +0000 Subject: FormatDisabledNotice(): If the user has been disabled due to bounces, they'll have a bounce info record, and if that record has a score above 0, we'll add a little bit of information to their options page explaining their current bounce score and some advice for fixing the problem. --- Mailman/HTMLFormatter.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Mailman/HTMLFormatter.py') diff --git a/Mailman/HTMLFormatter.py b/Mailman/HTMLFormatter.py index af960bb1f..b048c3dcf 100644 --- a/Mailman/HTMLFormatter.py +++ b/Mailman/HTMLFormatter.py @@ -130,6 +130,7 @@ class HTMLFormatter: def FormatDisabledNotice(self, user): status = self.getDeliveryStatus(user) reason = None + info = self.getBounceInfo(user) if status == MemberAdaptor.BYUSER: reason = _('; it was disabled by you') elif status == MemberAdaptor.BYADMIN: @@ -152,6 +153,17 @@ class HTMLFormatter: address. In either case, to re-enable delivery, change the %(link)s option below. Contact %(mailto)s if you have any questions or need assistance.''') + elif info and info.score > 0: + # Provide information about their current bounce score. We know + # their membership is currently enabled. + score = info.score + total = self.bounce_score_threshold + return _('''

We have received some recent bounces from your + address. Your current bounce score is %(score)s out of a + maximum of %(total)s. Please double check that your subscribed + address is correct and that there are no problems with delivery to + this address. Your bounce score will be automatically reset if + the problems are corrected soon.''') else: return '' -- cgit v1.2.3-70-g09d2