Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1576
  • Last Modified:

How do I restore IMAP email to the original IMAP folder structure after a migration from a Windows Server to a Linux server?


We have a new 12 user network that uses IMAP for email on their PC's and mobile devices. Most of the mobile devices are iOs7 iphone 5's or MS Pro tablets. The PC's are Windows 7 & 8. There is one lonely MAC user.

Outlook 2010 and Thunderbird were used to migrate individual accounts from a previous hosts windows server to our linux web server on site5. Both servers are still live but the  old server incoming uses an ip address instead of mail. I'm wondering if there is a possible conflict here?

On a per user basis, I setup old and new email accounts and moved the IMAP emails  from old to new folders by the 'move' process.  (see outlook folders img) On each users email client (outlook 2010 - 2013) a new IMAP account pointing to the new linux server was setup. Some folders populated normally others did not.

Oddly a 3rd data file was created locally if the old IMAP data file was present. This couldn't be deleted as it was linked to the email.

So what I have now is a variety of issues. I have emails disappearing, emails not arriving that were before, folders not showing up. There seems to be discrepancies in emails and folders between iphone and outlook. Gaps in historical email dates on iphones. (although these seem to be narrowing)

I've looked this for 3 days and have a head full of information but need direction! Your assistance is appreciated!
  • 3
1 Solution
nociSoftware EngineerCommented:
There is a tool called imapsync:

Which can replicate (repeatable) from one imap folder set to another.
StopTheMadnessAuthor Commented:
This worked:

1) Install Outlook 2010 on a separate PC and create 2 IMAP email accounts. 1 account o connect to the old Windows server and the 2nd to connect to the new server.

2) Log into new account webmail and set the Junk, Spam and Trash folders to coincide with the identical folder names in the new account Outlook folders.

3) In the new Outlook account, create an exact mirrored set of the old Outlook account folder.

3) Set the new Outlook account's 'Root Folder Path' to 'INBOX'. (file > account settings > account settings > open new Outlook email account >More Settings > advanced > Root folder path, enter INBOX>

Under the 'Sent Items' tab, select "save sent items in the following folder on the server" and choose the correct  "Sent" folder.

Under the "Deleted Items" tab, select  "Move deleted items to the following folder on the server" and choose the correct  "Deleted Items" folder.

Selecting "Purge items when switching folders online" is a users preference. i left it as checked.

select click 'OK' > Next > Finish.

4) Restart Outlook.

5) Next was to transfer emails from folder to folder. In Outlook, Select the old account 'inbox' folder.  Select a group (or all if not too many) of emails, 'right click' and select "move > other folder > Inbox (new account)" and click "OK." Be patient - the progress doesn't show in real time.

6) Repeat until all email is transferred to new account folders. Allow the sync to complete before going on to 7.

7) In Outlook, click on the "Folder" tab and select the "IMAP Folders" button.

8) De-select 'When displaying hierarchy in Outlook, show only subscribed folders"

9) Select the 'All' tab and click 'query' and compare with same actions on 'subscribed' tab. Subscribe to all folders. Click 'OK'

10) click on the 'Update Folder List' button (next to IMAP Folders button)

11) restart Outlook

12) Click 'Send/Receive" tab and click 'Send/Receive' button.

The next step was to replicate the above steps on all other network systems.

For iOs devices I just needed to change the IMAP path prefix to INBOX. Settings > Mail, Contacts, Calendars > [ Tap your account] > [Tap your account again] > Advanced > IMAP Path Prefix.

The way I understand it is, a Windows server nests folders under the account name. A Linux sever nests the folders under the inbox. The root folder path INBOX command adjusts the delivery path. As long as I had each device' folders and settings the same it worked fine.
Note: there were issues on some systems where emails were disappearing and showing up on the wrong folders. Emails that couldn't be moved or deleted. Most of these were resolved with the "Root Folder Path > INBOX" fix. The others went away after we moved the Wordpress installation to the Linux system and changed the A record.
StopTheMadnessAuthor Commented:
Thanks for the link noci! After reviewing we decided to roll with the good old manual method.
StopTheMadnessAuthor Commented:
Our solution was a combination of EE solutions and outside sources: *
- check out the 'personal note' at the bottom of this page - according to the author, IMAP is only a viable email backup solution if this issue is addressed. (I agree)

A final note regarding IMAP and Outlook 2013 - you stand to lose valuable data if the 'this computer only' folders are not
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now