diff options
| author | Barry Warsaw | 2011-09-23 21:42:39 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-09-23 21:42:39 -0400 |
| commit | 48354a7e6814190455fb566947ab952062ecde76 (patch) | |
| tree | 874a9afe0c5ca798a83daa8c6462da6ecaecb2bf /src/mailman/rules/docs/emergency.rst | |
| parent | 87966acc80cf4dabfb7f9d3019f62483376e2037 (diff) | |
| download | mailman-48354a7e6814190455fb566947ab952062ecde76.tar.gz mailman-48354a7e6814190455fb566947ab952062ecde76.tar.zst mailman-48354a7e6814190455fb566947ab952062ecde76.zip | |
Finally, all doctests are named .rst
Diffstat (limited to 'src/mailman/rules/docs/emergency.rst')
| -rw-r--r-- | src/mailman/rules/docs/emergency.rst | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/mailman/rules/docs/emergency.rst b/src/mailman/rules/docs/emergency.rst new file mode 100644 index 000000000..f28f9eed9 --- /dev/null +++ b/src/mailman/rules/docs/emergency.rst @@ -0,0 +1,37 @@ +========= +Emergency +========= + +When the mailing list has its emergency flag set, all messages posted to the +list are held for moderator approval. + + >>> mlist = create_list('test@example.com') + >>> rule = config.rules['emergency'] + >>> msg = message_from_string("""\ + ... From: aperson@example.com + ... To: test@example.com + ... Subject: My first post + ... Message-ID: <first> + ... + ... An important message. + ... """) + +By default, the mailing list does not have its emergency flag set. + + >>> mlist.emergency + False + >>> rule.check(mlist, msg, {}) + False + +The emergency rule matches if the flag is set on the mailing list. + + >>> mlist.emergency = True + >>> rule.check(mlist, msg, {}) + True + +However, if the message metadata has a ``moderator_approved`` key set, then +even if the mailing list has its emergency flag set, the message still goes +through to the membership. + + >>> rule.check(mlist, msg, dict(moderator_approved=True)) + False |
