Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Mark Longair <mark-google@longair.net>
To: info-gnus-english@gnu.org
Subject: scoring emails based on the To and Cc headers
Date: Mon, 15 Apr 2013 01:43:44 -0700 (PDT)	[thread overview]
Message-ID: <f2f47b77-e88b-4b3a-91ff-1064f82f85ce@googlegroups.com> (raw)

(I originally asked this at unix.stackexchange.com but someone suggested
to me that it would be more sensible to ask in this group.)

I use Gnus v5.13 in GNU Emacs 24.1.1 to read my email, and I'm having
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"))

This does seem to work properly for the rule that matches the From
line - matching messages are highlighted, and when I type V S in the
summary buffer, it shows a score of 1000 for those messages.  However,
the "To" rule doesn't match.  I've seen in the documentation here:

  http://www.gnu.org/software/emacs/manual/html_node/gnus/Score-File-Format.html

... that "Scoring can only be performed on these eight headers: From,
Subject, References, Message-ID, Xref, Lines, Chars and Date", but
here:

  http://www.gnu.org/software/emacs/manual/html_node/gnus/Scoring-On-Other-Headers.html

... says that one can get around this limitation by adding the following
to .gnus:

     (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
           nnmail-extra-headers gnus-extra-headers)

... and then restarting Gnus and running M-x nnml-generate-nov-databases.

I've tried that (with just To and Cc), but the rule for the "To" line
still isn't working, even if I type V R to rescore the articles in my
summary buffer.

Could any possibly suggest how to get this to work?

Many thanks,
Mark

             reply	other threads:[~2013-04-15  8:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15  8:43 Mark Longair [this message]
2013-08-01 12:14 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2f47b77-e88b-4b3a-91ff-1064f82f85ce@googlegroups.com \
    --to=mark-google@longair.net \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).