summaryrefslogtreecommitdiff
path: root/src/mailman/chains/headers.py
diff options
context:
space:
mode:
authorAurélien Bompard2015-09-11 16:09:08 +0200
committerBarry Warsaw2015-10-20 21:10:35 -0400
commitd468d096b35e42f8450a5ae449501ea155992a95 (patch)
treef75f38a4650e606a872819ad157fa9e4e20c793e /src/mailman/chains/headers.py
parented772e4fe2296460f0261a114b4f4eea3b318d6a (diff)
downloadmailman-d468d096b35e42f8450a5ae449501ea155992a95.tar.gz
mailman-d468d096b35e42f8450a5ae449501ea155992a95.tar.zst
mailman-d468d096b35e42f8450a5ae449501ea155992a95.zip
Diffstat (limited to 'src/mailman/chains/headers.py')
-rw-r--r--src/mailman/chains/headers.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mailman/chains/headers.py b/src/mailman/chains/headers.py
index c98726e21..b696bcfe7 100644
--- a/src/mailman/chains/headers.py
+++ b/src/mailman/chains/headers.py
@@ -140,14 +140,15 @@ class HeaderMatchChain(Chain):
'contains bogus line: {0}'.format(line))
continue
yield make_link(parts[0], parts[1].lstrip())
- # Then return all the list-specific header matches.
- # Python 3.3: Use 'yield from'
- for entry in mlist.header_matches:
- yield make_link(entry.header, entry.pattern, entry.chain)
# Then return all the explicitly added links.
for link in self._extended_links:
yield link
- # Finally, if any of the above rules matched, jump to the chain
- # defined in the configuration file.
+ # If any of the above rules matched, jump to the chain
+ # defined in the configuration file. This takes precedence over
+ # list-specific matches for security considerations.
yield Link(config.rules['any'], LinkAction.jump,
config.chains[config.antispam.jump_chain])
+ # Then return all the list-specific header matches.
+ # Python 3.3: Use 'yield from'
+ for entry in mlist.header_matches:
+ yield make_link(entry.header, entry.pattern, entry.chain)