summaryrefslogtreecommitdiff
path: root/Mailman/pipeline/after_delivery.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/pipeline/after_delivery.py')
-rw-r--r--Mailman/pipeline/after_delivery.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/Mailman/pipeline/after_delivery.py b/Mailman/pipeline/after_delivery.py
index 512b83249..759b64a78 100644
--- a/Mailman/pipeline/after_delivery.py
+++ b/Mailman/pipeline/after_delivery.py
@@ -15,15 +15,30 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
-"""Perform some bookkeeping after a successful post.
+"""Perform some bookkeeping after a successful post."""
+
+__metaclass__ = type
+__all__ = ['AfterDelivery']
-This module must appear after the delivery module in the message pipeline.
-"""
import datetime
+from zope.interface import implements
+
+from Mailman.i18n import _
+from Mailman.interfaces import IHandler
+
-def process(mlist, msg, msgdata):
- mlist.last_post_time = datetime.datetime.now()
- mlist.post_id += 1
+class AfterDelivery:
+ """Perform some bookkeeping after a successful post."""
+
+ implements(IHandler)
+
+ name = 'after-delivery'
+ description = _('Perform some bookkeeping after a successful post.')
+
+ def process(self, mlist, msg, msgdata):
+ """See `IHander`."""
+ mlist.last_post_time = datetime.datetime.now()
+ mlist.post_id += 1