diff options
Diffstat (limited to 'src/mailman/interfaces/bounce.py')
| -rw-r--r-- | src/mailman/interfaces/bounce.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mailman/interfaces/bounce.py b/src/mailman/interfaces/bounce.py index fba269609..22e2467b8 100644 --- a/src/mailman/interfaces/bounce.py +++ b/src/mailman/interfaces/bounce.py @@ -22,17 +22,20 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ 'IBounceDetector', - 'NonFatal', + 'Stop', ] +from flufl.enum import Enum from zope.interface import Interface -# Matching addresses were found, but they were determined to be non-fatal. In -# this case, processing is halted but no bounces are registered. -NonFatal = object() +# If a bounce detector returns Stop, that means to just discard the +# message. An example is warning messages for temporary delivery +# problems. These shouldn't trigger a bounce notification, but we also +# don't want to send them on to the list administrator. +Stop = object() @@ -45,8 +48,7 @@ class IBounceDetector(Interface): :param msg: An email message. :type msg: `Message` :return: The detected bouncing addresses. When bouncing addresses are - found but are determined to be non-fatal, the special marker - `NonFatal` can be returned to halt any bounce processing - pipeline. None can be returned if no addresses are found. - :rtype: A sequence of strings, None, or NonFatal. + found but are determined to be non-fatal, the value `Stop` is + returned to halt any bounce processing pipeline. + :rtype: A set strings, or `Stop` """ |
