Denis Gomes Franco
Regular Pleskian
Hey,
Just stumbled upon another bug. After importing mails correctly (see my previous thread: Resolved - Error when importing mails to a different mailbox location) the customer complained that all mails were being displayed with the date/time of the import operation (eg. 02/01/2019 at 15:33) instead of the actual message date/time (eg. 25/07/2018 at 09:33)
Lots of research (including Plesk forums and support docs) and I just found out that this is a recurring issue with importing mails. When displaying messages to the user, the mail server uses the message file's actual date and time instead of the date and time present in the message's headers. This causes problems even with messages restored from a backup, if the restore operation does not preserve the original files' timestamps.
Of course this is not an issue with *new* messages because they'll be written to the server the moment they arrive, and thus their dates will all be correct.
So I created this thread to warn others about this situation. I fixed this after finding a shell command that GREPs all mail files, extract their dates and TOUCH the files so they have correct dates and times.
It is also possible to simply direct your customer to configure Roundcube to show actual receive dates of the e-mails. If your customer uses IMAP, the app may or may not show the correct dates, looks like there is inconsistent behavior about this.
Also, here's some feedback to the Plesk team: the Mail Import function should already do that (write files with the correct dates and times) when importing messages. It would be unbelievably easy for them to implement that.
Just stumbled upon another bug. After importing mails correctly (see my previous thread: Resolved - Error when importing mails to a different mailbox location) the customer complained that all mails were being displayed with the date/time of the import operation (eg. 02/01/2019 at 15:33) instead of the actual message date/time (eg. 25/07/2018 at 09:33)
Lots of research (including Plesk forums and support docs) and I just found out that this is a recurring issue with importing mails. When displaying messages to the user, the mail server uses the message file's actual date and time instead of the date and time present in the message's headers. This causes problems even with messages restored from a backup, if the restore operation does not preserve the original files' timestamps.
Of course this is not an issue with *new* messages because they'll be written to the server the moment they arrive, and thus their dates will all be correct.
So I created this thread to warn others about this situation. I fixed this after finding a shell command that GREPs all mail files, extract their dates and TOUCH the files so they have correct dates and times.
It is also possible to simply direct your customer to configure Roundcube to show actual receive dates of the e-mails. If your customer uses IMAP, the app may or may not show the correct dates, looks like there is inconsistent behavior about this.
Also, here's some feedback to the Plesk team: the Mail Import function should already do that (write files with the correct dates and times) when importing messages. It would be unbelievably easy for them to implement that.