Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found] <mailman.3558.1454557630.843.info-gnus-english@gnu.org>
@ 2016-02-07  3:50 ` Lars Ingebrigtsen
  2016-02-07  4:39   ` Emanuel Berg
                     ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-07  3:50 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> How do I automatically kill mails that are
>
>     X-Spam-Flag: YES
>
> ?
>
> I tried
>
>     (gnus-kill "X-Spam-Flag" "YES" '(gnus-summary-mark-as-read nil "X") t)
>
> in my KILL file but it won't evaluate.

I would guess that that header isn't included in the ones that are
available when killing and scoring takes place.  See
nnmail-extra-headers and gnus-extra-headers.

I would also recommend using scoring instead of killing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-07  3:50 ` auto-kill mails with "X-Spam-Flag: YES" Lars Ingebrigtsen
@ 2016-02-07  4:39   ` Emanuel Berg
       [not found]   ` <mailman.3850.1454819959.843.info-gnus-english@gnu.org>
  2016-02-08  1:27   ` Emanuel Berg
  2 siblings, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-07  4:39 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I would also recommend using scoring instead
> of killing.

OK, I did this:

    (setq gnus-extra-headers '(To Cc Keywords Gcc Newsgroups X-Spam-Flag))

And in ~/News/nnml:mail.misc.SCORE

    (("extra"
      ("YES" -1000 nil e "X-Spam-Flag")))

But still with `V t' it says

    No score rules apply to the current article (default score 0).

even tho that file has

    X-Spam-Flag: YES

Do I have to enable scoring explicitly?

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found]   ` <mailman.3850.1454819959.843.info-gnus-english@gnu.org>
@ 2016-02-07  4:44     ` Lars Ingebrigtsen
  2016-02-07  5:01       ` Emanuel Berg
       [not found]       ` <mailman.3852.1454821323.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-07  4:44 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> I would also recommend using scoring instead
>> of killing.
>
> OK, I did this:
>
>     (setq gnus-extra-headers '(To Cc Keywords Gcc Newsgroups X-Spam-Flag))

Did you also tweak nnmail-extra-headers?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-07  4:44     ` Lars Ingebrigtsen
@ 2016-02-07  5:01       ` Emanuel Berg
       [not found]       ` <mailman.3852.1454821323.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-07  5:01 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

>>> I would also recommend using scoring instead
>>> of killing.
>>
>> OK, I did this:
>> (setq gnus-extra-headers '(To Cc Keywords Gcc Newsgroups X-Spam-Flag))
>
> Did you also tweak nnmail-extra-headers?

You are right I didn't do that, and there is an
interesting reason why, because when I first set up
the rule it said the X-Spam-Flag header wasn't there,
so I change the `gnus-extra-headers', and it
didn't complain!

Anyway changing `nnmail-extra-headers' didn't work but
is now done.

Scoring in general works tho and I agree conceptually
it seems infinitely better than killing (almost).

So the first entry here works as intended, the second
isn't applied for some reason.

(("subject"
  ("Prova min röv!" -1000 nil e))
 ("extra"
  ("YES" -1000 nil e "X-Spam-Flag"))
 (mark-and-expunge -999)
 )

-- 
underground experts united
http://user.it.uu.se/~embe8573


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found]       ` <mailman.3852.1454821323.843.info-gnus-english@gnu.org>
@ 2016-02-07  5:23         ` Lars Ingebrigtsen
  2016-02-08  0:48           ` Emanuel Berg
       [not found]           ` <mailman.3977.1454892539.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-07  5:23 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

>   ("YES" -1000 nil e "X-Spam-Flag"))
>  (mark-and-expunge -999)
>  )

I don't have X-Spam-Flag in my extra headers, but I have To.  If I score
on that, it works as expected:

