Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: recommended storage format for email messages?

by afoken (Chancellor)
on Jul 14, 2009 at 19:29 UTC ( [id://780043]=note: print w/replies, xml ) Need Help??


in reply to recommended storage format for email messages?

I use IMAPdir, which extends Maildir++ with a folder hierarchie. Maildir++ inherits from maildir and adds a quota system. All of these give you one file per e-mail, all without needing locks, NFS-safe, and without any modification to the e-mail. You can parse the files with exactly the same tools that you use to parse an e-mail fetched from the net. And yes, you can use grep and all other text processing tools on the files in the maildir/Maildir++/IMAPdir folders. Sequencial access is no problem, just use readdir() or File::Find to iterate over the directory.

Storing several hundred files in an ext3 filesystem is no problem. With 100_000 files, things begin to look different. It works, but ext3 does not like it and slows down. RaiserFS is said to be faster in that case, but I've never tested it.

I've used the de-facto standard mbox format since the days of Netscape Communicator, but it became slow as hell when the mailboxes filled up. Some day, I gave the IMAPdir format a try, splitted all mailboxes into the IMAPdir format, switched my IMAP daemon from pine's to bincimap, and found that it was much faster.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re: recommended storage format for email messages?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://780043]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-18 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found