Uploading a Maildir to IMAP server

3

1

I have a Maildir format mail store and I need to upload the whole store to an IMAP server. I can't just copy the directory and I'm a bit reluctant to set up a local IMAP server just to do the copying with imapsync.

There are quite a few tools to do all this, but none of them appear to be targetting uploading.

  • Offlineimap works the other way around, IMAP server tells the client what to do and it ignores local folders in the target unless they are already present on the server
  • uw-mailutil doesn't appear to understand maildir properly (on ubuntu 10.04 at least) and thus fails to transfer
  • imapsync requires that both ends are IMAP servers

Any ideas?

Ressu

Posted 2010-08-26T11:12:15.777

Reputation: 133

Answers

2

A GUI solution would be to use a Maildir-capable client such as Evolution, create two accounts in it (one which reads the Maildir, other one logging in to IMAP server), and then just copy the mail folder using the Evolution's GUI.

Of course, if you so wish, both pine and mutt also understands the Maildir format and the IMAP protocol.

Janne Pikkarainen

Posted 2010-08-26T11:12:15.777

Reputation: 6 717

Not a bad solution, at least it doesn't require me to install an IMAP server. But in the end, it's still a bit of legwork for oneshot type of a job. But I think i'll go with this solution for now and leave the question open for a long term solution – Ressu – 2010-08-26T11:46:45.067

If you really want something portable which you can repeat easily, just type in some Perl! :-) http://search.cpan.org/~zeroalti/Mail-Maildir-1.0.0/lib/Mail/Maildir.pm for handling Maildir and http://search.cpan.org/~conteb/IMAP-Client-0.13/lib/IMAP/Client.pm for handling the IMAP part.

– Janne Pikkarainen – 2010-08-26T11:49:34.377

+1, your answer is also what I would have used. I've done this successfully several times - although from a Windows machine using MS Outlook, which supports drag-and-drop of entire subfolders (MS Outlook Express doesn't.) – Torben Gundtofte-Bruun – 2010-08-26T12:19:05.550

1

isync/mbsync can do the job. It is available on Debian as isync package.

Onlyjob

Posted 2010-08-26T11:12:15.777

Reputation: 324