]> granicus.if.org Git - mutt/commitdiff
Enable full address matching during message scoring. (closes #2179) (see #3243)
authorKevin McCarthy <kevin@8t8.us>
Wed, 22 Nov 2017 02:22:26 +0000 (18:22 -0800)
committerKevin McCarthy <kevin@8t8.us>
Wed, 22 Nov 2017 02:22:26 +0000 (18:22 -0800)
The tickets are old, but it seems reasonable to expect the pattern
matching to behave the same in scoring as when applying limits or
searching.

I don't foresee a huge performance hit, and there are no arguments
against the change in the tickets.

Thanks to the muttng devs (noted in ticket 2179) and Kornilios Kourtis
(from the Debian ticket referenced in ticket 3243).

score.c

diff --git a/score.c b/score.c
index f0716d2ad3fd6a407d0d65ca5fbe16d6f40376a7..1ac5e7419fcc92b3fccf3961d97a7e2d735d7cd8 100644 (file)
--- a/score.c
+++ b/score.c
@@ -136,7 +136,7 @@ void mutt_score_message (CONTEXT *ctx, HEADER *hdr, int upd_ctx)
   hdr->score = 0; /* in case of re-scoring */
   for (tmp = Score; tmp; tmp = tmp->next)
   {
-    if (mutt_pattern_exec (tmp->pat, 0, NULL, hdr, &cache) > 0)
+    if (mutt_pattern_exec (tmp->pat, MUTT_MATCH_FULL_ADDRESS, NULL, hdr, &cache) > 0)
     {
       if (tmp->exact || tmp->val == 9999 || tmp->val == -9999)
       {