diff options
| author | Aurélien Bompard | 2015-09-11 16:09:08 +0200 |
|---|---|---|
| committer | Barry Warsaw | 2015-10-20 21:10:35 -0400 |
| commit | d468d096b35e42f8450a5ae449501ea155992a95 (patch) | |
| tree | f75f38a4650e606a872819ad157fa9e4e20c793e /src/mailman/chains/headers.py | |
| parent | ed772e4fe2296460f0261a114b4f4eea3b318d6a (diff) | |
| download | mailman-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.py | 13 |
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) |
