How to display spam report in mail header?

Yunohost uses spamassassin to filter out spam, as many e-mail providers do as well. But in contrast to them, spamassassin’s spam report is missing in Yunohost’s email header of incoming mail. Is it possible to display information from spamassassin in the header, are there some settings?

I think of the following:

X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
        mydomain.com
X-Spam-Level: 
X-Spam-Status: No, score=-5.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
        DKIM_VALID_AU,DMARC_PASS,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS,
        URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Report: 
        * -0.1 DMARC_PASS DMARC check passed
        * -0.1 SPF_PASS SPF check passed
        * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/,
        *      high trust
        * -0.0 SPF_HELO_PASS SPF: HELO matches SPF record
        * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
        * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
        *      author's domain
        *  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
        *       valid
        *  0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was
        *      blocked.  See
        *      http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
        *      for more information.
X-Spam-Score: -5.3

YunoHost uses Rspamd, not spamassassin

According to rspamd’s doc, you can enable those headers with:

To enable extended spam headers in Milter headers module add the following line to local.d/milter_headers.conf:

extended_spam_headers = true;

3 Likes

Thanks a lot. I must have mixed up something. There was no milter_headers.conf file, so I created it by copying the contents on the site you referred to and now I can see the extended spam headers. Very useful for learning more about spam issues, thanks a lot!