summaryrefslogtreecommitdiff
path: root/mailman/queue/docs
diff options
context:
space:
mode:
authorBarry Warsaw2008-03-30 00:06:07 -0400
committerBarry Warsaw2008-03-30 00:06:07 -0400
commit7f440dc39489b32257c35f15ee6f27d90a197cf5 (patch)
treea4aaec013ee63253b78cfeb3518e78b1df424a91 /mailman/queue/docs
parenteecf4b29f2642f30b22ee978fa50d8713bec1a48 (diff)
downloadmailman-7f440dc39489b32257c35f15ee6f27d90a197cf5.tar.gz
mailman-7f440dc39489b32257c35f15ee6f27d90a197cf5.tar.zst
mailman-7f440dc39489b32257c35f15ee6f27d90a197cf5.zip
Diffstat (limited to 'mailman/queue/docs')
-rw-r--r--mailman/queue/docs/archiver.txt35
1 files changed, 35 insertions, 0 deletions
diff --git a/mailman/queue/docs/archiver.txt b/mailman/queue/docs/archiver.txt
new file mode 100644
index 000000000..43b6d4974
--- /dev/null
+++ b/mailman/queue/docs/archiver.txt
@@ -0,0 +1,35 @@
+Archiving
+=========
+
+Mailman can archive to any number of archivers that adhere to the IArchiver
+interface. By default, there's a Pipermail archiver.
+
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list(u'test@example.com')
+ >>> mlist.web_page_url = u'http://www.example.com/'
+
+ >>> msg = message_from_string("""\
+ ... From: aperson@example.com
+ ... To: test@example.com
+ ... Subject: My first post
+ ... Message-ID: <first>
+ ...
+ ... First post!
+ ... """)
+
+ >>> from mailman.configuration import config
+ >>> from mailman.queue import Switchboard
+ >>> archiver_queue = Switchboard(config.ARCHQUEUE_DIR)
+ >>> ignore = archiver_queue.enqueue(msg, {}, listname=mlist.fqdn_listname)
+
+ >>> from mailman.queue.archive import ArchiveRunner
+ >>> from mailman.tests.helpers import make_testable_runner
+ >>> runner = make_testable_runner(ArchiveRunner)
+ >>> runner.run()
+
+ # The best we can do is verify some landmark exists. Let's use the
+ # Pipermail pickle file exists.
+ >>> import os
+ >>> os.path.exists(os.path.join(config.PUBLIC_ARCHIVE_FILE_DIR,
+ ... mlist.fqdn_listname, 'pipermail.pck'))
+ True