summaryrefslogtreecommitdiff
path: root/src/mailman/queue
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/queue')
-rw-r--r--src/mailman/queue/docs/archiver.txt3
-rw-r--r--src/mailman/queue/docs/command.txt9
-rw-r--r--src/mailman/queue/docs/digester.txt21
-rw-r--r--src/mailman/queue/docs/incoming.txt23
-rw-r--r--src/mailman/queue/docs/lmtp.txt9
-rw-r--r--src/mailman/queue/docs/news.txt15
-rw-r--r--src/mailman/queue/docs/outgoing.txt15
-rw-r--r--src/mailman/queue/docs/runner.txt7
8 files changed, 55 insertions, 47 deletions
diff --git a/src/mailman/queue/docs/archiver.txt b/src/mailman/queue/docs/archiver.txt
index 601857cd9..7d404cf56 100644
--- a/src/mailman/queue/docs/archiver.txt
+++ b/src/mailman/queue/docs/archiver.txt
@@ -1,3 +1,4 @@
+=========
Archiving
=========
@@ -5,7 +6,7 @@ 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 = create_list('test@example.com')
>>> commit()
>>> msg = message_from_string("""\
diff --git a/src/mailman/queue/docs/command.txt b/src/mailman/queue/docs/command.txt
index c9a55d2a9..73be64de0 100644
--- a/src/mailman/queue/docs/command.txt
+++ b/src/mailman/queue/docs/command.txt
@@ -1,3 +1,4 @@
+========================
The command queue runner
========================
@@ -6,11 +7,11 @@ Commands are extensible using the Mailman plugin system, but Mailman comes
with a number of email commands out of the box. These are processed when a
message is sent to the list's -request address.
- >>> mlist = create_list(u'test@example.com')
+ >>> mlist = create_list('test@example.com')
A command in the Subject
-------------------------
+========================
For example, the 'echo' command simply echoes the original command back to the
sender. The command can be in the Subject header.
@@ -64,7 +65,7 @@ And now the response is in the virgin queue.
A command in the body
----------------------
+=====================
The command can also be found in the body of the message, as long as the
message is plain text.
@@ -105,7 +106,7 @@ message is plain text.
Stopping command processing
----------------------------
+===========================
The 'end' command stops email processing, so that nothing following is looked
at by the command queue.
diff --git a/src/mailman/queue/docs/digester.txt b/src/mailman/queue/docs/digester.txt
index 2c9c813b2..bb2c05819 100644
--- a/src/mailman/queue/docs/digester.txt
+++ b/src/mailman/queue/docs/digester.txt
@@ -1,3 +1,4 @@
+=========
Digesting
=========
@@ -272,7 +273,7 @@ The RFC 1153 contains the digest in a single plain text message.
Internationalized digests
--------------------------
+=========================
When messages come in with a content-type character set different than that of
the list's preferred language, recipients will get an internationalized
@@ -286,7 +287,7 @@ digest. French is not enabled by default site-wide, so enable that now.
... default_language: fr
... """)
- >>> mlist.preferred_language = u'fr'
+ >>> mlist.preferred_language = 'fr'
>>> msg = message_from_string("""\
... From: aperson@example.org
... To: test@example.com
@@ -467,7 +468,7 @@ The content can be decoded to see the actual digest text.
Digest delivery
----------------
+===============
A mailing list's members can choose to receive normal delivery, plain text
digests, or MIME digests.
@@ -484,24 +485,24 @@ digests, or MIME digests.
Two regular delivery members subscribe to the mailing list.
- >>> member_1 = subscribe(u'uperson@example.com', DeliveryMode.regular)
- >>> member_2 = subscribe(u'vperson@example.com', DeliveryMode.regular)
+ >>> member_1 = subscribe('uperson@example.com', DeliveryMode.regular)
+ >>> member_2 = subscribe('vperson@example.com', DeliveryMode.regular)
Two MIME digest members subscribe to the mailing list.
- >>> member_3 = subscribe(u'wperson@example.com', DeliveryMode.mime_digests)
- >>> member_4 = subscribe(u'xperson@example.com', DeliveryMode.mime_digests)
+ >>> member_3 = subscribe('wperson@example.com', DeliveryMode.mime_digests)
+ >>> member_4 = subscribe('xperson@example.com', DeliveryMode.mime_digests)
One RFC 1153 digest member subscribes to the mailing list.
>>> member_5 = subscribe(
- ... u'yperson@example.com', DeliveryMode.plaintext_digests)
+ ... 'yperson@example.com', DeliveryMode.plaintext_digests)
>>> member_6 = subscribe(
- ... u'zperson@example.com', DeliveryMode.plaintext_digests)
+ ... 'zperson@example.com', DeliveryMode.plaintext_digests)
When a digest gets sent, the appropriate recipient list is chosen.
- >>> mlist.preferred_language = u'en'
+ >>> mlist.preferred_language = 'en'
>>> mlist.digest_size_threshold = 0.5
>>> fill_digest()
>>> runner.run()
diff --git a/src/mailman/queue/docs/incoming.txt b/src/mailman/queue/docs/incoming.txt
index 7e1a98f6b..926b60965 100644
--- a/src/mailman/queue/docs/incoming.txt
+++ b/src/mailman/queue/docs/incoming.txt
@@ -1,3 +1,4 @@
+=========================
The incoming queue runner
=========================
@@ -12,13 +13,13 @@ message eventually ending up in one of the four disposition states described
above.
>>> from mailman.app.lifecycle import create_list
- >>> mlist = create_list(u'_xtest@example.com')
- >>> mlist.start_chain
- u'built-in'
+ >>> mlist = create_list('_xtest@example.com')
+ >>> print mlist.start_chain
+ built-in
Accepted messages
------------------
+=================
We have a message that is going to be sent to the mailing list. This message
is so perfectly fine for posting that it will be accepted and forward to the
@@ -76,7 +77,7 @@ And now the message is in the pipeline queue.
Held messages
--------------
+=============
The list moderator sets the emergency flag on the mailing list. The built-in
chain will now hold all posted messages, so nothing will show up in the
@@ -106,7 +107,7 @@ pipeline queue.
Discarded messages
-------------------
+==================
Another possibility is that the message would get immediately discarded. The
built-in chain does not have such a disposition by default, so let's craft a
@@ -116,10 +117,10 @@ new chain and set it as the mailing list's start chain.
>>> from mailman.interfaces.chain import LinkAction
>>> truth_rule = config.rules['truth']
>>> discard_chain = config.chains['discard']
- >>> test_chain = Chain('always-discard', u'Testing discards')
+ >>> test_chain = Chain('always-discard', 'Testing discards')
>>> link = Link(truth_rule, LinkAction.jump, discard_chain)
>>> test_chain.append_link(link)
- >>> mlist.start_chain = u'always-discard'
+ >>> mlist.start_chain = 'always-discard'
>>> inject_message(mlist, msg)
>>> file_pos = fp.tell()
@@ -137,17 +138,17 @@ new chain and set it as the mailing list's start chain.
Rejected messages
------------------
+=================
Similar to discarded messages, a message can be rejected, or bounced back to
the original sender. Again, the built-in chain doesn't support this so we'll
just create a new chain that does.
>>> reject_chain = config.chains['reject']
- >>> test_chain = Chain('always-reject', u'Testing rejections')
+ >>> test_chain = Chain('always-reject', 'Testing rejections')
>>> link = Link(truth_rule, LinkAction.jump, reject_chain)
>>> test_chain.append_link(link)
- >>> mlist.start_chain = u'always-reject'
+ >>> mlist.start_chain = 'always-reject'
The virgin queue needs to be cleared out due to artifacts from the previous
tests above.
diff --git a/src/mailman/queue/docs/lmtp.txt b/src/mailman/queue/docs/lmtp.txt
index 75e91fd4e..b8b6335fb 100644
--- a/src/mailman/queue/docs/lmtp.txt
+++ b/src/mailman/queue/docs/lmtp.txt
@@ -1,3 +1,4 @@
+===========
LTMP server
===========
@@ -23,7 +24,7 @@ It also helps to have a nice LMTP client.
Posting address
----------------
+===============
If the mail server tries to send a message to a nonexistent mailing list, it
will get a 550 error.
@@ -45,7 +46,7 @@ will get a 550 error.
Once the mailing list is created, the posting address is valid.
>>> from mailman.app.lifecycle import create_list
- >>> create_list(u'mylist@example.com')
+ >>> create_list('mylist@example.com')
<mailing list "mylist@example.com" at ...>
>>> commit()
>>> lmtp.sendmail(
@@ -62,7 +63,7 @@ Once the mailing list is created, the posting address is valid.
Sub-addresses
--------------
+=============
The LMTP server understands each of the list's sub-addreses, such as -join,
-leave, -request and so on. If the message is posted to an invalid
@@ -98,6 +99,6 @@ But the message is accepted if posted to a valid sub-address.
Clean up
---------
+========
>>> master.stop()
diff --git a/src/mailman/queue/docs/news.txt b/src/mailman/queue/docs/news.txt
index f149ef93a..c9f2417a0 100644
--- a/src/mailman/queue/docs/news.txt
+++ b/src/mailman/queue/docs/news.txt
@@ -1,3 +1,4 @@
+===============
The news runner
===============
@@ -7,8 +8,8 @@ the message for Usenet (yes, I know that NNTP is not Usenet, but this runner
was originally written to gate to Usenet, which has its own rules).
>>> from mailman.queue.news import prepare_message
- >>> mlist = config.db.list_manager.create(u'_xtest@example.com')
- >>> mlist.linked_newsgroup = u'comp.lang.python'
+ >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> mlist.linked_newsgroup = 'comp.lang.python'
Some NNTP servers such as INN reject messages containing a set of prohibited
headers, so one of the things that the news runner does is remove these
@@ -112,7 +113,7 @@ the message.
Newsgroup moderation
---------------------
+====================
When the newsgroup is moderated, an Approved: header with the list's posting
address is added for the benefit of the Usenet system.
@@ -126,8 +127,8 @@ address is added for the benefit of the Usenet system.
...
... """)
>>> prepare_message(mlist, msg, {})
- >>> msg['approved']
- u'_xtest@example.com'
+ >>> print msg['approved']
+ _xtest@example.com
>>> mlist.news_moderation = NewsModeration.moderated
>>> msg = message_from_string("""\
@@ -137,8 +138,8 @@ address is added for the benefit of the Usenet system.
...
... """)
>>> prepare_message(mlist, msg, {})
- >>> msg['approved']
- u'_xtest@example.com'
+ >>> print msg['approved']
+ _xtest@example.com
But if the newsgroup is not moderated, the Approved: header is not changed.
diff --git a/src/mailman/queue/docs/outgoing.txt b/src/mailman/queue/docs/outgoing.txt
index 1c9d89041..b8cf25033 100644
--- a/src/mailman/queue/docs/outgoing.txt
+++ b/src/mailman/queue/docs/outgoing.txt
@@ -1,3 +1,4 @@
+=====================
Outgoing queue runner
=====================
@@ -11,16 +12,16 @@ recipient set will be batched, whether messages will be personalized and
VERP'd, etc. The outgoing runner doesn't itself support retrying but it can
move messages to the 'retry queue' for handling delivery failures.
- >>> mlist = create_list(u'test@example.com')
+ >>> mlist = create_list('test@example.com')
>>> from mailman.app.membership import add_member
>>> from mailman.interfaces.member import DeliveryMode
- >>> add_member(mlist, u'aperson@example.com', u'Anne Person',
- ... u'password', DeliveryMode.regular, u'en')
- >>> add_member(mlist, u'bperson@example.com', u'Bart Person',
- ... u'password', DeliveryMode.regular, u'en')
- >>> add_member(mlist, u'cperson@example.com', u'Cris Person',
- ... u'password', DeliveryMode.regular, u'en')
+ >>> add_member(mlist, 'aperson@example.com', 'Anne Person',
+ ... 'password', DeliveryMode.regular, 'en')
+ >>> add_member(mlist, 'bperson@example.com', 'Bart Person',
+ ... 'password', DeliveryMode.regular, 'en')
+ >>> add_member(mlist, 'cperson@example.com', 'Cris Person',
+ ... 'password', DeliveryMode.regular, 'en')
By setting the mailing list to personalize messages, each recipient will get a
unique copy of the message, with certain headers tailored for that recipient.
diff --git a/src/mailman/queue/docs/runner.txt b/src/mailman/queue/docs/runner.txt
index d24a8334c..032ea4c50 100644
--- a/src/mailman/queue/docs/runner.txt
+++ b/src/mailman/queue/docs/runner.txt
@@ -1,3 +1,4 @@
+=============
Queue runners
=============
@@ -8,14 +9,14 @@ while, then wakes up and runs through its queue files again.
Basic architecture
-------------------
+==================
The basic architecture of qrunner is implemented in the base class that all
runners inherit from. This base class implements a .run() method that runs
continuously in a loop until the .stop() method is called.
- >>> mlist = config.db.list_manager.create(u'_xtest@example.com')
- >>> mlist.preferred_language = u'en'
+ >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> mlist.preferred_language = 'en'
Here is a very simple derived qrunner class. Queue runners use a
configuration section in the configuration files to determine run