load
Pulls all the messages from the source folder.
Email::Folder buys us some flexibility here - we didn't have to do any special handling for mboxes as opposed to maildirs.
Pulls all the messages from the source folder.
Email::Folder buys us some flexibility here - we didn't have to do any special handling for mboxes as opposed to maildirs.
Drop things with duplicate message-ids. This is because some mboxes are dirty (and Mail::Thread will choke else)
Call out to Mail::Thread, which implements jwz's message threading algorithm.
Check every message that we had after discarding is reachable via the thread tree. We do that a few times just to be sure.
Sort the threads datewise
Traditional Lurker a a--+ |- b | b--+ | |- c e | | | `- d c | `- e d
Date order: a b e c d
Wander the tree setting up the prev and next relations of the messages.
Folds over-deep thread cascades
a *
`-b |-a
`-c | `-b
`-d | `-c
`-e `-d
`-e
If we declare point d to be too deep we transform the tree.
Output generation.