Skip to Content.
Sympa Menu

en - Re: [en@sympa] Forwarding spam to moderators

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün <address@concealed>
  • To: address@concealed
  • Subject: Re: [en@sympa] Forwarding spam to moderators
  • Date: Tue, 12 Dec 2023 07:59:22 +0100

Hi Terry,

You should set the following sympa.conf parameters :

## antispam_tag_header_name
#   Header field to tag spams
#   If a spam filter (like spamassassin or j-chkmail) add a header field to tag
#   spams, name of this header field (example X-Spam-Status)
antispam_tag_header_name        X-Spam-Status

## antispam_tag_header_spam_regexp
#   Regular _expression_ to check header field to tag spams
#   Regular _expression_ applied on this header to verify message is a spam
#   (example Yes)
antispam_tag_header_spam_regexp ^\s*Yes

## antispam_tag_header_ham_regexp
#   Regular _expression_ to determine spam or ham.
#   Regular _expression_ applied on this header field to verify message is NOT a
#   spam (example No)
antispam_tag_header_ham_regexp  ^\s*No

## spam_status
#   Name of header field to inform
#   Messages are supposed to be filtered by an spam filter that adds them one
#   or more headers. This parameter is used to select a special scenario in
#   order to decide the message''s spam status: ham, spam or unsure. This
#   parameter replaces antispam_tag_header_name,
#   antispam_tag_header_spam_regexp and antispam_tag_header_ham_regexp.
spam_status     x-spam-status

Because we have other SMTP headers for tagging spam messages, I also have a etc/scenari/include.send.header that gets automaticaly included for each list :

equal([msg_header->X-Spam-Status],"Yes") smtp -> editorkey
equal([msg_header->X-UCE-Status],"YES") smtp -> editorkey

This include.send.header is also a nice place where I can block messages from a given email address or domain like this :

match([msg_header->Received],/by emkei.cz/) smtp -> request_auth


Le 11/12/2023 à 19:39, Terry McLaren a écrit :
digging a bit deeper it looks like you can key on a simple header tag:

match([header->X-Spam],/Yes/)           smtp,dkim,smime,md5 -> editorkey,quiet

Add this to your send scenario above the true() statement and if the header tag x-spam is yes, it should get routed to the moderators before the subscriber group.

Hope this helps,

Terry McLaren

On Sun, Dec 10, 2023 at 3:43 AM Carsten Aulbert <address@concealed> wrote:
Hi all,

sorry for this seemingly stupid question but I'm a bit lost as I don't
find much about this in the documentation (or looked at the wrong places).

I've got a mail server with spam detection running which forwards emails
to sympa (currently at 6.2.60 - Debian bullseye). The headers already
contain very clear indications that this email is spam:

X-Spam-Status: No, score=31.96
X-Spam-Level: *********
X-Spamd-Bar: +++++++++
X-Spam: Yes

But how do I change the list config to forward those to the moderator(s)?

I found a few issues on github discussing this (from 2020) but I'm not
even sure if I only need to enable "spam_status" in sympa.conf or
whether this is just "sugar" on top?

https://github.com/sympa-community/sympa/issues/849 talks about custom
matches and

"
match([msg->spam_status], /spam/)   smtp,dkim,md5,smime   ->
editorkey,quiet
"

looks like something which ought to work for me, but how do I configure
it setting spam if the score is larger than say 4.0?

Sorry for this probably rookie question, I thought I understood sympa
better after all these years ;-).

Cheers and thanks a lot in advance

Carsten
-- 
Olivier Salaün
DSI / pôle SI / équipe SNUM
Tel : 02 23 23 74 54



Archive powered by MHonArc 2.6.19+.

Top of Page