Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: recommended storage format for email messages?

by afoken (Chancellor)
on Jul 14, 2009 at 19:29 UTC ( #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.


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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2023-12-10 19:45 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.