summaryrefslogtreecommitdiff
path: root/src/mailman/chains/headers.py
diff options
context:
space:
mode:
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)