summaryrefslogtreecommitdiff
path: root/src/mailman/queue
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/queue')
-rw-r--r--src/mailman/queue/bounce.py26
-rw-r--r--src/mailman/queue/docs/command.txt2
-rw-r--r--src/mailman/queue/outgoing.py2
-rw-r--r--src/mailman/queue/tests/test_outgoing.py14
4 files changed, 3 insertions, 41 deletions
diff --git a/src/mailman/queue/bounce.py b/src/mailman/queue/bounce.py
index fb8b0124a..8787332e7 100644
--- a/src/mailman/queue/bounce.py
+++ b/src/mailman/queue/bounce.py
@@ -222,29 +222,3 @@ class BounceRunner(Runner, BounceMixin):
def _clean_up(self):
BounceMixin._clean_up(self)
Runner._clean_up(self)
-
-
-
-def maybe_forward(mlist, msg):
- # Does the list owner want to get non-matching bounce messages?
- # If not, simply discard it.
- if mlist.bounce_unrecognized_goes_to_list_owner:
- adminurl = mlist.GetScriptURL('admin', absolute=1) + '/bounce'
- mlist.ForwardMessage(msg,
- text=_("""\
-The attached message was received as a bounce, but either the bounce format
-was not recognized, or no member addresses could be extracted from it. This
-mailing list has been configured to send all unrecognized bounce messages to
-the list administrator(s).
-
-For more information see:
-%(adminurl)s
-
-"""),
- subject=_('Uncaught bounce notification'),
- tomoderators=0)
- log.error('forwarding unrecognized, message-id: %s',
- msg.get('message-id', 'n/a'))
- else:
- log.error('discarding unrecognized, message-id: %s',
- msg.get('message-id', 'n/a'))
diff --git a/src/mailman/queue/docs/command.txt b/src/mailman/queue/docs/command.txt
index dfe6b8c19..c767e6f5f 100644
--- a/src/mailman/queue/docs/command.txt
+++ b/src/mailman/queue/docs/command.txt
@@ -63,7 +63,7 @@ And now the response is in the ``virgin`` queue.
_parsemsg : False
listname : test@example.com
nodecorate : True
- recipients : [u'aperson@example.com']
+ recipients : set([u'aperson@example.com'])
reduced_list_headers: True
version : ...
diff --git a/src/mailman/queue/outgoing.py b/src/mailman/queue/outgoing.py
index 1823b42b5..ed27f014c 100644
--- a/src/mailman/queue/outgoing.py
+++ b/src/mailman/queue/outgoing.py
@@ -156,5 +156,5 @@ class OutgoingRunner(Runner):
msgdata['deliver_until'] = deliver_until
msgdata['recipients'] = recipients
self._retryq.enqueue(msg, msgdata)
- # We've successfully completed handling of this message
+ # We've successfully completed handling of this message.
return False
diff --git a/src/mailman/queue/tests/test_outgoing.py b/src/mailman/queue/tests/test_outgoing.py
index 74850ce75..a0fe407c8 100644
--- a/src/mailman/queue/tests/test_outgoing.py
+++ b/src/mailman/queue/tests/test_outgoing.py
@@ -46,6 +46,7 @@ from mailman.interfaces.pending import IPendings
from mailman.interfaces.usermanager import IUserManager
from mailman.queue.outgoing import OutgoingRunner
from mailman.testing.helpers import (
+ LogFileMark,
get_queue_messages,
make_testable_runner,
specialized_message_from_string as message_from_string)
@@ -54,19 +55,6 @@ from mailman.utilities.datetime import factory, now
-class LogFileMark:
- def __init__(self, log_name):
- self._log = logging.getLogger(log_name)
- self._filename = self._log.handlers[0].filename
- self._filepos = os.stat(self._filename).st_size
-
- def readline(self):
- with open(self._filename) as fp:
- fp.seek(self._filepos)
- return fp.readline()
-
-
-
def run_once(qrunner):
"""Predicate for make_testable_runner().