summaryrefslogtreecommitdiff
path: root/src/mailman/chains/reject.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-03-24 10:16:21 -0400
committerBarry Warsaw2016-03-24 10:16:21 -0400
commit8cc7e77b85f013d6f9ea4cda16ae18856fd6ccee (patch)
tree0ae6c01bf71492fe6b8e65e0576132a7a4986a71 /src/mailman/chains/reject.py
parentce9370a537683e6e4e934b8018d0fe3f2aa7f9ac (diff)
downloadmailman-8cc7e77b85f013d6f9ea4cda16ae18856fd6ccee.tar.gz
mailman-8cc7e77b85f013d6f9ea4cda16ae18856fd6ccee.tar.zst
mailman-8cc7e77b85f013d6f9ea4cda16ae18856fd6ccee.zip
Diffstat (limited to 'src/mailman/chains/reject.py')
-rw-r--r--src/mailman/chains/reject.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mailman/chains/reject.py b/src/mailman/chains/reject.py
index d6ebd0bde..657e788af 100644
--- a/src/mailman/chains/reject.py
+++ b/src/mailman/chains/reject.py
@@ -17,13 +17,9 @@
"""The terminal 'reject' chain."""
-__all__ = [
- 'RejectChain',
- ]
-
-
import logging
+from mailman import public
from mailman.app.bounces import bounce_message
from mailman.chains.base import TerminalChainBase
from mailman.core.errors import RejectMessage
@@ -38,7 +34,7 @@ NEWLINE = '\n'
SEMISPACE = '; '
-
+@public
class RejectChain(TerminalChainBase):
"""Reject/bounce a message."""
@@ -68,8 +64,8 @@ reasons:
The original message as received by Mailman is attached.
""").format(
- list_name=mlist.display_name,
- reasons=NEWLINE.join(reasons)
+ list_name=mlist.display_name, # flake8: noqa
+ reasons=NEWLINE.join(reasons) # flake8: noqa
))
bounce_message(mlist, msg, error)
log.info('REJECT: %s', msg.get('message-id', 'n/a'))