summaryrefslogtreecommitdiff
path: root/src/mailman/chains/builtin.py
diff options
context:
space:
mode:
authorBarry Warsaw2015-11-21 15:11:18 -0500
committerBarry Warsaw2015-11-21 15:11:18 -0500
commite9a522a4a9266c8f044b29c2c3075bd29d90cfc5 (patch)
tree0daab2d8dd5665d1de0642bded3c1024db6c1e5a /src/mailman/chains/builtin.py
parent9708493d1ad982895f4250c491a04a4f575310cf (diff)
parentb5c275ba33faf1c5aa988c2a229b3643c7851a26 (diff)
downloadmailman-e9a522a4a9266c8f044b29c2c3075bd29d90cfc5.tar.gz
mailman-e9a522a4a9266c8f044b29c2c3075bd29d90cfc5.tar.zst
mailman-e9a522a4a9266c8f044b29c2c3075bd29d90cfc5.zip
Reorder the default posting chain. Closes !60
The default posting chain has been modified so that the header-match chain and nonmember-moderation rule are processed before "hold" rules are processed. This allows for better anti-spam defenses and rejecting non-member posts instead of always holding them for moderator review. Given by Aurélien Bompard. (Closes #163)
Diffstat (limited to 'src/mailman/chains/builtin.py')
-rw-r--r--src/mailman/chains/builtin.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mailman/chains/builtin.py b/src/mailman/chains/builtin.py
index 4263750bb..da5a81aee 100644
--- a/src/mailman/chains/builtin.py
+++ b/src/mailman/chains/builtin.py
@@ -48,6 +48,10 @@ class BuiltInChain:
('loop', LinkAction.jump, 'discard'),
# Determine whether the member or nonmember has an action shortcut.
('member-moderation', LinkAction.jump, 'moderation'),
+ # Take a detour through the header matching chain.
+ ('truth', LinkAction.detour, 'header-match'),
+ # Check for nonmember moderation.
+ ('nonmember-moderation', LinkAction.jump, 'moderation'),
# Do all of the following before deciding whether to hold the message.
('administrivia', LinkAction.defer, None),
('implicit-dest', LinkAction.defer, None),
@@ -58,11 +62,6 @@ class BuiltInChain:
('suspicious-header', LinkAction.defer, None),
# Now if any of the above hit, jump to the hold chain.
('any', LinkAction.jump, 'hold'),
- # Take a detour through the header matching chain, which we'll create
- # later.
- ('truth', LinkAction.detour, 'header-match'),
- # Check for nonmember moderation.
- ('nonmember-moderation', LinkAction.jump, 'moderation'),
# Finally, the builtin chain jumps to acceptance.
('truth', LinkAction.jump, 'accept'),
)