(("extra"
  ("larsi@gnus.org" nil nil s "To")))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-07  5:23         ` Lars Ingebrigtsen
@ 2016-02-08  0:48           ` Emanuel Berg
       [not found]           ` <mailman.3977.1454892539.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-08  0:48 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I don't have X-Spam-Flag in my extra headers, but
> I have To. If I score on that, it works as expected:
>
> (("extra" ("larsi@gnus.org" nil nil s "To")))

That works for me too but not so any header I try to
add, e.g. Subject.

Because the rest of scoring works, this is not an
issue for me as I can get rid of them posts in other
ways. So I'm just saying.

By the way, is it recommended you use scoring to
remove duplicate from Gmane groups as well?
Which I have so far done with splitting:

(setq nnmail-split-methods
      '(
        ("mail.ml-ooa" "\\(To\\|Cc\\):.*\\(help-gnu-emacs@gnu.org\\|gnuplot-info@lists.sourceforge.net\\)")
        ("mail.misc"   "")) )

With scoring, does the unwanted stuff always turn up
as "unread messages" in the Group buffer before they
are expunged upon selecting a group? Or can it be done
completely transparently?

If not perhaps I'll stick to splitting.

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-07  3:50 ` auto-kill mails with "X-Spam-Flag: YES" Lars Ingebrigtsen
  2016-02-07  4:39   ` Emanuel Berg
       [not found]   ` <mailman.3850.1454819959.843.info-gnus-english@gnu.org>
@ 2016-02-08  1:27   ` Emanuel Berg
  2 siblings, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-08  1:27 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I would also recommend using scoring instead
> of killing.

I want to emphasize my total agreement with this to
anyone reading this still using the KILL system.

With minimal effort I've now setup the scoring system
to do exactly what some one hundred lines of creative
Elisp was (barely) able to do with the KILL system.

Ironically, it felt good writing all that Elisp, but
not as good as it feels now throwing it away :)

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found]           ` <mailman.3977.1454892539.843.info-gnus-english@gnu.org>
@ 2016-02-08  4:48             ` Lars Ingebrigtsen
  2016-02-08 22:52               ` Emanuel Berg
       [not found]               ` <mailman.4132.1454971965.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-08  4:48 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> I don't have X-Spam-Flag in my extra headers, but
>> I have To. If I score on that, it works as expected:
>>
>> (("extra" ("larsi@gnus.org" nil nil s "To")))
>
> That works for me too but not so any header I try to
> add, e.g. Subject.

Well, Subject isn't one of the "extra" headers.  But it should work for
all the extra headers that you put in both those two variables
mentioned...

I saw that you had an "exact" match instead of a substring match, so
perhaps the X-Spam-Flag wasn't exactly "YES"?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-08  4:48             ` Lars Ingebrigtsen
@ 2016-02-08 22:52               ` Emanuel Berg
       [not found]               ` <mailman.4132.1454971965.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-08 22:52 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Well, Subject isn't one of the "extra" headers.
> But it should work for all the extra headers that
> you put in both those two variables mentioned...

I use the interactive system and do not edit the file
by hand (yet). So without Subject being in

    (setq gnus-extra-headers   '(To Cc Keywords Gcc Newsgroups X-Spam-Flag Subject)
          nnmail-extra-headers gnus-extra-headers)

it says it isn't there.

> I saw that you had an "exact" match instead of
> a substring match, so perhaps the X-Spam-Flag wasn't
> exactly "YES"?

It is exactly "YES" unless there are whitespaces,
newlines and such to consider. Anyway it is the same
situation with a substring match:

    (("extra"
      ("Hej" -1000 nil s "Subject")
      ("YES" -1000 nil s "X-Spam-Flag"))
      ... )

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found]               ` <mailman.4132.1454971965.843.info-gnus-english@gnu.org>
@ 2016-02-08 23:39                 ` Lars Ingebrigtsen
  2016-02-09  2:26                   ` Emanuel Berg
       [not found]                   ` <mailman.4158.1454984781.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-08 23:39 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> I use the interactive system and do not edit the file
> by hand (yet). So without Subject being in
>
>     (setq gnus-extra-headers   '(To Cc Keywords Gcc Newsgroups X-Spam-Flag Subject)
>           nnmail-extra-headers gnus-extra-headers)
>
> it says it isn't there.

I kinda doubt you can add one of the non-extra headers to the extra list
and have it work.

> It is exactly "YES" unless there are whitespaces,
> newlines and such to consider. Anyway it is the same
> situation with a substring match:
>
>     (("extra"
>       ("Hej" -1000 nil s "Subject")
>       ("YES" -1000 nil s "X-Spam-Flag"))
>       ... )

Could you try edebugging though gnus-score-string and see why this
doesn't work?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-08 23:39                 ` Lars Ingebrigtsen
@ 2016-02-09  2:26                   ` Emanuel Berg
       [not found]                   ` <mailman.4158.1454984781.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-09  2:26 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> I use the interactive system and do not edit the
