diff options
| author | Barry Warsaw | 2010-09-20 17:28:00 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2010-09-20 17:28:00 -0400 |
| commit | 922b669dc02ceee78cf7a79860a4fcb977ab4634 (patch) | |
| tree | f6eeeb41d01dc34b0249392424a022db7b9a50a1 /src/mailman/rules/docs | |
| parent | d4019857e9765e18418b6ead23a4bbde4212ef39 (diff) | |
| download | mailman-922b669dc02ceee78cf7a79860a4fcb977ab4634.tar.gz mailman-922b669dc02ceee78cf7a79860a4fcb977ab4634.tar.zst mailman-922b669dc02ceee78cf7a79860a4fcb977ab4634.zip | |
Diffstat (limited to 'src/mailman/rules/docs')
| -rw-r--r-- | src/mailman/rules/docs/approve.txt | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/src/mailman/rules/docs/approve.txt b/src/mailman/rules/docs/approve.txt index 90ef1d33c..3e1206563 100644 --- a/src/mailman/rules/docs/approve.txt +++ b/src/mailman/rules/docs/approve.txt @@ -28,8 +28,8 @@ approval or not. No approval =========== -If the message has no ``Approve:`` or ``Approved:`` header, then the rule does -not match. +If the message has no ``Approve:`` or ``Approved:`` header (or their ``X-`` +equivalents), then the rule does not match. >>> msg = message_from_string("""\ ... From: aperson@example.com @@ -39,9 +39,9 @@ not match. >>> rule.check(mlist, msg, {}) False -If the message has an ``Approve:`` or ``Approved:`` header with a value that -does not match the moderator password, then the rule does not match. However, -the header is still removed. +If the message has an ``Approve:``, ``Approved:``, ``X-Approve:``, or +``X-Approved:`` header with a value that does not match the moderator +password, then the rule does not match. However, the header is still removed. :: >>> msg['Approve'] = '12345' @@ -58,6 +58,20 @@ the header is still removed. None >>> del msg['approved'] + >>> msg['X-Approve'] = '12345' + >>> rule.check(mlist, msg, {}) + False + >>> print msg['x-approve'] + None + + >>> del msg['x-approve'] + >>> msg['X-Approved'] = '12345' + >>> rule.check(mlist, msg, {}) + False + >>> print msg['x-approved'] + None + + >>> del msg['x-approved'] Using an approval header @@ -74,12 +88,32 @@ matches, and the ``Approve:`` header is stripped. Similarly, for the ``Approved:`` header. + >>> del msg['approve'] >>> msg['Approved'] = 'abcxyz' >>> rule.check(mlist, msg, {}) True >>> print msg['approved'] None +The headers ``X-Approve:`` and ``X-Approved:`` are treated the same way. +:: + + >>> del msg['approved'] + >>> msg['X-Approve'] = 'abcxyz' + >>> rule.check(mlist, msg, {}) + True + >>> print msg['x-approve'] + None + + >>> del msg['x-approve'] + >>> msg['X-Approved'] = 'abcxyz' + >>> rule.check(mlist, msg, {}) + True + >>> print msg['x-approved'] + None + + >>> del msg['x-approved'] + Using a pseudo-header ===================== |
