I have a mail server which runs Cyrus-imapd and postfix. I have another server which is to be the backup mail server. I have rsynced one mailbox from the primary server to the backup server to test. As mentioned here, I first rsynced one test mailbox and then copied over it's .seen and .sub files from /var/lib/imap/user/t/testuser over to the same location on the backup server.
Once this is done, I get all the mails in the inbox as is. But there are no sub-folders created and hence, I cannot see the mails in them. On checking the mailbox location for that mailbox, I find that the subfolders have been copied during the rsync processs. I ran
reconstruct but to no avail.
Next I manually created one sub-folder (which had the same name as on the original mailbox) for this mailbox and then ran
reconstruct. I was then able to see those mails under that sub-folder.
How do I sync the mail boxes such that I don't have to manually create the sub-folders for each user in order to see the mails?