Bug report: undeletable traces of ghosts in the notmuch database

Subject:Bug report: undeletable traces of ghosts in the notmuch database

Date:Thu, 14 Jan 2016 16:20:59 -0500



From:Daniel Kahn Gillmor

If i add a message to my notmuch database that includes References: or
In-Reply-To: of a message-id that i don't have, notmuch creates a
"ghost" entry in the database.

If i remove the message from my mail archive, and then re-run "notmuch
new", i'd expect all traces of that message to be gone completely.

However, the ghost message-IDs appear to remain in the database.  I've
tested this by:

 * create a demo notmuch installation

 * use delve -a to see that there is nothing in the db

 * add a message to it

 * run "notmuch new"

 * use delve -a (from xapian-tools) to see the list of terms

 * remove the message

 * run "notmuch new"

 * use delve -a to see that the ghost terms remain

This suggests that if i include a bogus message-id in my References:
list for any mail i send to a notmuch user, then access to their
database will let me tell whether they ever saw it or not, regardless of
whether they deleted the message.

Deletion by the user should be final -- i don't like it when tools
snitch on their users.

How should this be fixed?