Duplicate Message-Id and file handling

Subject: Duplicate Message-Id and file handling

Date: Thu, 17 Aug 2023 15:26:55 +0200

To: notmuch@notmuchmail.org

Cc:

From: Alfredo Finelli


Hi,

as it sometimes happens I received two slightly different messages with
the same Message-Id header and I noticed some inconsistencies in the
handling of their filenames by notmuch.

This is what happens, starting with the maildir "test" initially empty:

1. The first message gets delivered to the "new" subdirectory

    .Mail/test/
    .Mail/test/tmp
    .Mail/test/new
    .Mail/test/new/1692024090.11167_0.alan:2,
    .Mail/test/cur

2. I run "notmuch new" and file gets moved to the "cur" subdirectory

    Processed 1 file in almost no time.
    Added 1 new message to the database.

    .Mail/test/
    .Mail/test/tmp
    .Mail/test/new
    .Mail/test/cur
    .Mail/test/cur/1692024090.11167_0.alan:2,

3. Then I read the message in the emacs interface and the file gets the
   Maildir tag "Seen"

    .Mail/test/
    .Mail/test/tmp
    .Mail/test/new
    .Mail/test/cur
    .Mail/test/cur/1692024090.11167_0.alan:2,S

4. The second message with the same Message-Id header gets delivered to
   "new", then I run "notmuch new" again

    Processed 1 file in almost no time.
    No new mail.

    .Mail/test/
    .Mail/test/tmp
    .Mail/test/new
    .Mail/test/new/1692024176.11218_0.alan:2,
    .Mail/test/cur
    .Mail/test/cur/1692024090.11167_0.alan:2,S

The second file for that Message-Id stays in the "new" subdirectory
forever, even after I read it again in emacs or I switch to the other
file with "notmuch-show-choose-duplicate". It also never gets the "Seen"
tag.

If instead both messages are present in the "new" subdirectory at the
time of the first "notmuch new" indexing, then both files are correctly
handled.

Best regards.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: