summaryrefslogtreecommitdiff
path: root/Mailman/rules/docs
diff options
context:
space:
mode:
authorBarry Warsaw2008-01-23 23:47:50 -0500
committerBarry Warsaw2008-01-23 23:47:50 -0500
commitdf637148d8fa2d5c101a990ee6766ea8547f000a (patch)
tree92e3e1c218c6f59031a0d0383a98a38e38dc2f9f /Mailman/rules/docs
parent4460aad316db5c8af9b84c392e67441acaac9d72 (diff)
downloadmailman-df637148d8fa2d5c101a990ee6766ea8547f000a.tar.gz
mailman-df637148d8fa2d5c101a990ee6766ea8547f000a.tar.zst
mailman-df637148d8fa2d5c101a990ee6766ea8547f000a.zip
More changes to rules and chains.
Now a link has a rule, action, chain, and function, not all of which needs to be specified. The action is a LinkAction enum adn specifies what to do should the rule match. The use of the chain or function depends on what the action is. Several interface changes now make it easier to jump to other chains, push (i.e. detour) to chains, etc. Rules can also now specify that they should not be recorded in X-* headers. Added a TruthRule which always matches.
Diffstat (limited to 'Mailman/rules/docs')
-rw-r--r--Mailman/rules/docs/emergency.txt13
-rw-r--r--Mailman/rules/docs/rules.txt1
2 files changed, 6 insertions, 8 deletions
diff --git a/Mailman/rules/docs/emergency.txt b/Mailman/rules/docs/emergency.txt
index 685d7bcb6..1375c3bc9 100644
--- a/Mailman/rules/docs/emergency.txt
+++ b/Mailman/rules/docs/emergency.txt
@@ -16,15 +16,12 @@ list are held for moderator approval.
... An important message.
... """)
-The emergency rule is matched as part of the built-in chain.
-
- >>> from Mailman.configuration import config
- >>> chain = config.chains['built-in']
-
-The emergency rule matches if the flag is set on the mailing list.
+The emergency rule is matched as part of the built-in chain. The emergency
+rule matches if the flag is set on the mailing list.
+ >>> from Mailman.app.chains import process
>>> mlist.emergency = True
- >>> chain.process(mlist, msg, {})
+ >>> process('built-in', mlist, msg, {})
There are two messages in the virgin queue. The one addressed to the original
sender will contain a token we can use to grab the held message out of the
@@ -72,6 +69,6 @@ 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.
- >>> chain.process(mlist, msg, dict(moderator_approved=True))
+ >>> process('built-in', mlist, msg, dict(moderator_approved=True))
>>> len(virginq.files)
0
diff --git a/Mailman/rules/docs/rules.txt b/Mailman/rules/docs/rules.txt
index 1f5b147e7..d2d291331 100644
--- a/Mailman/rules/docs/rules.txt
+++ b/Mailman/rules/docs/rules.txt
@@ -31,6 +31,7 @@ names to rule objects.
no-subject True
non-member True
suspicious-header True
+ truth True
You can get a rule by name.