Re: Newbie question about notmuch and gmail

Subject: Re: Newbie question about notmuch and gmail

Date: Tue, 16 Oct 2018 12:18:33 +0200

To: rey-coyrehourcq,


From: Jeff Templon


rey-coyrehourcq <> writes:

> - Is there a way to mark duplicate messages (before deletion) easily using
> notmuch ? 

I too am interested in this one, "if there's a better way".  What I do
know about is this:

simeto:~> notmuch search --duplicate=19 --output=files date:2011..2011

This means that in my Maildir, I have two emails (two messageIDs) for
which 19 files exist, if I interpret the command correctly.  You could
use duplicate = 2 for example to find simple duplicates.

simeto:~> notmuch search --duplicate=2 --output=files date:2011..2011 | wc -l

I guess to delete, you'd use a pipeline like:

notmuch search --duplicate=19 --output=files --format=text0 \
   date:2011..2011 | xargs -0 rm

I'm not sure how tagging would work, I think tags are associated with
the messageIDs and not with the duplicates themselves.
      J "2011 was a good year" T
notmuch mailing list