Re: Maildir format (was Re: [Nolug] mailutils)

From: Ron Johnson <ron.l.johnson_at_cox.net>
Date: 18 Jul 2003 14:54:46 -0500
Message-Id: <1058558085.2376.74.camel@haggis>

Many of the same arguments can be made for mh, though I don't know
the subtleties.

On Fri, 2003-07-18 at 13:51, Mark A. Hershberger wrote:
> Craig Jackson <craig.jackson@wild.net> writes:
>
> > 4) I don't want to use Maildirs.
>
> Except for this requirement, you could use Courier.
>
> I use Courier's imapd and pop3d. They are the reason I switched to
> maildir format.
>
> Its totally worth it.
>
> First of all, the mbox format is broken by design.
>
> - Only a single imapd can access an mbox format mailbox at a
> time. Only one process can write to the mailbox at a time.
> - Lines beginning with "From:" are munged.
> - All sorts of special precautions must be taken in case mail is
> delivered to the box while it is open.
> - Precautions must be taken for, say, NFS mounted mail.
> - Deleting a message requires copying the mbox twice.
> - locking
>
> From what I can see, the mbx format suffers from these same problems.
> The maildir format doesn't have problems.
>
> Second, the maildir format is friendlier to to Unix.
>
> For instance, on of the most flexible constructs in Unix is:
>
> find [dir] -type f | xargs [command]
>
> I use this on my maildirs all the time. Let's say I know I have old
> email somewhere from an fred@example.com about a payment he is
> sending me. With all the messages in one file. I have to load the
> file up in less and search for each instance of his address.
>
> With maildir format I can quickly zero in on only the messages from
> fred@example.com:
>
> find maildir -type f | \
> xargs grep -l '^From:.*fred@example.com' | \
> xargs grep -il 'payment' | xargs less
>
> This shows me only the messages in any of my folders from
> fred@example.com containing the word "payment". (Using text indexer
> would make this even better.)
>
> Finally, having one message per file makes a lot of sense.
>
> Bottom line: there is a distinct advantage to having every message is
> a single file.
>
> Also see: http://cr.yp.to/proto/maildir.html
>
> Mark.

-- 
+-----------------------------------------------------------------+
| Ron Johnson, Jr.        Home: ron.l.johnson@cox.net             |
| Jefferson, LA  USA                                              |
|                                                                 |
| "I'm not a vegetarian because I love animals, I'm a vegetarian  |
|  because I hate vegetables!"                                    |
|    unknown                                                      |
+-----------------------------------------------------------------+
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/18/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST