diff options
Diffstat (limited to 'src/mailman/config')
| -rw-r--r-- | src/mailman/config/config.py | 10 | ||||
| -rw-r--r-- | src/mailman/config/schema.cfg | 29 |
2 files changed, 17 insertions, 22 deletions
diff --git a/src/mailman/config/config.py b/src/mailman/config/config.py index 47ef021b5..48c849148 100644 --- a/src/mailman/config/config.py +++ b/src/mailman/config/config.py @@ -250,13 +250,3 @@ class Configuration: """Iterate over all the style configuration sections.""" for section in self._config.getByCategory('style', []): yield section - - @property - def header_matches(self): - """Iterate over all spam matching headers. - - Values are 3-tuples of (header, pattern, chain) - """ - matches = self._config.getByCategory('spam.headers', []) - for match in matches: - yield (matches.header, matches.pattern, matches.chain) diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg index 44cbf6f4e..00b8d9325 100644 --- a/src/mailman/config/schema.cfg +++ b/src/mailman/config/schema.cfg @@ -339,19 +339,24 @@ charset: us-ascii enabled: yes -[spam.headers.template] -# This section defines basic header matching actions. Each spam.header -# section names a header to match (case-insensitively), a pattern to match -# against the header's value, and the chain to jump to when the match -# succeeds. +[antispam] +# This section defines basic antispam detection settings. + +# This value contains lines which specify RFC 822 headers in the email to +# check for spamminess. Each line contains a `key: value` pair, where the key +# is the header to check and the value is a Python regular expression to match +# against the header's value. E.g.: +# +# X-Spam: (yes|maybe) # -# The header value should not include the trailing colon. -header: X-Spam -# The pattern is always matched with re.IGNORECASE. -pattern: xyz -# The chain to jump to if the pattern matches. Maybe be any existing chain -# such as 'discard', 'reject', 'hold', or 'accept'. -chain: hold +# The header value and regular expression are always matched +# case-insensitively. +header_checks: + +# The chain to jump to if any of the header patterns matches. This must be +# the name of an existing chain such as 'discard', 'reject', 'hold', or +# 'accept', otherwise 'hold' will be used. +jump_chain: hold [mta] |
