How to fill mail header with detailed SpamAssassin X-SPAM-LEVEL score?

Fra

Well-Known Member
Dec 10, 2011
148
16
83
The mails we receive in our internal dovecot (coming from public facing Proxmox Mail Gateway) have only these two 'spam level' headers

```
X-Spamd-Bar: +
X-Spam-Level: *
X-Spam-Status: No, score=1.41
```
while in Pmg quarantine if I toggle raw in a mail I see in the header a very useful field: 'X-SPAM-LEVEL: Spam detection results'


```

X-SPAM-LEVEL: Spam detection results: 8
DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain
HTML_IMAGE_ONLY_08 1.781 HTML: images with 400-800 bytes of words
HTML_IMAGE_RATIO_02 0.001 HTML has a low ratio of text to image area
HTML_MESSAGE 0.001 HTML included in message
HTML_SHORT_LINK_IMG_1 0.139 HTML is very short with a linked image
KAM_IMAGEONLY 0.75 Email from a questionable TLD that contains primarily just an image
PDS_OTHER_BAD_TLD 1.997 Untrustworthy TLDs
SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record
T_SCC_BODY_TEXT_LINE -0.01 -
T_SPF_TEMPERROR 0.01 SPF: test of record failed (temperror)
T_TVD_MIME_EPI 0.01 -
URIBL_ABUSE_SURBL 1.948 Contains an URL listed in the ABUSE SURBL blocklist [free.hr]
URIBL_BLACK 1.7 Contains an URL listed in the URIBL blacklist [free.hr]
URIBL_RED 0.001 Contains an URL listed in the URIBL redlist [bederev.site]

```


How do we have that detailed X-SPAM-LEVEL: Spam detection results in the headers of the mail we read in Dovecot? I
 
  • Like
Reactions: Fra
yes, Stoiko, you are right, it is Spamd by IspConfig after the pmg:



cat /etc/rspamd/local.d/milter_headers.conf use = ["x-spamd-bar", "x-spam-level", "x-spam-status", "authentication-results", "remove-headers"]; authenticated_headers = ["authentication-results"]; routines { remove-headers { headers { "X-Spam" = 0; "X-Spamd-Bar" = 0; "X-Spam-Level" = 0; "X-Spam-Status" = 0; "X-Spam-Flag" = 0; } } }

Spamd reset the "X-Spam-Level" , so I should have so set it up to leave it
 
  • Like
Reactions: Stoiko Ivanov