I had simular problem for some time ago, but went with another path, and was able to get it running quite fast (less than a couple of hours).
A - do a fresh re-install on another server.
B - Restore a backup
C - Connect to the User Mailbox with Outlook and POP the mails to the client.
D - Export to PST File (In Outlook)
E - Import PST File (Through Outlook) back to your IMAP Server on E-smith.
After this small (and simple procedure) the users never noticed that the job was done - by a sheer miracle the mails were restored.
... Dion