[Dovecot] Mixing mbox and maildir
Is there some way to add a maildir folder to a mbox hierarchy? My folders are all mbox, but I want to migrate some client-side mail from a client (PMMail2000) that stores messages as individual files, and it might be easiest just to dump all the files into a maildir directory with suitable naming.
On 21/12/04, Kenneth Porter (shiva@sewingwitch.com) wrote:
Is there some way to add a maildir folder to a mbox hierarchy? My folders are all mbox, but I want to migrate some client-side mail from a client (PMMail2000) that stores messages as individual files, and it might be easiest just to dump all the files into a maildir directory with suitable naming.
You probably want to make everything the same format, using mb2md.
I'm not clear how to do this myself. One way is to resubmit them to your mail program and get it to rewrite new spools, eg do a fetchmail to download POP3-hosted mboxes and these will be rewritten to your new format. Unfortunately this runs under the user who invokes fetchmail, so domain-wide email can't be processed usefully in this way for several users, as far as I know.
Another way might be to use batched smtp format (bsmtp), and inject them into your mailer as a trusted user (eg using exim's -bS option). I don't know how to convert mboxes, etc into bsmtp formatted files though.
Rory
-- Rory Campbell-Lange <rory@campbell-lange.net> <www.campbell-lange.net>
(er...meant to send this to the list....)
One thought, since I'll be doing this conversion once I get my new mailserver in place...
Since I've only got 3-4 users, I'm planning to just open IMAP mailboxes on both servers in Thunderbird, and drag the messages from the old server (using mbox) to the new (using Maildir). However, It would require two boxes, or two IMAP servers running on different ports, and would not be sufficient for more than, say, 5-8 users.
RobertC
Rory Campbell-Lange wrote:
On 21/12/04, Kenneth Porter (shiva@sewingwitch.com) wrote:
Is there some way to add a maildir folder to a mbox hierarchy? My folders are all mbox, but I want to migrate some client-side mail from a client (PMMail2000) that stores messages as individual files, and it might be easiest just to dump all the files into a maildir directory with suitable naming.
You probably want to make everything the same format, using mb2md.
I'm not clear how to do this myself. One way is to resubmit them to your mail program and get it to rewrite new spools, eg do a fetchmail to download POP3-hosted mboxes and these will be rewritten to your new format. Unfortunately this runs under the user who invokes fetchmail, so domain-wide email can't be processed usefully in this way for several users, as far as I know.
Another way might be to use batched smtp format (bsmtp), and inject them into your mailer as a trusted user (eg using exim's -bS option). I don't know how to convert mboxes, etc into bsmtp formatted files though.
Rory
Robert Cooper wrote:
(er...meant to send this to the list....)
One thought, since I'll be doing this conversion once I get my new mailserver in place...
Since I've only got 3-4 users, I'm planning to just open IMAP mailboxes on both servers in Thunderbird, and drag the messages from the old server (using mbox) to the new (using Maildir). However, It would require two boxes, or two IMAP servers running on different ports, and would not be sufficient for more than, say, 5-8 users.
Now, they may have improved this since, but I found when migrating mailboxes this way with Thunderbird it wouldn't reliably move more than one folder at a time. However, since then both Thunderbird and Dovecot have had several releases.
I would recommend you copy your existing mails to local folders (the ones set up by default in Thunderbird, that you can't delete without manual file editing) and then onto the new server.
This was successful for me in migrating about 20 to 25 users from "locally stored, retrieved from POP" to "joyous IMAP"... and we've never looked back. :)
RobertC
-- Curtis Maloney
On Tue, 21 Dec 2004, Robert Cooper wrote:
[...] mbox) to the new (using Maildir). However, It would require two boxes, or two IMAP servers running on different ports, and would not be sufficient for more than, say, 5-8 users.
I think this could be done with namespaces and different mailbox paths. That is, if you insist on doing things this way instead of using a tool.
participants (5)
-
Curtis Maloney
-
Kenneth Porter
-
Robert Cooper
-
Rory Campbell-Lange
-
Wouter Van Hemel