Recently, I have received couple of emails which have the "Date:" header missing, I know it is incorrect as per the RFC, but those emails made it through the wires and Pegasus does not cope with it well: In the inbox (IMAP folder on the mailserver), they were listed with empty Date/Time field in the list and could be opened as any other email (so far so good). But: when I moved them into a local folder (Pegasus Mail v2.x format), they got moved but are not visible there.
Some further observations:
- They are not lost; they are stored in the corresponding PMM file; if I open it in a hex editor, I can find them. Similarly, they are recorded in the PMI file (and the date part of the index record is all zeroes).
- even they are not listed in local folder, such emails can be found by searching for some text they contain. The search will find such email and show it in the search result, now with non-empty but incorrect Date/Time (seems it is the date of the last "dated" email before this "undated" email in PMM).
- such emails are visible if copied from the server Inbox folder into local New mail folder (they are stored as CNM files in the filesystem) so no surprise)
- reindexing the local folder did not help (neither harmed) - no change, the undated emails are still physically in the files but still invisible in the list (most other emails got changed their read/unread status which is a bit annoying but irrelevant now)
- it behaves this way in 4.72 as well as 4.73.
Finally, a hack to manually overcome the problem:
(Disclaimer: this is for those who can use hex editor and who don't care if they screw it up...)
- manual patching the PMI file in hex editor and overwriting the zeroes by valid date resurrects those emails. Then, they are shown in the list with that manually forced date and without the Date: header in the message reader (which is fine).