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 new Webmail system can't recognize mbox-format folders and neither can our new IMAP mailserver package. The new IMAP and Webmail system uses a format called "Maildir++" for mail storage.

So, 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. Here's how to use it.

(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 (old-mbox-folder) (new-Maildir-folder)

Your 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.

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.

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 ~/Mail/penpals ~/.maildir/.penpals

To put the messages from a folder called "oldstuff" (in your currrent working directory) directly in your webmail-accessible inbox, you'd simply enter:

mb2md oldstuff .maildir

(This is especially useful when you're retrieving messages from the snapshot directory.)

A few notes about the destination folder:

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:Wednesday, 30-Jan-2013 12:14:12 EST
© Copyright 2006-2011 Public Access Networks Corporation