The mb2md command:
Converting your saved mail so IMAP/Webmail can see it
If you normally use a UNIX shell mailreader (Pine, Mutt, Elm, etc.) to read your mail, chances are that you've saved some emails off to separate folders at one time or another. These folders are probably stored in the classic UNIX "mbox" format. That's fine for Pine, Mutt, and Elm, but our Webmail system can't recognize mbox-format folders and neither can our IMAP mailserver package. The IMAP and Webmail system uses a format called "Maildir++" for mail storage.
If you want to see the contents of your saved mail folders in Webmail or your IMAP mailreader, you'll have to convert your old-style mbox folders into Maildir++ format. You can do this from the UNIX shell, using the "mb2md" command. The "mb2md" command takes an old-style mbox-format file, converts the messages into Maildir++ format, and puts them in the Maildir folder you specify. If the destination folder doesn't exist, mb2md creates it first.
(NOTE: Before you do this, you should know that some UNIX mailreaders can be configured to read Maildir++/IMAP folders, and others can't. Elm in particular is totally without any Maildir or IMAP support. Please keep this in mind before deciding to convert your folders.)
Usage: mb2md -s (old-mbox-folder) -d (new-Maildir-folder)
- Arguments with a leading slash are assumed to be full paths. Otherwise, the arguments are interpreted relative to your home directory.
- You are likely to see the following warning messages when you run this command:
sh: Cannot determine current working directory sh: Cannot determine current working directory
Don't worry - this is an artifact of the file server. The command works properly despite the warning.
In other words, if you have an old Elm folder (in your Mail directory) called "penpals" and want to convert it to a Maildir++ folder also called "penpals", you'd type:
mb2md -s Mail/penpals -d .maildir/.penpals
To put the messages from a folder called "oldstuff" directly in your webmail-accessible inbox, you'd simply enter:
mb2md -s /path/to/oldstuff -d .maildir
(This is especially useful when you're retrieving messages from the snapshot directory.)
A few notes about the destination folder:
- Maildir++ folders should always go in your ~/.maildir directory.
- The folder name must begin with a dot.
- If your destination folder already exists, "mb2md" will append the contents of your source folder to any mail that's already there. This means that if you run "mb2md" twice on the same folder, you'll have 2 copies of each email!
After running "mb2md", you should test the new folder to make sure it's complete (you may need to "subscribe" to it to see it in Webmail).
Once you've seen that conversion was successful, you can go back into your old mail directory and delete the old "mbox" folder.
Last Modified:Friday, 29-Dec-2017 10:15:22 EST
© Copyright 2006-2021
Public Access Networks Corporation