diff options
| author | Barry Warsaw | 2011-01-02 17:09:11 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2011-01-02 17:09:11 -0500 |
| commit | 00e2ef1c318e00cbf0f862ed839f6c7e44b1c0a9 (patch) | |
| tree | 158da3cac60ec65e8a153c5fd46bee3934eb7b28 /src/mailman/queue | |
| parent | 0fd3cd5393d319da4111b3e196c03ec67b0b9c66 (diff) | |
| download | mailman-00e2ef1c318e00cbf0f862ed839f6c7e44b1c0a9.tar.gz mailman-00e2ef1c318e00cbf0f862ed839f6c7e44b1c0a9.tar.zst mailman-00e2ef1c318e00cbf0f862ed839f6c7e44b1c0a9.zip | |
Split member and nonmember moderation.
* member-moderation happens at the same place in the built-in chain that the
previously named moderation rule happens. nonmember-moderation happens
after all the other normal moderation rules.
* Handle unsubscribed nonmember posts.
Other changes:
* Message.senders now filters out Nones and empty strings.
* Various test cleanups and simplifications.
* More `address` -> `email` fixes.
* Give Link class a useful repr.
* Fix a potential UnboundLocalError.
* Various other small changes.
Diffstat (limited to 'src/mailman/queue')
| -rw-r--r-- | src/mailman/queue/docs/incoming.txt | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/mailman/queue/docs/incoming.txt b/src/mailman/queue/docs/incoming.txt index 75130c4cc..6455db20b 100644 --- a/src/mailman/queue/docs/incoming.txt +++ b/src/mailman/queue/docs/incoming.txt @@ -87,10 +87,12 @@ not linked to a user and are unverified. 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 -pipeline queue. +We have a message that is going to be sent to the mailing list. Once Anne is +a member of the mailing list, this message is so perfectly fine for posting +that it will be accepted and forward to the pipeline queue. + >>> from mailman.testing.helpers import subscribe + >>> subscribe(mlist, 'Anne') >>> msg = message_from_string("""\ ... From: aperson@example.com ... To: test@example.com @@ -120,9 +122,9 @@ Now the message is in the pipeline queue. Subject: My first post Message-ID: <first> Date: ... - X-Mailman-Rule-Misses: approved; emergency; loop; moderation; + X-Mailman-Rule-Misses: approved; emergency; loop; member-moderation; administrivia; implicit-dest; max-recipients; max-size; - news-moderation; no-subject; suspicious-header + news-moderation; no-subject; suspicious-header; nonmember-moderation <BLANKLINE> First post! <BLANKLINE> @@ -149,12 +151,12 @@ pipeline queue. ... event.msg['from'], event.msg['to'], ... event.msg['message-id']) - >>> import zope.event - >>> zope.event.subscribers.append(on_chain) - >>> mlist.emergency = True - >>> inject_message(mlist, msg) - >>> incoming.run() + + >>> from mailman.testing.helpers import event_subscribers + >>> with event_subscribers(on_chain): + ... inject_message(mlist, msg) + ... incoming.run() <mailman.chains.hold.HoldNotification ...> <mailman.chains.hold.HoldChain ...> From: aperson@example.com @@ -187,8 +189,9 @@ new chain and set it as the mailing list's start chain. >>> mlist.start_chain = test_chain.name >>> msg.replace_header('message-id', '<second>') - >>> inject_message(mlist, msg) - >>> incoming.run() + >>> with event_subscribers(on_chain): + ... inject_message(mlist, msg) + ... incoming.run() <mailman.chains.discard.DiscardNotification ...> <mailman.chains.discard.DiscardChain ...> From: aperson@example.com @@ -216,8 +219,9 @@ just create a new chain that does. >>> mlist.start_chain = test_chain.name >>> msg.replace_header('message-id', '<third>') - >>> inject_message(mlist, msg) - >>> incoming.run() + >>> with event_subscribers(on_chain): + ... inject_message(mlist, msg) + ... incoming.run() <mailman.chains.reject.RejectNotification ...> <mailman.chains.reject.RejectChain ...> From: aperson@example.com @@ -257,8 +261,3 @@ to the original sender. --===============... >>> del config.chains['always-reject'] - -.. - Clean up. - - >>> zope.event.subscribers.remove(on_chain) |
