Using Header filters
Hi,
I wonder if it is possible using the "Header filters" option to filter for a specific word to push the message to Moderation?
Best regards Mohsen Masoudfar Lead System Analyst, IT Operation American Association for the Advancement of Science 1200 New York Ave, NW, Washington, DC 20005 202-326-7087
On 8/13/21 10:55 AM, Mohsen Masoudfar wrote:
Hi,
I wonder if it is possible using the "Header filters" option to filter for a specific word to push the message to Moderation?
You can use Header filters to hold for moderation any messages that have
a header matching a pattern. The pattern match is unanchored and case
insensitive so for example to hold for moderation any message which
contains the string word
or Word
, etc. anywhere in the Subject: you
would create a Header Filter with Header = subject, Pattern = word and
Action = Hold for moderation.
If you want to match only the word word
and not things like foreword
and wordless
, you'd use a pattern like (^|\W)word(\W|$). See
<https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rules/docs/...>
and <https://docs.python.org/3/library/re.html>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 8/13/21 11:25 AM, Mark Sapiro wrote:
You can use Header filters to hold for moderation any messages that have a header matching a pattern.
I meant to add you can only match against headers including sub-part headers in multipart messages. You can't match against the message body.
You could use something like spamassassin in the mta with a rule to match against the message body and then use header filters in Mailman to look for that rule in the X-Spam-Status header.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
参加者 (2)
-
Mark Sapiro
-
Mohsen Masoudfar