leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
447 stars 48 forks source link

Unresolved entries in sequence with mthread #218

Closed fagg closed 2 years ago

fagg commented 2 years ago

Hello,

Firstly, thank you for mblaze. It's terrific.

I am however having a slight issue, which I cannot explain.

I am using isync to sync my mail to my laptop from my server which is running dovecot. I have verified that this occurs both locally and on the maildir that dovecot serves.

Sometimes, I notice unresolved messages in sequences when I use mthread.

See this output, which was generated using this command:

mlist -s $MAILDIR | mthread | mseq -S

You'll notice between 6 and 8, there is a weird entry in the thread that doesn't actually exist:

mblaze-w-mthread

moon$ mshow 7 mshow: CAKoxK+44JA+EtHk_FbLqh1RxfkCURs=mHDpyj61XJpWRwy-hfw@mail.gmail.com: No such file or directory

But, when I omit mthread, and just run:

mlist -s $MAILDIR | mseq -S

mblaze-no-mthread

I do not see this issue, and 62 messages in the sequence are shown correctly. In the first sequence, there's 62 valid messages but 63 total (if you assume the unresolved message counts).

Is this a bug or am I doing something wrong? Please let me know if there's anything else I can provide to help to resolve this.

Thanks!

Duncaen commented 2 years ago

This happens if there is a mail with In-Reply-To header to a message id that is not part of the mails passed to mthread, so instead of silently ignoring this, it prints the message id and uses that as parent. Sequences that are not threaded don't look at the In-Reply-To header so they don't add those missing message ids.

This could have been either someone mailing the person replying to the non-existing message-id directly instead of the list who then replies back to the mailing list. Another possibility is that the message ends up in spam filter/folder and is not part of the sequence passed to mthread. Some automatic mails, like from github issues will just put a non-existing message id into In-Reply-To to group mails about issue comments into a thread which are not actually threaded.

fagg commented 2 years ago

Thank you for the explanation. That makes sense.