Files
inbuxa-server/crates/email/src
jcoffey-dev dab2327f0f Mail: compare a new message with at most 512 others when threading it
To find a new message's thread, delivery read every stored message with
the same thread name (or, for messages without a subject, every
subject-less message) and compared their references. Anyone able to send
mail could make each delivery to an account slower than the last by
sending it many messages with one subject or none.

A new message is now compared with the newest 512 messages sharing its
thread name. A reply whose thread has no message among those starts a
new thread. Duplicate detection looks at the same messages.

Test: after 513 messages with one subject, a reply to the newest still
joins its thread, and a reply to the oldest (now outside the window)
starts a new one; on main it was still compared with all of them.
2026-10-28 21:54:34 -07:00
..
2026-09-18 10:21:56 -07:00