[CentOS] mbox files - can they be "compacted"?

Tue Apr 15 02:49:39 UTC 2014
Russell Miller <duskglow at gmail.com>

> 
> We have been using Maildir with courier-imap for decades, and
> haven't had an issue with this.  My security folder typically has
> 25,000+ messages for the last 7 days messages, and accessing
> either with IMAP or directly with mutt isn't a problem.
> 
> I have written various scripts over the years to convert from
> various mail storage formats ranging from SCO's horrible ctrl-a
> delimited through the U.W. IMAP, and ones that query other IMAP
> servers to convert their folder structures to local Maildir.
> 
> Maildir is generally very easy to handle with standard *nix
> command line tools.

As some have noted, modern filesystems are better at this than ones such as ext2.
However, even in the best of cases, there are still situations where maildirs with a lot of messages
are awkward to handle.  Specifically, if you're trying to find specific messages based on criteria that
are not easily discernable from the inode, for example, things with attachments.  The awkwardness
comes from the fact that the shell has a maximum argument size, so you can't use *.  You have to use
a bit more script-fu, such as find, etc.

Even if there aren't huge issues with doing this, it's an easily fixed thing. Allowing directories to have
hundreds of thousands of entries as a matter of course, even if it's something that causes no issues
in many cases, to me is an architectural issue.

But then, I noticed my beard is starting to turn grey the other day, so maybe I should just get out the
COBOL and tell everyone how we did it when I was a kid.

--Russell