summaryrefslogtreecommitdiff
path: root/src/mailman/rules/docs
diff options
context:
space:
mode:
authorAurélien Bompard2016-02-02 11:49:00 +0100
committerBarry Warsaw2016-02-29 21:52:13 -0500
commit15238cb5683eb9a0eab9dcd251f509a693a22451 (patch)
treeb57d661d1a6f2b1ff4b8c6920d898c36aa016164 /src/mailman/rules/docs
parent14dbe7fb4a6b29ce955fa1c8d4c1859c514e8e13 (diff)
downloadmailman-15238cb5683eb9a0eab9dcd251f509a693a22451.tar.gz
mailman-15238cb5683eb9a0eab9dcd251f509a693a22451.tar.zst
mailman-15238cb5683eb9a0eab9dcd251f509a693a22451.zip
The order of a mailing list's header matches is significant
Add a numerical index property to HeaderMatch objects, and change the HeaderMatchSet manager to take the order into account. Items can now be inserted and removed by index.
Diffstat (limited to 'src/mailman/rules/docs')
-rw-r--r--src/mailman/rules/docs/header-matching.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mailman/rules/docs/header-matching.rst b/src/mailman/rules/docs/header-matching.rst
index 6618d9cc9..4e6c0853d 100644
--- a/src/mailman/rules/docs/header-matching.rst
+++ b/src/mailman/rules/docs/header-matching.rst
@@ -131,9 +131,9 @@ action.
The list administrator wants to match not on four stars, but on three plus
signs, but only for the current mailing list.
- >>> from mailman.interfaces.mailinglist import IHeaderMatchSet
- >>> header_matches = IHeaderMatchSet(mlist)
- >>> header_matches.add('x-spam-score', '[+]{3,}')
+ >>> from mailman.interfaces.mailinglist import IHeaderMatchList
+ >>> header_matches = IHeaderMatchList(mlist)
+ >>> header_matches.append('x-spam-score', '[+]{3,}')
A message with a spam score of two pluses does not match.
@@ -178,7 +178,7 @@ Now, the list administrator wants to match on three plus signs, but wants
those emails to be discarded instead of held.
>>> header_matches.remove('x-spam-score', '[+]{3,}')
- >>> header_matches.add('x-spam-score', '[+]{3,}', 'discard')
+ >>> header_matches.append('x-spam-score', '[+]{3,}', 'discard')
A message with a spam score of three pluses will still match, and the message
will be discarded.