Your new INBOX is in maildir format; Mutt can tell this by itself, so you don't need to worry.
If your Mutt has trouble seeing the INBOX now, first make sure that your $MAIL environment variable is not set incorrectly. Depending on your previous configurations, it may still be pointing to your old-style ".mailspool" directory. Unset the $MAIL variable and you should be fine.
In fact, if your Webmail/IMAP use will just be a matter of peeking in your INBOX occasionally while traveling, you can stop here too. Your INBOX is always visible in Webmail and IMAP.
But, if you want to see your other IMAP folders in Mutt's folder browser or to see your Mutt folders in IMAP and Webmail, it gets more complicated.
If you press c to change folders, and then type the exact path of the folder, Mutt will open that folder. This path can either be a UNIX path to the maildir folder, or a URL for the IMAP folder. Folder names are case sensitive.
So, if you have an IMAP folder called Foo, you would
press c, then type either:
~/.maildir/.Foo
or
imap://localhost/INBOX.Foo
This method is great if you just need to look in an IMAP folder once in a while.
If you don't need to see the old-style mail folders in your ~/Mail directory, you can tell Mutt's folder browser to use IMAP instead. This way, when you press c and then ?, Mutt will give you a list of your IMAP folders. Also, you can use the usual equals-sign shorthand to refer to mail folders.
In your .muttrc file, look for the "folder" variable. Set it this way:
set folder=imap://localhost/INBOX.
(Don't forget the dot at the end. It's important.)
This is also useful if you decide to convert all your old ~/Mail folders into IMAP/Webmail folders (see the next section), and no longer need to look in ~/Mail for them.
This makes for a messier and harder-to-read folder listing than #2 above, but it means folders with lots of messages will open faster. Your choice.
In your .muttrc file, look for the following variables, and change them as follows:
set folder=$MAIL
set mask="."
set mbox_type=Maildir
Now when you press c and ? to list your folders, you'll see a listing of your .maildir directory. The files beginning with a dot are your folders; feel free to ignore the courierimapuiddb and other such files without dots in front. They're not mail folders.
You can still use the equals-sign shorthand for folders with this method, but you must remember to include the initial dot in the folder name. So instead of =Foo, you'll need to type =.Foo.
Your old-style Mutt folders are stored in "mbox" format, which IMAP and Webmail cannot read. All is not lost, though! Panix provides a utility that you can use to convert mbox folders into the IMAP-friendly Maildir format. It's called mb2md (and stands for "mbox to maildir").
The mb2md utility is in /usr/local/bin/, which
should be in your $PATH.
Mutt usually saves mbox folders in ~/Mail, so we'll use that for
our example. Using the example folder named Foo again, here's how
you'd convert it so IMAP can read it:
mb2md ~/Mail/Foo ~/.maildir/.Foo
Basically, the syntax is
To be visible in IMAP and Webmail, a maildir folder must:
Now your "Foo" folder will be useable in IMAP and Webmail. (Though
you will have to subscribe to it first.) Voila! Of course, now
you'll need to point Mutt at the IMAP folders (see previous section
above).
Oh, one last thing... mb2md leaves the source file intact, so
don't forget to remove the old mbox folder after you've checked that
the new one works. And it merely appends to the destination folder,
so if you run it twice with the same parameters you'll get two copies
of everything.
© Copyright 2003, Public Access Networks Corporation
[ Panix Home ]
[ Panix Help System Index ]
[ UNIX Shell Help ]
[ Email and Spam Help ]
[ Top of This Page ]
mb2md (sourcefile) (destination).
Pretty simple. Pay attention to the destination name, though!