Skip to content

bug report: rspamd X-Spam header not applied to spam message with score 9 #3804

@peterhirn

Description

@peterhirn

📝 Preliminary Checks

  • I tried searching for an existing issue and followed the debugging docs advice, but still need assistance.

👀 What Happened?

I'm trying to use MOVE_SPAM_TO_JUNK: 1

Receiving a mail with a rspamd score of 9.00, the X-Spam header is missing, therefore the mail was not moved to the junk folder.

The (default) dms configuration looks fine:

greylist = 4;
add_header = 6;
rewrite_subject = 7;
reject = 11;

headers of this message:

X-Spamd-Result: default: False [9.00 / 11.00];
	URIBL_BLACK(7.50)[intertecsolar.com:url];
	R_SPF_NA(1.50)[no SPF record];
	MIME_GOOD(-0.10)[multipart/alternative,text/plain];
	BAD_REP_POLICIES(0.10)[];
	MIME_TRACE(0.00)[0:+,1:+,2:~];
	RCVD_COUNT_ZERO(0.00)[0];
	RCPT_COUNT_ONE(0.00)[1];
	MISSING_XM_UA(0.00)[];
	ARC_NA(0.00)[];
	ASN(0.00)[asn:201579, ipnet:91.237.124.0/24, country:GB];
	MID_RHS_MATCH_FROMTLD(0.00)[];
	TO_DN_ALL(0.00)[];
	FROM_HAS_DN(0.00)[];
	R_DKIM_ALLOW(0.00)[extintoresmg.com:s=root];
	FROM_EQ_ENVFROM(0.00)[];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	DMARC_POLICY_ALLOW(0.00)[extintoresmg.com,reject];
	DKIM_TRACE(0.00)[extintoresmg.com:+]
X-Rspamd-Server: <redacted>
X-Rspamd-Action: rewrite subject
X-Rspamd-Queue-Id: DEF36C38C2

I'm still reading the rspamd documentation to figure out why this is happening.

What I'm thinking right now: maybe a higher score action disables the lower actions? In this case the score is 9, so rspamd skips greylist and add_header and jumps directly to rewrite_subject?

Update I just received a message with a score of 6.3 and the X-Spam header is set. I think my assumption above is correct. rewrite_subject action breaks MOVE_SPAM_TO_JUNK.

👟 Reproduction Steps

No response

🐋 DMS Version

v13.3.0

💻 Operating System and Architecture

Bookworm

⚙️ Container configuration files

environment:
      ONE_DIR: 1
      ENABLE_FAIL2BAN: 1
      ENABLE_RSPAMD: 1
      ENABLE_DNSBL: 1
      ENABLE_CLAMAV: 1
      ENABLE_OPENDKIM: 0
      ENABLE_OPENDMARC: 0
      ENABLE_POLICYD_SPF: 0
      ENABLE_AMAVIS: 0
      ENABLE_SPAMASSASSIN: 0
      SSL_TYPE: letsencrypt
      SSL_DOMAIN: ${HOSTNAME}
      POSTMASTER_ADDRESS: ${ADMIN_EMAIL}
      MOVE_SPAM_TO_JUNK: 1
      RSPAMD_LEARN: 1
      ENABLE_MTA_STS: 1

📜 Relevant log output

No response

Improvements to this form?

No response

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions