LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to swhich from mbox to Maildir in dovecot 1.1.x and postfix (https://www.linuxquestions.org/questions/linux-server-73/how-to-swhich-from-mbox-to-maildir-in-dovecot-1-1-x-and-postfix-676734/)

robertjinx 10-16-2008 04:18 AM

How to swhich from mbox to Maildir in dovecot 1.1.x and postfix
 
Hello, I have a setup for mail like this:

IMAP/IMAPS done by dovecot
SMTP done by postfix

The mail are retrived from /var/spool/mail/%u (%u = username)

Dovecot conf:

mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u

But I wanna switch from mbox to Maildir without losing the mails that I have already:

New Dovecot conf:

mail_location = maildir:~/Maildir

This idea works without any problems, but the old mails I dont have them anymore. Is there a possibility to "export" them or somehow to move them and to have them in the new place?

Thank you!

Mr. C. 10-16-2008 05:12 AM

You can convert from mbox to Maildir using mb2md.

http://www.gerg.ca/hacks/mb2md/

robertjinx 10-16-2008 05:22 AM

Ok that sounds good, but the old mails are in "mail" directory and they are set as "Files". For example a folder is actually a file, will this convert the files from mail/ too or just the mails from file mbox?

Mr. C. 10-16-2008 05:28 AM

You configure mb2md to work on all users's "folders", which are really mbox's. I've done this with gigabytes of mbox data. Just go slowly and test the results before embarking on the full run.

robertjinx 10-16-2008 05:45 AM

Ok! Seems to work, just its gonna be something like a bitch to do all of them. I need to do a script to do it automatically this for me, but thx anyway, it was a big help.

Mr. C. 10-16-2008 05:57 AM

It runs recursively, so you just specifiy essentially the user's base mail stores, of the mailq spool.

robertjinx 10-16-2008 06:17 AM

It doesnt really, i tried already or maybe i dont know how to use it :)


All times are GMT -5. The time now is 12:02 PM.