diff options
| author | Barry Warsaw | 2008-01-26 18:35:18 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2008-01-26 18:35:18 -0500 |
| commit | 3952c95a23a74b8686b55a3a4f1873238e6d6610 (patch) | |
| tree | c994bb588b94da2eac9d851a7da4400861dee25a /Mailman/Defaults.py | |
| parent | df637148d8fa2d5c101a990ee6766ea8547f000a (diff) | |
| download | mailman-3952c95a23a74b8686b55a3a4f1873238e6d6610.tar.gz mailman-3952c95a23a74b8686b55a3a4f1873238e6d6610.tar.zst mailman-3952c95a23a74b8686b55a3a4f1873238e6d6610.zip | |
Port header matching previously described by the misnamed KNONW_SPAMMERS
variable to the new chain processing system. Create a header-matching chain
which handles global site header matching rules defined by HEADER_MATCHES.
Rip this logic out of the SpamDetect handler; really this entire handler needs
to go away but the rest of it isn't ported yet.
IChains now have a get_rule() method which allows them to return private
(i.e. not globally registered) rules. This is used by the header matching
chain.
Mailman.app.chains.process() has had its parameter list reordered to be more
like all other function signatures that take a mailing list, message, and
message metadata.
Diffstat (limited to 'Mailman/Defaults.py')
| -rw-r--r-- | Mailman/Defaults.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Mailman/Defaults.py b/Mailman/Defaults.py index 75e1c768f..82fb6886f 100644 --- a/Mailman/Defaults.py +++ b/Mailman/Defaults.py @@ -164,16 +164,21 @@ DEFAULT_URL_HOST = '@URLHOST@' # Spam avoidance defaults ##### -# This variable contains a list of 2-tuple of the format (header, regex) which -# the Mailman/Handlers/SpamDetect.py module uses to match against the current -# message. If the regex matches the given header in the current message, then -# it is flagged as spam. header is case-insensitive and should not include -# the trailing colon. regex is always matched with re.IGNORECASE. +# This variable contains a list of tuple of the format: # -# Note that the more searching done, the slower the whole process gets. Spam -# detection is run against all messages coming to either the list, or the -# -owners address, unless the message is explicitly approved. -KNOWN_SPAMMERS = [] +# (header, pattern[, chain]) +# +# which is used to match against the current message's headers. If the +# pattern matches the given header in the current message, then the named +# chain is jumped to. header is case-insensitive and should not include the +# trailing colon. pattern is always matched with re.IGNORECASE. chain is +# optional; if not given the 'hold' chain is used, but if given it may be any +# existing chain, such as 'discard', 'reject', or 'accept'. +# +# Note that the more searching done, the slower the whole process gets. +# Header matching is run against all messages coming to either the list, or +# the -owners address, unless the message is explicitly approved. +HEADER_MATCHES = [] |
