postfix (IMAP) data migration to Exchange on premises

Good morning,

We have to migrate 5 mailboxes between 30 and 70GB from the current local postfix server (IMAP) to a second local exchange server.

Customers Host
> office professional 2016 that includes the outlook with which you are planning to use exchange.
> thunderbird with which imap is used.

We've seen that online and office 365 exchanges have native tools for this purpose, but we DO NOT have these licenses and given the investment just completed to purchase licenses at the premises, there's no intention of acquiring them.



Yesterday we failed ruinously in the migration in fact:

> We have configured imap accounts on outlook
> We set outlook to pull down all the mail
> We've generated PSTs
> We imported PSTs
The result was ruinous with inconsistencies in folders, missing emails etc ... In addition, in the absence of log files, progress bars etc this system does not control any.

In test, however, everything was fine.

What is the best alternative to complete migration?
Giovanni AAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AlanConsultantCommented:
Hi,

At what point did it actually fail?

If the PostFix server is local, and you connected Outlook to that via IMAP, then you just have to wait for the emails to fully transfer over.

I would suggest doing the mailboxes one at a time if you can, and when each is finished, refresh all the folders to make sure nothing was missed due to comms errors or anything else.

Also, as a final check, make sure that the number of items in Outlook matches the items on the PostFix server for each account.

Once that is done, I would take Outlook offline (to avoid any changes and other activity), and move all the items to a separate PST file.

Finally, you can either import that PST file into an Exchange mailbox, or leave it local for the user as preferred.  If doing the latter, I would make a copy / backup of it as it is immediately after getting all the items from PostFix and file away somewhere safe for a while.


Alan.
Giovanni AAuthor Commented:
thanks for your answer.

The main problems occurred are:
> All the email were marked for deletion during the export task.
> Folders with many items (user have 20 to 200 folders and subfolders) were not displayed in outlook. Outlook only show a loading animation for more than 1 hour.
> Some folder can't be opened with a general error. Closing and opening outlook randomply fixes some of them.
> Missing email. We are still investigating to understand if this is a export or import error.
AlanConsultantCommented:
Hi,

Not sure what you mean by the export task?  If you do as I set out above, there is no export task.

However, it sounds to me that you may need to leave it longer - maybe an hour was not long enough?

Alan.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Leslie MaclachlanCommented:
I agree with Alan.  Connect Outlook to the Postfix server and download all mail.
There is also a utility called Imapsync - https://imapsync.lamiral.info/ that you could use to synchronize between the two servers.

Regards,
Leslie
Giovanni AAuthor Commented:
Ok, we will try again in this way. How to prevent the "mark for deletion" to be created?
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
I think you're getting a bit confused about this process.

Postfix has nothing to do with IMAP. So you'll never connect to Postfix to access your IMAP stores.

For IMAP access you'll be connecting to Dovecot or some other IMAP4 protocol server.

That said, for as much mail as your talking about I'd go with Leslie's suggestion of using an imapsync tool.

Either https://imapsync.lamiral.info (which Leslie suggested... or...

One of the many GitHub imapsync tools which are all free.

Also keep in mind every IMAP server implements IMAP in a slightly different manner.

This means if you migrate from a standards compliant IMAP like Dovecot to Exchange... your results may require manually massaging file flags + permissions at the command line level, to result in a working config.

Normally this only occurs when you're migrating from a recent version of Dovecot to an old version of Exchange.

Your first step is likely to clearly define your starting IMAP server (name, like Dovecot) + version then your Exchange version + search for any problems related to migrating between the two types of servers.
albert_miquelit managerCommented:
I use BitTitan migration wizard
It costs 8€ per mailbox
But allows to configure everything
Source mailbox IMAP / exchange /office365 an destination mailbox in any of formats
Giovanni AAuthor Commented:
We are migrating from dovecot 2.2.22 to Exchange 2016.
The marked for deletion tag appears after we have exported old mail pst from Outlook. No trace of tag before.
In fact I tried to mount the pst as a data file on outlook and i noticed that the messages are marked for deletion.

https://www.slipstick.com/developer/code-samples/change-outlook-folder-type-export/
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Okay, your running a fairly old version of Dovecot (in release terms as 2.2.31 is latest) + Exchange 2016 is also fairly old.

You may be hitting bugs which have already been fixed.

My guess the problem is with Exchange, as I Dovecot won't mark anything for deletion when mail is pulled.

After reading your original question again, my guess is this problem will persist with whatever tool you use... although... there's a slight chance, this problem relates to how Outlook is interacting with Dovecot.

If I were faced with this... well, first I'd use Dovecot any day over any other IMAP server, because there are 1000s of developer's eyes on the code, each time a new release... If I had to use Exchange... shudder... I'd...

1) Update Dovecot to latest, just to ensure you haven't hit a bug fixed in Dovecot.

2) Update Outlook, to ensure you haven't hit a bug fixed in Outlook.

3) Update Exchange, to ensure you haven't hit a bug fixed in Exchange.

If the problem still exists... I'd likely modify one of the GitHub PERL scripts to see if I could correct the problem as mail synced.

If this didn't work, I'd either sync the mail + write a script to attempt correcting the problem in the Exchange data store after the sync...

For this to work, you'd compare all the flags on the actual Dovecot files + fixup all the flags. This will only work (easily) if you're using Maildir or dbox. If you're using mbox or mdbox... this would be very tough to do.

Likely a better option would be to just rsync all the files from Dovecot directly into the ../cur/. directories in your Exchange data store.

I've done a fair bit of IMAP work + I can tell you migrating into Dovecot is very easy as Dovecot attempts to fixup many problems.

Migrating into any other IMAP server can be a long + painful + expensive process + rarely works well.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Poster has stopped posting.

Marked two solutions, as poster never answered either completely.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.