[Dovecot] convert non-standard mbox to maildir
Hi,
Let me start with wishing you all the best for this new year, and I hope we'll see a lot of new features and not so much new bugs ;-)
I'm trying to convert a number of PSTs to maildir. Just plain drag&drop in Outlook doesn't work (gives a very cryptic error message in a certain folder, but that folder is perfectly all right), and using the import option also barfs when it's not even half-way through the PST. So, I took aid4mail and it converted the PST to mbox wihtout any problem.
But now, I have a directory structure, filled with mbox mailboxes. Like: INBOX INBOX/mailbox INBOX/subfolder INBOX/subfolder/mailbox INBOX/subfolder/subsubfolder INBOX/subfolder/subsubfolder/mailbox INBOX/subfolder2 INBOX/subfolder2/mailbox etc.
This differs from normal mbox setup, but given the fact that there are both folders AND messages below inbox, this is indeed the only useful way to do it. But now I cannot convert this to maildir using either dovecot or mb2md, since it's not the usual mbox setup.
Any suggestions would be greatly appreciated!
Thanks in advance, Maarten
Maarten Bezemer a écrit :
Hi,
Let me start with wishing you all the best for this new year, and I hope we'll see a lot of new features and not so much new bugs ;-)
I'm trying to convert a number of PSTs to maildir. Just plain drag&drop in Outlook doesn't work (gives a very cryptic error message in a certain folder, but that folder is perfectly all right), and using the import option also barfs when it's not even half-way through the PST. So, I took aid4mail and it converted the PST to mbox wihtout any problem.
But now, I have a directory structure, filled with mbox mailboxes. Like: INBOX INBOX/mailbox INBOX/subfolder INBOX/subfolder/mailbox INBOX/subfolder/subsubfolder INBOX/subfolder/subsubfolder/mailbox INBOX/subfolder2 INBOX/subfolder2/mailbox etc.
This differs from normal mbox setup, but given the fact that there are both folders AND messages below inbox, this is indeed the only useful way to do it. But now I cannot convert this to maildir using either dovecot or mb2md, since it's not the usual mbox setup.
Any suggestions would be greatly appreciated!
did you try: mb2md -R -s /path/to/your/pst/INBOX -d /path/to/Maildir
Hi,
On Sat, 3 Jan 2009, mouss wrote:
did you try: mb2md -R -s /path/to/your/pst/INBOX -d /path/to/Maildir
I did not, but did now, and it didn't work... As expected, it creates empty folders with the right name, containing sub folders named 'mailbox' with the contents of the original folder in the PST.
But, then I came across the -r switch, and added a -r mailbox. Then, it put the contents into the right folder, but still created empty mailbox sub-folders. I can live with that.. writing a script to just remove the empty mailbox folders (including the cur,new,tmp below it) took just about 2 minutes.
Now to find the best version of mb2md ;-) (There's a few pointers in the wiki page, but I don't like all the adaptations by Julian Fitzell, so I think I'll be patching my own version after all)
Thanks for the hint!
Regards, Maarten
Maarten Bezemer a écrit :
Hi,
On Sat, 3 Jan 2009, mouss wrote:
did you try: mb2md -R -s /path/to/your/pst/INBOX -d /path/to/Maildir
I did not, but did now, and it didn't work... As expected, it creates empty folders with the right name, containing sub folders named 'mailbox' with the contents of the original folder in the PST.
But, then I came across the -r switch, and added a -r mailbox. Then, it put the contents into the right folder, but still created empty mailbox sub-folders. I can live with that.. writing a script to just remove the empty mailbox folders (including the cur,new,tmp below it) took just about 2 minutes.
Now to find the best version of mb2md ;-) (There's a few pointers in the wiki page, but I don't like all the adaptations by Julian Fitzell, so I think I'll be patching my own version after all)
if you can perl, you can write a converter from scratch. you know the format of your "mailbox" file, so you can do whatever you want...
participants (2)
-
Maarten Bezemer
-
mouss