Introduction
Please keep in mind that the process outlined in this guide is not supported by cPanel. This task is best performed by a systems administrator with the skills, training, and expertise required to do so for you. Very special care should be taken by the administrator to perform this task in a very precise manner. Incorrectly editing message files may corrupt them in a worst case scenario, and therefore could potentially lead to dataloss. This guide is provided as a courtesy only.
If you recently had to change the server's time, or if the timestamp of a message is showing incorrectly in Webmail (Roundcube or Horde) for whatever reason, you may use the following procedure to update the timestamp of the message.
Procedure
IMPORTANT: This guide is only compatible with mailboxes that are using the MailDir format. This guide cannot be used on mailboxes that use the MDBox format.
IMPORTANT: The process in this guide has not been thoroughly tested. cPanel support cannot guarantee that unexpected results may occur after using the steps in this guide. You should not alter the contents of a message unless absolutely necessary.
- Login to the server via SSH as the root user
- Locate the raw message file within the cPanel account. The raw message files are located under the mail directory within the cPanel account's home directory. If you are unsure how to locate the raw message file, you will need to contact a third party systems administrator with the skills, training, and expertise required to do this for you. This task is not supported by cPanel, and this guide is only provided as a courtesy.
- Open the raw message file with a text editor of your choice, and locate the Date header within the message.
- Update the timestamp to the desired timestamp. It is critical that you do not alter the format of the timestamp, or any other part of the message.
- Use the following script to remove the dovecot index files for either all accounts, or just the account that held the message that you have altered. The index files will simply be regenerated so there is typically no concern with removing all index files:
/scripts/remove_dovecot_index_files --all
- You may now refresh webmail to see the new timestamp reflected in the interface