1

My incoming mail is spam-filtered by Rspamd on the server. Thus, every mail contains a header like this:

X-Spamd-Result: default: False [3.86 / 9999.00];

The first of those two numbers is the spam score assigned by Rspamd (ignore the second number…) I would like for this number to be displayed as a column in the header view. I like to keep an eye on the spam scores to see if I need to readjust some of my filter rules.

I know I can basically add arbitrary functions to mu4e-header-info-custom. However, it seems like the function mu4e-message-field can only extract headers from the pre-parsed message plist. This plist does not contain the X-Spamd-Result header. It even looks like it does not contain a list of all headers, right? The documentation for mu4e-message-field-raw has an example of such a plist, and it only contains a :body-txt, not the full set of headers.

Is there any way of adding the spam score to the columns of the headers view?

2
  • Only a subset of headers are indexed, so what you're trying to do is not possible from mu, but I know you can query the path so I suspect you can use that to grep the score.
    – jagrg
    Dec 4 '20 at 19:14
  • Thanks, I actually did more of a deep dive into the mu code than I intended. The indexing is not the problem, it's just what mu server spits out in response to the (find …) query. I'm preparing a patch for that. Dec 4 '20 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.