Subject: Re: [sup-talk] How to ignore some mails in searches?

From: Gregor Hoffleit <[email-masked]>
Date: Wed, 27 Jan 2010 12:57:27 +0100

* William Morgan <[email-masked]> [Di Jan 26 18:42:11 +0100 2010]
> You can use the custom-search hook to accomplish this. For complicated
> reasons, it doesn't show up in `sup -l` right now, but here's the docs:
> 
>   Executes before a string search is applied to the index,
>   returning a new search string.
>   Variables:
>     subs: The string being searched.
> 
> I would try something like
> 
>   subs =~ /label:cronjob/ ? subs : subs + " -label:cronjob"
> 
> Which will automatically add that search term unless the query already
> contains it.

Ah, that's fine!

One last thing, though: Provided the setup above, how can I search
through all threads, regardless of the label cronjob?

Is there any easy way?

    - "stupid" will ignore cronjobs
    - "stupid label:cronjob" will only return cronjobs
    - "label:cronjob || -label:cronjob stupid" doesn't seem to work

Regards,
    Gregor
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Gregor Hoffleit <[email-masked]>
Date: Tue, 26 Jan 2010 18:17:29 +0100

I get a ton of mails from cron jobs on various machines like logcheck,
which are archived right away (in before-add-message.rb).

Problem is that these mails still show up in search results. This is a
real problem, since e.g. almost every search for a mail address will
match to some logcheck report mail from the mail server.

Now I could just add '-label:cronjob' to any search, but that tedious.
I'd like to filter out those mails by default, but still being able to
include them in a search, if I want to.

That sounds a lot like the semantics of the 'Spam' reserved label, but
without Spam in it ;-)

I guess there is some easy solution I'm missing!?

Regards,
    Gregor Hoffleit

---

From: William Morgan <[email-masked]>
Date: Tue, 26 Jan 2010 12:42:11 -0500

Which will automatically add that search term unless the query already
contains it.
-- 
William <[email-masked]>
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk