Jun
20
2005
| Migrating a Mail Archive from Mbox to IMAP |
|
|
| Monday, 20 June 2005 | ||||||
Page 2 of 4 2. Creating the Folder StructureAfter converting everything to mbox, your folder structure will look a little odd. Each mbox is a file with the name of the folder. Subfolders are located in a folder named after the main folder, but with a single dot '.' in front and the extension '.directory'. So if you are looking for the folder 'SUB' contained in the folder 'ROOT', you'll find a file 'ROOT' and a file '.ROOT.directory/SUB'.To be able to create a directory structure, you have to read in all the directory names and munge them to remove the initial '.' and the extension. Then there is the problem that IMAP uses dots '.' to separate folders, and most IMAP servers correspondingly don't allow you to have dots in a folder name. Needed to regsub those away, too. I wrote a little utility that creates a list of folders given a mail store. Then it performs the substitutions above, and everybody's happy. |
||||||
| < Prev | Next > |
|---|



