Jameson Graef Rollins
jrollins at finestructure.net
Mon Mar 6 16:23:18 PST 2017
On Mon, Mar 06 2017, Steven Allen <steven at stebalien.com> wrote:
> Instead of iterating over all messages in spam, why not just iterate
> over *new* messages (`tag:new`) in your pre hook? That is (pseudo code):
> for message in `notmuch search tag:new and tag:spam`:
> for author in message.headers["From"]:
> author = clean(author) # Extract the *actual* email address (name at domain).
> # There are probably faster ways to check this...
> if `notmuch count tag:sent and to:author` > 0:
> notmuch tag -spam -- message
> That should be reasonably fast.
Thanks for the suggestion, Steven. Yes, my intention was to restrict
over just "new", and yes, it is considerably faster. Thanks for the
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 832 bytes
Desc: not available
More information about the notmuch