Newbie question about notmuch and gmail
Jeff Templon
templon at nikhef.nl
Tue Oct 16 03:18:33 PDT 2018
Hi,
rey-coyrehourcq <sebastien.rey-coyrehourcq at univ-rouen.fr> 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
/Users/templon/Maildir/Zar/2011/cur/1479841249.46174_17127.medina,U=1329:2,S
/Users/templon/Maildir/Zar/2011/cur/1479841248.46174_17105.medina,U=1307:2,S
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
2760
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
More information about the notmuch
mailing list