How to copy a _change.dty file in all mailbox folders to force an index update.


SUMMARY

This article explains how to copy a _change.dty file in all mailbox folders to force an index update and append any missing messages that are not indexed. This may be required if message files have been deleted or restored directly from or to the message store. You should not need to use this function in normal usage, only if restoring or moving mail files around outside of the mail services.

DETAIL

Each mail folder contains an index file which has a summary of all the messages in a folder, and includes details like whether a message has been read, the date, subject, size, etc. This index file is called _index.xml and is added to when a new message arrives into the folder. If it is deleted, it will be recreated, but message flags (read, replied to, etc.) are lost. Deleting will also cause clients to resync the folder.

If the index file is out of sync with the folder contents, placing an empty file in the folder with the name _change.dty will force the mail services to update the index when that folder is next accessed. Doing this preserves the message flags and does not cause a resync. The mail services themselves may create _change.dty files if they cannot or do not need to update the index immediately.

In the administration program you can right click a mailbox and select View in Explorer from the popup menu. This will load explorer at the root of the mailbox and you can see the folder structure. You can create the _change.dty files if needed in the required directories.

If you have restored or copied message files into multiple folders, you can use the process below to make it easer:

1. Open a Windows command prompt with elevated privileges (Run as administrator).

2. Type one of the following commands, replacing the path to match the configured store repository path on the server.

For all mailboxes on the server:

for /f "usebackq delims=|" %f in (`dir /b /s /A:D "C:\Program Files (x86)\Mail Enable\Postoffices"`) do copy "%f\_index.xml" "%f\_change.dty" /Y

For a postoffice use the following, and also change the [postoffice] to the required postoffice:

for /f "usebackq delims=|" %f in (`dir /b /s /A:D "C:\Program Files (x86)\Mail Enable\Postoffices\[postoffice]\mailroot"`) do copy "%f\_index.xml" "%f\_change.dty" /Y

For a mailbox use the following, and also change the [mailbox] to the required mailbox:

for /f "usebackq delims=|" %f in (`dir /b /s /A:D "C:\Program Files (x86)\Mail Enable\Postoffices\[postoffice]\mailroot\[mailbox]"`) do copy "%f\_index.xml" "%f\_change.dty" /Y

 



Product:MailEnable (All Versions)
Article:ME020652
Module:General
Keywords:_change.dty,index.xml,index
Class:HOWTO: Product Instructions
Revised:Friday, June 24, 2022
Author:
Publisher:MailEnable