Sample Header Ad - 728x90

Why isn't Gnus scoring emails based on the To: or Cc: headers?

2 votes
0 answers
205 views
I use Gnus v5.13 in GNU Emacs 24.1.1 to read my email, and I'm having a trouble getting a simple score file to work. Essentially, I want any mail that's sent to (or copies) a particular email address to be given a higher score. My example score file, in ~/Mail/all.SCORE is: (("from" ("Mark Longair" 1000)) ("To" ("mark-scoretesting@example.org" 1000))) I'm making sure that that score file is being used by having added the following to my ~/.gnus file: (setq gnus-global-score-files '("~/Mail/all.SCORE")) And this does seem to work properly for the rule that matches the From line - matching messages are highlighted, and when I type VS in the summary buffer, it shows a score of 1000 for those messages. However, the "To" rule doesn't match. The [documentation here probably explains this when it says](http://www.gnu.org/software/emacs/manual/html_node/gnus/Score-File-Format.html) : > Scoring can only be performed on these eight headers: From, Subject, References, Message-ID, Xref, Lines, Chars and Date. [Other documentation](http://www.gnu.org/software/emacs/manual/html_node/gnus/Scoring-On-Other-Headers.html) , however, suggest that one can get around this limitation by the following steps: > Put the following in your ~/.gnus.el file. > (setq gnus-extra-headers '(To Cc Newsgroups Keywords) nnmail-extra-headers gnus-extra-headers) > Restart Gnus and rebuild your nnml overview files with the M-x nnml-generate-nov-databases command. This will take a long time if you have much mail. > Now you can score on ‘To’ and ‘Cc’ as “extra headers” like so: I e s p To RET RET. > > See? Simple. Unfortunately, it doesn't seem to be that simple. I've added the following to my .gnus file: (setq gnus-extra-headers '(To Cc) nnmail-extra-headers gnus-extra-headers) ... restarted Emacs, and I've run M-x nnml-generate-nov-databases, but the rule in my score file for the "To" line, still isn't working, even if I type V R to rescore the articles in my summary buffer. Can any suggest why this isn't working?
Asked by Mark Longair (121 rep)
Apr 9, 2013, 08:50 AM