The 'emergency' switch overrides all kind of list filters including spam
This is another issue with the default-posting-chain
. In the current order, the emergency
rule is right at the top, so it sends email to the hold
chain straight away.
I my use case, I have set the spam filtering to discard
in mailman.cfg
, so the emergency
switch sends those spam to the held messages. I suggest putting the emergency
below the nonmember-moderation
rule, which would give:
('approved', LinkAction.jump, 'accept'),
('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'),
# Check the emergency switch
('emergency', LinkAction.jump, 'hold'),
# Do all of the following before deciding whether to hold the message.
('administrivia', LinkAction.defer, None),
('implicit-dest', LinkAction.defer, None),
('max-recipients', LinkAction.defer, None),
('max-size', LinkAction.defer, None),
('news-moderation', LinkAction.defer, None),
('no-subject', LinkAction.defer, None),
('suspicious-header', LinkAction.defer, None),
# Now if any of the above hit, jump to the hold chain.
('any', LinkAction.jump, 'hold'),
# Finally, the builtin chain jumps to acceptance.
('truth', LinkAction.jump, 'accept'),
As a consequence, spam filtering would be respected, and if non-member posting were set to reject or discard, they would not be caught by the emergency rule, and not fill the held message queue.
The only possible downside I see, is that if member or non-member posting were set to accept
instead of defer
, then the emergency
rule would not be checked. However, that may also be the intended behavior, since setting member moderation to something else than defer
is advertised as an "action shortcut". (not in Postorius, but that must be fixed)
What do you think?