Go Back   The macosxhints Forums > OS X Help Requests > OS X Server



Reply
 
Thread Tools Rate Thread Display Modes
Old 08-18-2004, 04:33 AM   #1
StarBuckb1
Prospect
 
Join Date: Aug 2004
Posts: 9
Converting Maildir to Mbox format?

Hi folks,

Does anyone know of a product that will read maildir files or something that can convert maildir to mbox format so I can recover some emails?

Thanks
StarBuckb1 is offline   Reply With Quote
Old 08-18-2004, 07:32 AM   #2
signguy
Prospect
 
Join Date: Aug 2004
Location: Chattanooga
Posts: 5
Red face What application?

I do not have one in mind right now but will keep an eye out for you. What application were you working with? You might be able to export to a format that Mail or another application can read.
signguy is offline   Reply With Quote
Old 08-18-2004, 08:00 AM   #3
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,666
If you're talking about ~/Library/Mail/ and Mail.app, it's already in mbox format. The trick is, the mailboxes that you see in ~/Library/Mail/ are actually packages continaing the mbox and other stuff. Just go to the mailbox and right click to being up the contextual menu and select "Show Package Contents", and inside you will see the mbox.
yellow is offline   Reply With Quote
Old 08-20-2004, 12:15 PM   #4
Dr. Fu
Prospect
 
Join Date: Aug 2004
Posts: 1
quick and dirty shell script

Code:
#!/bin/bash
for file in `find /Users/drfu/{current.mdir,new.mbox}/ -type f`
do
cat $file | formail >> mbox
done
This will grab the mdir directory at /Users/drfu/current.mdir and convert it to an mbox file at /Users/drfu/new.mbox

Found this somewhere on the IntarWeb yesterday while moving some mailing list archives to mailman.

HTH
DocFu
Dr. Fu is offline   Reply With Quote
Old 08-22-2004, 12:51 PM   #5
StarBuckb1
Prospect
 
Join Date: Aug 2004
Posts: 9
Thanks Dr. Fu I had almost given up on doing this.

The reasons for doing this comes down to me running a 10.3 server which stores the mail in a mdir format.

If someone deletes a file they didn't want to delete this way I can recover their folder only on my desktop machine and email the file over to them afterwards.

I will try it out tomorrow at my office

Thanks

Last edited by StarBuckb1; 08-22-2004 at 12:53 PM.
StarBuckb1 is offline   Reply With Quote
Old 05-31-2008, 12:11 PM   #6
diavol
Registered User
 
Join Date: May 2008
Posts: 1
Hello everyone as this is my first post,

I wrote a similar script in PHP which can work with very big maildir folders (does not keep much in memory before writing to the mbox file thus not exhausting the php memory limits) and copes with many Header information like "X-From-Line:" and "Reply-To:" in case "From:" is missing.

I have tested it on my ubuntu 8.04 with PHP 5.2.4 and works fine.

The file is located at:
http://diavol.noobwars.gr/scripts/maildir2mbox.rar
diavol is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:20 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.