When restoring or recovering email data files, you need to be aware of how indexes are used in MailEnable. If you are trying to restore email messages, this article can help you understand what you need to do for messages to be visible.
Email data in MailEnable is stored in the mdir format, where every email is a separate plain text email. The emails are given a unique filename (based on a GUID), with the MAI filename extension. They are stored in a folder structure which mimics what a user would see in an email client. Each folder of messages has an XML index file, called _index.xml which is an index of all the messages in the folder, and contains message information such as delivery time, flags, subject, sender, etc. These index files are used by services such as webmail and IMAP in order to quickly give an email client information about a mailbox, without having to look at the message files directly. These index files may be cached in memory by a service. When an email is added to the folder, then the message information is appended to this index file. Index files may be modified in memory and only saved when needed, to help with performance.
Placing new MAI files into a folder (outside what may be done within the mail software) do not cause the index to be updated. If you need to update an index, you would place a file into the folder and name it _change.dty. This will indicate to the mail services that there is a change in the folder and to update the index. If the index file is deleted, then it will be rebuilt, but doing this will lose all the flags on the email, since they are only stored in the index. Also, deleting an index file will cause IMAP client to download all the messages in that folder again, as the index also stores the unique sequence numbers for the IMAP protocol.
If you need to update all the indexes on a server to make sure they include all the message files, please see:
Folders also have other files which are used by the mail services, but they can normally be ignored when recovering email messages. The _folder.dat file is a file containing a summary of the index file, such as number of items unread, new message counts, etc. It is updated when the index file is updated. The index file also has a backup, which is called _index.xml.bak. This may be recovered automatically if the index file is corrupted, such as if a power or disk failure occurs, or if a mail process is killed during writing the index file.
Folders also have their own index file, which is called _folder.xml. If you create a folder in a mailbox outside of the mail software, then it may not be visible to email clients until this file is updated. Deleting this file will allow it to be recreated.
Calendar information is stored in unique files with the CAL filename extension. These files contain a iCalendar wrapped in a format similar to an email. Calendar folders also have an _index.xml index file, but the contents are different to what is stored for email data. You can still use a _change.dty file to update an index, and since the index file does not contain any extra data that the CAL files, it can be deleted, as it will be recreated. Tasks are stored as TSK files, and contacts are stored with the VCF extension and also work in a similar way to the calendar folders.
When recovering email data from a backup, it is worthwhile resetting the file permissions. To do this, please use the CACLS commands as described in step 7 of the migration article at:
|Class:||HOWTO: Product Instructions|
|Revised:||Tuesday, August 27, 2019|