Turns out to be quite simple:

(defun mark-spam (msg ignore)
  "Mark messages flagged as spam."
  (with-current-buffer (find-file-noselect (mu4e-message-field msg :path))
    (goto-char (point-min))
    (if (re-search-forward "^X-Spam-Flag: \\(.*\\)" nil t 1)
(string= (downcase (match-string 1)) "yes")
      nil)))

(add-to-list 'mu4e-headers-custom-markers
     '("Spam" mark-spam))

-- 
You received this message because you are subscribed to the Google Groups 
"mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to