Mike Brudenell wrote:
Hi Patrick,
On 20 Aug 2007, at 23:21, Patrick - South Valley Internet wrote:
I've read so much information on this that I'm a little confused as to what to follow. Here's what's going on:
We just migrated away from our AIX machines which were running Postfix and UW-IMAP. We're now running Postfix with Dovecot. I already converted everyone's mbox file to maildir, but now I'm having a little troubles with how to exactly populate their IMAP folders.
People are saying they cannot see their folders. These 'folders' they are talking about can be found in their /home directory.I'm not sure this is relevant but...
Here we found that the standard installation of Outlook will by default only show folders that you have subscribed to. This means if you simply convert the folders from Mbox to Maildir and put them into place Outlook users won't be shown them unless either:
a) You also carefully convert the subscriptions data too (which the UW server keeps in a file called .mailboxlist), or
b) You have everyone change their Outlook setting to show ALL folders instead only the subscribed ones.
Aside: the latter may be problematic in the longer run: I encountered Windows Mail (the Outlook Express replacement under Vista) for the first time yesterday, and this doesn't seem to have a "Show all folders" setting ... at least not one that I could find. :-(
We decided it was too risky to convert people's mailboxes and subscriptions files: we were using UW's MBX format, which meant the conversion process would have been MBX --> Mbox --> Maildir :-(
Instead we're using the very-wonderful "imapsync" utility. This is a Perl script that does everything using IMAP. In particular it obtains the folder listing over IMAP, reads the messages over IMAP, writes folders/messages over IMAP and (most importantly) with the appropriate command line option can also copy over your subscriptions list.
Because all of this is done over IMAP you then don't have to worry about finding your old server's subscriptions file and mailbox structure/formats and converting them: it "just works" and everything ends up correctly in Dovecot's folders.
The only downsides are that imapsync is CPU-intensive, and can take some (wall-clock) time. But we thought it was worth doing that way for safety. :-)
Cheers, Mike B-)
Just to give everyone an update as to what happened and how I fixed it:
I didn't understand that the mailboxes that UW-IMAP created for folders were actually mbox files. I then read the following URL:
http://people.redhat.com/rkeech/maildir-migration.txt
Which then led me to understand that I can use the same mb2md conversion script that I did with /var/spool/mail. I then ran into other issues, such as the .mailboxlist file. So I wrote a script that would read that file (if it existed) and created the necessary Maildirs into the appropriate directories.
Most customers who use Outlook are not having much issues, but we do
have some who have to reenable all the folders after we migrated them.
This seems to fix the issue.
Thanks again to everyone who helped me out!
Patrick