summaryrefslogtreecommitdiff
path: root/src/mailman/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/app')
-rw-r--r--src/mailman/app/bounces.py28
-rw-r--r--src/mailman/app/docs/bounces.txt31
2 files changed, 1 insertions, 58 deletions
diff --git a/src/mailman/app/bounces.py b/src/mailman/app/bounces.py
index 50a9f54d8..e227dfc32 100644
--- a/src/mailman/app/bounces.py
+++ b/src/mailman/app/bounces.py
@@ -25,7 +25,6 @@ __all__ = [
'StandardVERP',
'bounce_message',
'maybe_forward',
- 'scan_message',
'send_probe',
]
@@ -40,12 +39,10 @@ from string import Template
from zope.component import getUtility
from zope.interface import implements
-from mailman.app.finder import find_components
from mailman.config import config
from mailman.core.i18n import _
from mailman.email.message import OwnerNotification, UserNotification
-from mailman.interfaces.bounce import (
- IBounceDetector, Stop, UnrecognizedBounceDisposition)
+from mailman.interfaces.bounce import UnrecognizedBounceDisposition
from mailman.interfaces.listmanager import IListManager
from mailman.interfaces.membership import ISubscriptionService
from mailman.interfaces.pending import IPendable, IPendings
@@ -96,29 +93,6 @@ def bounce_message(mlist, msg, e=None):
-def scan_message(mlist, msg):
- """Scan all the message for heuristically determined bounce addresses.
-
- :param mlist: The mailing list.
- :type mlist: `IMailingList`
- :param msg: The bounce message to scan.
- :type msg: `Message`
- :return: The set of bouncing addresses found in the scanned message. The
- set will be empty if no addresses were found.
- :rtype: set
- """
- fatal_addresses = set()
- for detector_class in find_components('mailman.bouncers', IBounceDetector):
- addresses = detector_class().process(msg)
- # Detectors may return Stop to signify that no fatal errors were
- # found, or a sequence of addresses.
- if addresses is Stop:
- return Stop
- fatal_addresses.update(addresses)
- return fatal_addresses
-
-
-
class _BaseVERPParser:
"""Base class for parsing VERP messages.
diff --git a/src/mailman/app/docs/bounces.txt b/src/mailman/app/docs/bounces.txt
index f18569743..f825064e3 100644
--- a/src/mailman/app/docs/bounces.txt
+++ b/src/mailman/app/docs/bounces.txt
@@ -99,34 +99,3 @@ passed in as an instance of a ``RejectMessage`` exception.
I sometimes say something important.
<BLANKLINE>
--...--
-
-
-Scanning a message
-==================
-
-When a message hits the ``-bounces`` address for a mailing list, it is scanned
-to see if it we can dig out a set of addresses that have bounced.
-
- >>> msg = message_from_string("""\
- ... To: test-bounces@example.com
- ... From: postmaster@example.org
- ... Content-Type: multipart/report; report-type=delivery-status;
- ... boundary="AAA"
- ...
- ... --AAA
- ... Content-Type: message/delivery-status
- ...
- ... Action: failed
- ... Status: 5.0.0 (recipient reached disk quota)
- ... Original-Recipient: rfc822; aperson@example.net
- ... Final-Recipient: rfc822; anne.person@example.net
- ...
- ... --AAA--
- ... """)
-
-The DSN bouncer will return the ``Original-Recipient:`` in preference to the
-``Final-Recipient:``.
-
- >>> from mailman.app.bounces import scan_message
- >>> print scan_message(mlist, msg)
- set([u'aperson@example.net'])