On 2020-10-07 09:58, Ken Olum wrote:
If you ask squirrelmail to do anything except sorting by date, it will
display the value of the Date header in the table. If you ask it to
sort by date, it is sorting by received date. It queries imap for
INTERNALDATE and uses and displays that. Imap returns the INTERNALDATE
from the separator, annotating it with +0000, which is in this
particular case incorrect. It would be better to use the Delivery-Date
header, but maybe not all implementations have that.
I'm not sure who is at fault here. Imap is returning information that
is incorrect, but there's not any way for it to know what timezone is in
the separator line.
Mbox is at fault, for being poorly defined and ambiguous.
SquirrelMail is also questionable. Most mail readers sort by time sent,
from Date:. If SquirrelMail really wants to sort by time received, it
could use the header Received:, which is standard and implemented
everywhere. (Delivery-Date: doesn't seem to be standard; it's not in RFC
5322.)
Maybe the IMAP server is also questionable. How does it transmit the
mbox From_ time to the client, and why? Mbox format is not part of the
IMAP protocol. What does that server do when the mail is stored some
other way, not in mbox format?