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

Mon Apr 14 17:29:34 UTC 2014
Bill Campbell <centos at celestial.com>

On Sun, Apr 13, 2014, Russell Miller wrote:
>
>On Apr 13, 2014, at 10:25 PM, Keith Keller <kkeller at wombat.san-francisco.ca.us> wrote:
>> 
>> In the context of the OP, when mutt tries to deal with a message (e.g.,
>> deleting, moving to a folder), it can be boatloads faster, since
>> handling the message works on a small file which contains just that
>> message.  Deleting a message from an mbox mailbox, for example, requires
>> rewriting the entire changed mbox file to disk (minus the deleted message).
>> Deleting a message from a Maildir mailbox is just removing one file from
>> a directory.
>

>HOWEVER.  When a directory grows too large, the OS can take a long time to
>seek through the directory, which can cause its own set of problems.  And
>this makes cleaning out a maildir directory selectively a real pain.
>Maildir really could do with a hashing mechanism.

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.  We have moved mail servers for some
regional ISPs by rsync'ing with tens of thousands of email
customers by rsync'ing from the old server to the new one to get
the bulk of the mail across before cutting over to the new
machine.  Then we shut the old server down, change the DNS to
point to the new one, and finally do a new rsync --delete to
update the new machine.  There's a period where some deleted
messages may reappear on the client's email before the rsync is
complete, but all new messages appear immediately.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

Never blame a legislative body for not doing something.  When they do
nothing, that don't hurt anybody.  When they do something is when they
become dangerous. -- Will Rogers