LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Converting mbox to maildir

[ILUG] Converting mbox to maildir

Kenn Humborg kenn at linux.ie
Mon Aug 2 00:48:55 IST 2004


On Sun, Aug 01, 2004 at 11:56:05PM +0100, Niall O Broin wrote:
> I want to convert a bunch of mail from mbox to maildir. Mr. Google has lots to
> say about this, and what I'm thinking of using is mb2md.pl from
> http://batleth.sapienti-sat.org/projects/mb2md . It seems that it does the
> business, it has been around for a while and has been relatively recently
> updated. I'm just asking here in case any of you knowledgable people had any
> comments or experience with this or any other similar tool.

I did this about 3 years ago with, IIRC, a script called mbox2maildir.
I have a feeling it came with one of the non-sendmail MTAs or non-UW
IMAPDs.  Or maybe I just found it on the web.

It's available at http://www.bluetree.ie/~kenn/mbox2maildir.  No 
warranty, etc, especially considering it's marked as version 0.00 :-)

There was one snag, however, which I didn't notice until after I'd
converted everyone's mail.  CourierIMAP (and hence Maildir, I guess)
uses the modification timestamp on the individual message files to
provide the "Received" date to IMAP clients.  mbox2maildir left
each message file's timestamp as the time of the conversion.

I hacked a shell script to use date in the From_ header of each message
and touch(1) to change the time on each file.  And I don't have this
any more because it was a put together on the command line and 
it expired out of my .bash_history long ago.

I don't know if the timestamp-as-received-date is a Courier thing
or a Maildir thing.  But watch for this after you convert your
first mbox.

Later,
Kenn




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell