Commit e9a522a4 authored by Barry Warsaw's avatar Barry Warsaw

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)
parents 9708493d b5c275ba
Pipeline #272606 passed with stage
......@@ -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'),
)
......
......@@ -83,6 +83,7 @@ built-in chain. No rules hit and so the message is accepted.
emergency
loop
member-moderation
nonmember-moderation
administrivia
implicit-dest
max-recipients
......@@ -90,7 +91,6 @@ built-in chain. No rules hit and so the message is accepted.
news-moderation
no-subject
suspicious-header
nonmember-moderation
However, when Anne's moderation action is set to `hold`, her post is held for
moderator approval.
......@@ -207,13 +207,6 @@ moderator approval.
emergency
loop
member-moderation
administrivia
implicit-dest
max-recipients
max-size
news-moderation
no-subject
suspicious-header
>>> nonmember = mlist.nonmembers.get_member('[email protected]')
>>> nonmember
......
......@@ -269,8 +269,8 @@ This message will end up in the `pipeline` queue.
Message-ID-Hash: 4CMWUN6BHVCMHMDAOSJZ2Q72G5M32MWB
X-Message-ID-Hash: 4CMWUN6BHVCMHMDAOSJZ2Q72G5M32MWB
X-Mailman-Rule-Misses: approved; emergency; loop; member-moderation;
administrivia; implicit-dest; max-recipients; max-size;
news-moderation; no-subject; suspicious-header; nonmember-moderation
nonmember-moderation; administrivia; implicit-dest; max-recipients;
max-size; news-moderation; no-subject; suspicious-header
<BLANKLINE>
An important message.
<BLANKLINE>
......
......@@ -77,6 +77,11 @@ Message handling
use a placeholder of the format `$<archiver-name>_url` to insert the
permalink to the message in the named archiver, for any archiver enabled
for the mailing list. Given by Abhilash Raj.
* 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)
REST
----
......
......@@ -129,8 +129,8 @@ Now the message is in the pipeline queue.
X-Message-ID-Hash: 4CMWUN6BHVCMHMDAOSJZ2Q72G5M32MWB
Date: ...
X-Mailman-Rule-Misses: approved; emergency; loop; member-moderation;
administrivia; implicit-dest; max-recipients; max-size;
news-moderation; no-subject; suspicious-header; nonmember-moderation
nonmember-moderation; administrivia; implicit-dest; max-recipients;
max-size; news-moderation; no-subject; suspicious-header
<BLANKLINE>
First post!
<BLANKLINE>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment