Normally when replying to a thread, the In-Reply-To
header is set to something like </p/allura/tickets/7873/6e5421b0a3201b41f8a729d67ef7b13384bf309a.tickets@allura.p.forge-allura.apache.org>
and then that is used to insert the message in the right part of the thread. However, sometimes that header has just a "regular" message id like CAFTnE1nM2MfG3o2WTq_bDWuRjmspnEiCw-d_UiWbSaT3aLyKLg@mail.gmail.com
and then it creates a whole new thread. One case when this can happen is if you reply to your own message, then your mail client will use your sent mail's ID instead of the notification mail ID.
We should be able to use the References
header sitll though. E.g. References: <553179ed6d19cd11b75b56ce.tickets@allura.p.forge-allura.apache.org> </p/allura/tickets/7873/8f4bbc80b155474daf34173d16045ec9d148877c.tickets@allura.p.forge-allura.apache.org> </p/allura/tickets/7873/6e5421b0a3201b41f8a729d67ef7b13384bf309a.tickets@allura.p.forge-allura.apache.org>
Fix on branch db/8132
To test, you can generate some emails via the web interface. Then use
telnet
to send an email into allura's smtp listener, see https://forge-allura.apache.org/p/allura/wiki/Notes/ for details. For the email, have a missing or bogusIn-Reply-To:
header, and include aReferences:
header with valid values (taken from theReferences
andMessage-ID
values in a notification email)Fix for this looks good, clear to merge IMO.