>> file by hand (yet). So without Subject being in
>> (setq gnus-extra-headers '(To Cc Keywords Gcc
>> Newsgroups X-Spam-Flag Subject)
>> nnmail-extra-headers gnus-extra-headers) it says it
>> isn't there.
>
> I kinda doubt you can add one of the non-extra
> headers to the extra list and have it work.

... ?

How should it be done then?

> Could you try edebugging though gnus-score-string
> and see why this doesn't work?

Is there anything in particular I should look for?

With this score rule:

(("extra"
  ("YES" -1000 nil e "X-Spam-Flag")))

in an nnml group which contains a single message with

    X-Spam-Flag: YES

Edebug says:

    Result: "extra"

    Result: (("number" 0 gnus-score-integer) ("subject" 1 gnus-score-string) ("from" 2 gnus-score-string) ("date" 3 gnus-score-date) ("message-id" 4 gnus-score-string) ("references" 5 gnus-score-string) ("chars" 6 gnus-score-integer) ("lines" 7 gnus-score-integer) ("xref" 8 gnus-score-string) ("extra" 9 gnus-score-string) ("head" -1 gnus-score-body) ("body" -1 gnus-score-body) ("all" -1 gnus-score-body) ("followup" 2 gnus-score-followup) ("thread" 5 gnus-score-thread))

    Result: ("extra" 9 gnus-score-string)

    Result: 9 (#o11, #x9, ?\C-i)

    Result: nil

    Result: nil

    Result: 9 (#o11, #x9, ?\C-i)

    Result: t

    Result: (([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0))

    Result: (([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0))

    Result: (([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0))

    Result: (([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0))

    Result: nil

    Result: (([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0))

    Result: (([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0))

    Result: ([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0)

    Result: ([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0)

    Result: ([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0)

    Result: [1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))]

    Result: 9 (#o11, #x9, ?\C-i)

    Result: ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))

    Result: ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))

    Result: 9 (#o11, #x9, ?\C-i)

    Result: t

    Result: ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))

    Result: "((To . \"<embe8573@student.uu.se>\") (X-Spam-Flag . \"YES\") (Subject . \"=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?=\"))"

    Result: "((To . \"<embe8573@student.uu.se>\") (X-Spam-Flag . \"YES\") (Subject . \"=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?=\"))"

    Result: "((To . \"<embe8573@student.uu.se>\") (X-Spam-Flag . \"YES\") (Subject . \"=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?=\"))"

    Result: nil

    Result: nil

    Result: nil

    Result: "((To . \"<embe8573@student.uu.se>\") (X-Spam-Flag . \"YES\") (Subject . \"=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?=\"))"

    Result: nil

    Result: nil

    Result: nil

    Result: ([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0)

    Result: (([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0))

    Result: "((To . \"<embe8573@student.uu.se>\") (X-Spam-Flag . \"YES\") (Subject . \"=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?=\"))"

    Result: "((To . \"<embe8573@student.uu.se>\") (X-Spam-Flag . \"YES\") (Subject . \"=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?=\"))"

    Result: "((To . \"<embe8573@student.uu.se>\") (X-Spam-Flag . \"YES\") (Subject . \"=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?=\"))"

    Result: nil

    Result: nil

    Result: nil

    Result: nil

    Result: nil

    Result: "((To . \"<embe8573@student.uu.se>\") (X-Spam-Flag . \"YES\") (Subject . \"=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?=\"))"

    Result: "((To . \"<embe8573@student.uu.se>\") (X-Spam-Flag . \"YES\") (Subject . \"=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?=\"))"

    Result: nil

    Result: 106 (#o152, #x6a, ?j)

    Result: 105 (#o151, #x69, ?i)

    Result: 106 (#o152, #x6a, ?j)

    Result: (([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0))

    Result: nil

    Result: nil

    Result: (((touched nil) ("extra" ("YES" -1000 nil e "X-Spam-Flag"))))

    Result: (((touched nil) ("extra" ("YES" -1000 nil e "X-Spam-Flag"))))

    Result: (((touched nil) ("extra" ("YES" -1000 nil e "X-Spam-Flag"))))

    Result: ((touched nil) ("extra" ("YES" -1000 nil e "X-Spam-Flag")))

    Result: "extra"

    Result: ((touched nil) ("extra" ("YES" -1000 nil e "X-Spam-Flag")))

    Result: ("extra" ("YES" -1000 nil e "X-Spam-Flag"))

    Result: ("extra" ("YES" -1000 nil e "X-Spam-Flag"))

    Result: ("extra" ("YES" -1000 nil e "X-Spam-Flag"))

    Result: (("YES" -1000 nil e "X-Spam-Flag"))

    Result: ("extra" ("YES" -1000 nil e "X-Spam-Flag"))

    Result: ("YES" -1000 nil e "X-Spam-Flag")

    Result: ("YES" -1000 nil e "X-Spam-Flag")

    Result: e

    Result: e

    Result: ("YES" -1000 nil e "X-Spam-Flag")

    Result: -1000 (#o377777777777777776030, #x3ffffffffffffc18)

    Result: -1000 (#o377777777777777776030, #x3ffffffffffffc18)

    Result: ("YES" -1000 nil e "X-Spam-Flag")

    Result: nil

    Result: ("YES" -1000 nil e "X-Spam-Flag")

    Result: "X-Spam-Flag"

    Result: e

    Result: "e"

    Result: 101 (#o145, #x65, ?e)

    Result: 101 (#o145, #x65, ?e)

    Result: nil

    Result: t

    Result: 101 (#o145, #x65, ?e)

    Result: 101 (#o145, #x65, ?e)

    Result: nil

    Result: nil

    Result: ("YES" -1000 nil e "X-Spam-Flag")

    Result: "YES"

    Result: "YES"

    Result: 101 (#o145, #x65, ?e)

    Result: nil

    Result: 101 (#o145, #x65, ?e)

    Result: t

    Result: t

    Result: search-forward

    Result: "X-Spam-Flag"

    Result: "X-Spam-Flag"

    Result: search-forward

    Result: nil

    Result: "YES"

    Result: "YES"

    Result: "YES"

    Result: "[ (](X-Spam-Flag \\. \"\\([^\"]*\\\\\"\\)*[^\"]*YES\\([^\"]*\\\\\"\\)*[^\"]*\")[ )]"

    Result: re-search-forward

    Result: re-search-forward

    Result: 101 (#o145, #x65, ?e)

    Result: nil

    Result: 101 (#o145, #x65, ?e)

    Result: nil

    Result: 101 (#o145, #x65, ?e)

    Result: t

    Result: 1 (#o1, #x1, ?\C-a)

    Result: 1 (#o1, #x1, ?\C-a)

    Result: nil

    Result: t

    Result: re-search-forward

    Result: "[ (](X-Spam-Flag \\. \"\\([^\"]*\\\\\"\\)*[^\"]*YES\\([^\"]*\\\\\"\\)*[^\"]*\")[ )]"

    Result: 58 (#o72, #x3a, ?:)

    Result: 58 (#o72, #x3a, ?:)

    Result: nil

    Result: nil

    Result: 0 (#o0, #x0, ?\C-@)

    Result: t

    Result: nil

    Result: nil

    Result: nil

    Result: nil

    Result: nil

    Result: t

    Result: ("extra" ("YES" -1000 nil e "X-Spam-Flag"))

    Result: (("YES" -1000 nil e "X-Spam-Flag"))

    Result: (("YES" -1000 nil e "X-Spam-Flag"))

    Result: (("YES" -1000 nil e "X-Spam-Flag"))

    Result: (("YES" -1000 nil e "X-Spam-Flag"))

    Result: (("YES" -1000 nil e "X-Spam-Flag"))

    Result: (("YES" -1000 nil e "X-Spam-Flag"))

    Result: (("YES" -1000 nil e "X-Spam-Flag"))

    Result: nil

    Result: nil

    Result: nil

    Result: nil

    Result: nil

    Result: nil

    Result: nil

    Result: nil

    Result: nil

-- 
underground experts united
http://user.it.uu.se/~embe8573


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found]                   ` <mailman.4158.1454984781.843.info-gnus-english@gnu.org>
@ 2016-02-09 23:47                     ` Lars Ingebrigtsen
  2016-02-10  0:50                       ` Emanuel Berg
       [not found]                       ` <mailman.4270.1455065439.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-09 23:47 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>>> I use the interactive system and do not edit the
>>> file by hand (yet). So without Subject being in
>>> (setq gnus-extra-headers '(To Cc Keywords Gcc
>>> Newsgroups X-Spam-Flag Subject)
>>> nnmail-extra-headers gnus-extra-headers) it says it
>>> isn't there.
>>
>> I kinda doubt you can add one of the non-extra
>> headers to the extra list and have it work.
>
> ... ?
>
> How should it be done then?

To score on "Subject" you have to use subject scoring, not extra
scoring.  I think.

>> Could you try edebugging though gnus-score-string
>> and see why this doesn't work?
>
> Is there anything in particular I should look for?

[...]

>     Result: (([1 "Min fitta våt" "<embe8573@student.uu.se>" "5 Feb 2016 21:24:06 +0700" "<002d01d16022$0403d4be$66273a8e$@student.uu.se>" "" 1143 41 "debian.uxu mail.ooa:1" ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))] . 0))

So the X-Spam-Flag is definitely in the data we're using to score...
Oh, and the Subject, too.  :-)

>     Result: ("YES" -1000 nil e "X-Spam-Flag")
>
>     Result: -1000 (#o377777777777777776030, #x3ffffffffffffc18)
>
>     Result: -1000 (#o377777777777777776030, #x3ffffffffffffc18)
>
>     Result: ("YES" -1000 nil e "X-Spam-Flag")

And this kinda seems to imply that it's finding a match?

>     Result: "[ (](X-Spam-Flag \\. \"\\([^\"]*\\\\\"\\)*[^\"]*YES\\([^\"]*\\\\\"\\)*[^\"]*\")[ )]"
>
>     Result: re-search-forward
>
>     Result: re-search-forward
>
>     Result: 101 (#o145, #x65, ?e)
>
>     Result: nil

What's in the scoring buffer at this point?  It looks like it's this
search that's failing...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-09 23:47                     ` Lars Ingebrigtsen
@ 2016-02-10  0:50                       ` Emanuel Berg
       [not found]                       ` <mailman.4270.1455065439.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-10  0:50 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

> To score on "Subject" you have to use subject
> scoring, not extra scoring. I think. [...] Oh, and
> the Subject, too. :-)

Aha, now I see what you mean. Yes, I added that
thinking perhaps the "extra" would work on a less
radical header than X-Spam-Flag. But that wasn't the
issue. I understand that if you want to do stuff on
Subject, you should use the built-in way which is
optimized and/or has specific options. I take it the
whole "extra" stuff is so not every header has to
be examined.

>> Result: "[ (](X-Spam-Flag \\.
>> \"\\([^\"]*\\\\\"\\)*[^\"]*YES\\([^\"]*\\\\\"\\)*[^\"]*\")[
>> )]"
>> Result: re-search-forward
>> Result: re-search-forward
>> Result: 101 (#o145, #x65, ?e)
>> Result: nil
>
> What's in the scoring buffer at this point? It looks
> like it's this search that's failing...

If you mean the *Score Trace*, then "No score rules
apply to the current article (default score 0)."

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found]                       ` <mailman.4270.1455065439.843.info-gnus-english@gnu.org>
@ 2016-02-10  3:04                         ` Lars Ingebrigtsen
  2016-02-11  0:50                           ` Emanuel Berg
       [not found]                           ` <mailman.4358.1455151881.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-10  3:04 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

>>> Result: "[ (](X-Spam-Flag \\.
>>> \"\\([^\"]*\\\\\"\\)*[^\"]*YES\\([^\"]*\\\\\"\\)*[^\"]*\")[
>>> )]"
>>> Result: re-search-forward
>>> Result: re-search-forward
>>> Result: 101 (#o145, #x65, ?e)
>>> Result: nil
>>
>> What's in the scoring buffer at this point? It looks
>> like it's this search that's failing...
>
> If you mean the *Score Trace*, then "No score rules
> apply to the current article (default score 0)."

No, in the buffer where the scoring takes place.  I think that's
possibly in the *Headers* buffer...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-10  3:04                         ` Lars Ingebrigtsen
@ 2016-02-11  0:50                           ` Emanuel Berg
       [not found]                           ` <mailman.4358.1455151881.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-11  0:50 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> If you mean the *Score Trace*, then "No score rules
>> apply to the current article (default score 0)."
>
> No, in the buffer where the scoring takes place.
> I think that's possibly in the *Headers* buffer...

I think that's impossibly so!

But in Gnus v5.13, when the debugger is at line 2085
in gnus-score.el, in `gnus-score-string', *Headers*
contains:

    ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))

After that *Headers* doesn't change until the function
is done.

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found]                           ` <mailman.4358.1455151881.843.info-gnus-english@gnu.org>
@ 2016-02-11  4:01                             ` Lars Ingebrigtsen
  2016-02-17  0:38                               ` Emanuel Berg
       [not found]                               ` <mailman.4888.1455669521.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-11  4:01 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> But in Gnus v5.13, when the debugger is at line 2085
> in gnus-score.el, in `gnus-score-string', *Headers*
> contains:
>
>     ((To . "<embe8573@student.uu.se>") (X-Spam-Flag . "YES") (Subject
> . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))
>
> After that *Headers* doesn't change until the function
> is done.

Geez, the call sequence there is hard to follow...  hm...  Well, while
debugging, I think the edebug-outside-buffer variable should tell you
what buffer all this is taking place in?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-11  4:01                             ` Lars Ingebrigtsen
@ 2016-02-17  0:38                               ` Emanuel Berg
       [not found]                               ` <mailman.4888.1455669521.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-17  0:38 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> But in Gnus v5.13, when the debugger is at line
>> 2085 in gnus-score.el, in `gnus-score-string',
>> *Headers* contains: ((To .
>> "<embe8573@student.uu.se>") (X-Spam-Flag . "YES")
>> (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))
>> After that *Headers* doesn't change until the
>> function is done.
>
> Geez, the call sequence there is hard to follow...
> hm... Well, while debugging, I think the
> edebug-outside-buffer variable should tell you what
> buffer all this is taking place in?

`edebug-outside-buffer' is

    #<buffer *Headers*>

from start to finish of `gnus-score-string'.

By the way, I just tried

    (gnus-kill "X-Spam-Flag" "YES" '(gnus-summary-mark-as-read nil "X") t)

and it worked!

So perhaps killing isn't that bad after all :)_

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found]                               ` <mailman.4888.1455669521.843.info-gnus-english@gnu.org>
@ 2016-02-20  8:34                                 ` Lars Ingebrigtsen
  2016-02-21  0:44                                   ` Emanuel Berg
       [not found]                                   ` <mailman.5253.1456015518.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-20  8:34 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>>> But in Gnus v5.13, when the debugger is at line
>>> 2085 in gnus-score.el, in `gnus-score-string',
>>> *Headers* contains: ((To .
>>> "<embe8573@student.uu.se>") (X-Spam-Flag . "YES")
>>> (Subject . "=?utf-8?B?TWluIGZpdHRhIHbDpXQ=?="))
>>> After that *Headers* doesn't change until the
>>> function is done.
>>
>> Geez, the call sequence there is hard to follow...
>> hm... Well, while debugging, I think the
>> edebug-outside-buffer variable should tell you what
>> buffer all this is taking place in?
>
> `edebug-outside-buffer' is
>
>     #<buffer *Headers*>

Hm.  Then that can't be the correct buffer.  Does anybody know of a way
to make edebug tell you what buffer it's currently in?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-20  8:34                                 ` Lars Ingebrigtsen
@ 2016-02-21  0:44                                   ` Emanuel Berg
       [not found]                                   ` <mailman.5253.1456015518.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-21  0:44 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

>>> Geez, the call sequence there is hard to follow...
>>> hm... Well, while debugging, I think the
>>> edebug-outside-buffer variable should tell you what
>>> buffer all this is taking place in?
>>
>> `edebug-outside-buffer' is
>> #<buffer *Headers*>
>
> Hm. Then that can't be the correct buffer.
> Does anybody know of a way to make edebug tell you
> what buffer it's currently in?

What do you mean in what buffer it is in?

Is this the code that doesn't work? (lines 2079-2086 in
gnus-score.el, Gnus v5.13)

	  ;; Evil hackery to make match usable in non-standard headers.
	  (when extra
	    (setq match (concat "[ (](" extra " \\. \"\\([^\"]*\\\\\"\\)*[^\"]*"
				(if (eq search-func 're-search-forward)
				    match
				  (regexp-quote match))
				"\\([^\"]*\\\\\"\\)*[^\"]*\")[ )]")
		  search-func 're-search-forward)) ; XXX danger?!?

What should happen, that doesn't?

What does "XXX danger" mean?

Perhaps the "evil hackery" should be removed to have
the code more palatable :)

By the way, still no one replicated this problem.
Someone other than me should try do downscore with
extra headers and

    X-Spam-Flag: YES

That way we know where to look for the problem.

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
       [not found]                                   ` <mailman.5253.1456015518.843.info-gnus-english@gnu.org>
@ 2016-02-21  2:43                                     ` Lars Ingebrigtsen
  2016-02-21  3:29                                       ` Emanuel Berg
  0 siblings, 1 reply; 22+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-21  2:43 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

>> Hm. Then that can't be the correct buffer.
>> Does anybody know of a way to make edebug tell you
>> what buffer it's currently in?
>
> What do you mean in what buffer it is in?

All evaluation in Emacs happens in a buffer.  There is probably a
command in edebug that lets you know what that buffer is...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: auto-kill mails with "X-Spam-Flag: YES"
  2016-02-21  2:43                                     ` Lars Ingebrigtsen
@ 2016-02-21  3:29                                       ` Emanuel Berg
  0 siblings, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-21  3:29 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

>>> Hm. Then that can't be the correct buffer.
>> Does anybody know of a way to make edebug tell you
>> what buffer it's currently in? What do you mean in
>> what buffer it is in?
>
> All evaluation in Emacs happens in a buffer.
> There is probably a command in edebug that lets you
> know what that buffer is...

Maybe (the variable) `edebug-eval-buffer'?

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

* auto-kill mails with "X-Spam-Flag: YES"
@ 2016-02-04  3:46 Emanuel Berg
  0 siblings, 0 replies; 22+ messages in thread
From: Emanuel Berg @ 2016-02-04  3:46 UTC (permalink / raw)
  To: info-gnus-english

How do I automatically kill mails that are

    X-Spam-Flag: YES

?

I tried

    (gnus-kill "X-Spam-Flag" "YES" '(gnus-summary-mark-as-read nil "X") t)

in my KILL file but it won't evaluate.

-- 
underground experts united
http://user.it.uu.se/~embe8573



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-02-21  3:29 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.3558.1454557630.843.info-gnus-english@gnu.org>
2016-02-07  3:50 ` auto-kill mails with "X-Spam-Flag: YES" Lars Ingebrigtsen
2016-02-07  4:39   ` Emanuel Berg
     [not found]   ` <mailman.3850.1454819959.843.info-gnus-english@gnu.org>
2016-02-07  4:44     ` Lars Ingebrigtsen
2016-02-07  5:01       ` Emanuel Berg
     [not found]       ` <mailman.3852.1454821323.843.info-gnus-english@gnu.org>
2016-02-07  5:23         ` Lars Ingebrigtsen
2016-02-08  0:48           ` Emanuel Berg
     [not found]           ` <mailman.3977.1454892539.843.info-gnus-english@gnu.org>
2016-02-08  4:48             ` Lars Ingebrigtsen
2016-02-08 22:52               ` Emanuel Berg
     [not found]               ` <mailman.4132.1454971965.843.info-gnus-english@gnu.org>
2016-02-08 23:39                 ` Lars Ingebrigtsen
2016-02-09  2:26                   ` Emanuel Berg
     [not found]                   ` <mailman.4158.1454984781.843.info-gnus-english@gnu.org>
2016-02-09 23:47                     ` Lars Ingebrigtsen
2016-02-10  0:50                       ` Emanuel Berg
     [not found]                       ` <mailman.4270.1455065439.843.info-gnus-english@gnu.org>
2016-02-10  3:04                         ` Lars Ingebrigtsen
2016-02-11  0:50                           ` Emanuel Berg
     [not found]                           ` <mailman.4358.1455151881.843.info-gnus-english@gnu.org>
2016-02-11  4:01                             ` Lars Ingebrigtsen
2016-02-17  0:38                               ` Emanuel Berg
     [not found]                               ` <mailman.4888.1455669521.843.info-gnus-english@gnu.org>
2016-02-20  8:34                                 ` Lars Ingebrigtsen
2016-02-21  0:44                                   ` Emanuel Berg
     [not found]                                   ` <mailman.5253.1456015518.843.info-gnus-english@gnu.org>
2016-02-21  2:43                                     ` Lars Ingebrigtsen
2016-02-21  3:29                                       ` Emanuel Berg
2016-02-08  1:27   ` Emanuel Berg
2016-02-04  3:46 Emanuel Berg

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).