summaryrefslogtreecommitdiff
path: root/mailman/queue/virgin.py
diff options
context:
space:
mode:
authorBarry Warsaw2008-03-30 19:38:18 -0400
committerBarry Warsaw2008-03-30 19:38:18 -0400
commit0e1c2be3e6110ccece3cbd0ebc5bfd0eb76c3aad (patch)
treec0432554f9bb4068b6bae6e3a83ddde925c0cd4f /mailman/queue/virgin.py
parent7f440dc39489b32257c35f15ee6f27d90a197cf5 (diff)
downloadmailman-0e1c2be3e6110ccece3cbd0ebc5bfd0eb76c3aad.tar.gz
mailman-0e1c2be3e6110ccece3cbd0ebc5bfd0eb76c3aad.tar.zst
mailman-0e1c2be3e6110ccece3cbd0ebc5bfd0eb76c3aad.zip
More fixes to get end-to-end delivery basically working.
- Add a VirginPipeline for the virgin queue, which is mostly the same as the BuiltInPipeline, so refactor the commonality into a BasePipeline. - Simplify and update bin/dumpdb. - Rename inject() to inject_text() and add inject_message(). Both interfaces will be useful. - When enqueuing and not using _plaintext, use the highest pickle protocol supported. - Fix the archive runner's calculation of whether to clobber the message's Date: header. - Fix the outgoing queue's deliver_after calculation. - Update the virgin queue runner. It doesn't need to inherit from IncomingRunner any more; it can just execute the 'virgin' pipeline.
Diffstat (limited to '')
-rw-r--r--mailman/queue/virgin.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/mailman/queue/virgin.py b/mailman/queue/virgin.py
index 5534c95f0..0494700ce 100644
--- a/mailman/queue/virgin.py
+++ b/mailman/queue/virgin.py
@@ -23,22 +23,20 @@ to go through some minimal processing before they can be sent out to the
recipient.
"""
+from mailman.app.pipelines import process
from mailman.configuration import config
from mailman.queue import Runner
-from mailman.queue.incoming import IncomingRunner
-class VirginRunner(IncomingRunner):
+class VirginRunner(Runner):
QDIR = config.VIRGINQUEUE_DIR
def _dispose(self, mlist, msg, msgdata):
- # We need to fasttrack this message through any handlers that touch
- # it. E.g. especially CookHeaders.
- msgdata['_fasttrack'] = 1
- return IncomingRunner._dispose(self, mlist, msg, msgdata)
-
- def _get_pipeline(self, mlist, msg, msgdata):
- # It's okay to hardcode this, since it'll be the same for all
- # internally crafted messages.
- return ['CookHeaders', 'ToOutgoing']
+ # We need to fast track this message through any pipeline handlers
+ # that touch it, e.g. especially cook-headers.
+ msgdata['_fasttrack'] = True
+ # Use the 'virgin' pipeline.
+ process(mlist, msg, msgdata, 'virgin')
+ # Do not keep this message queued.
+ return False