summaryrefslogtreecommitdiff
path: root/src/mailman/chains/reject.py
diff options
context:
space:
mode:
authorBarry Warsaw2010-02-16 18:45:55 -0500
committerBarry Warsaw2010-02-16 18:45:55 -0500
commit006515005077b7b4b6fbb18d593800264ed307c4 (patch)
tree53c04cdb1572e7d6683aebfd3fb58c526bf3f345 /src/mailman/chains/reject.py
parent24631a0aad7c1be8b71303b509552f69240743b5 (diff)
downloadmailman-006515005077b7b4b6fbb18d593800264ed307c4.tar.gz
mailman-006515005077b7b4b6fbb18d593800264ed307c4.tar.zst
mailman-006515005077b7b4b6fbb18d593800264ed307c4.zip
Diffstat (limited to 'src/mailman/chains/reject.py')
-rw-r--r--src/mailman/chains/reject.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mailman/chains/reject.py b/src/mailman/chains/reject.py
index 92720d931..3dbf21869 100644
--- a/src/mailman/chains/reject.py
+++ b/src/mailman/chains/reject.py
@@ -22,13 +22,15 @@ from __future__ import absolute_import, unicode_literals
__metaclass__ = type
__all__ = [
'RejectChain',
+ 'RejectNotification',
]
import logging
+from zope.event import notify
from mailman.app.bounces import bounce_message
-from mailman.chains.base import TerminalChainBase
+from mailman.chains.base import ChainNotification, TerminalChainBase
from mailman.core.i18n import _
@@ -37,6 +39,11 @@ SEMISPACE = '; '
+class RejectNotification(ChainNotification):
+ """A notification event signaling that a message is being rejected."""
+
+
+
class RejectChain(TerminalChainBase):
"""Reject/bounce a message."""
@@ -57,3 +64,4 @@ class RejectChain(TerminalChainBase):
# XXX Exception/reason
bounce_message(mlist, msg)
log.info('REJECT: %s', msg.get('message-id', 'n/a'))
+ notify(RejectNotification(mlist, msg, msgdata, self))