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

From: Craig Jackson <craig.jackson_at_wild.net>
Date: Fri, 18 Jul 2003 14:18:23 -0500
Message-ID: <3F1847FF.3090109@wild.net>

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.
>
>
>
What mta do you like? I used qmail for a year. It worked great until I
setup smtps and pop3s. I set them up successfully and then believe it or
not all by themselves, they stopped working. I'm willing to give
postfix and courier/vpopmail a try with maildirs, though I would prefer
to stay with mbx. Hey if I want to find something in mbx, I only have
one file to grep per directory with mbx. If I want to find a maildir
mail, I grep hundreds and hundreds of files all of them named by index,
like AA13034980808130. I find it a bit unworkable. Though I appreciate
the efficiency advantages of Maildir over mbox (I don't think there's a
speed advantage over mbx), with small mailboxes, such efficiencies
aren't available with very large mailboxes as you run into inode and
file I/O issues. The NFS locking isn't a factor for me.

-- 
Craig Jackson
__________________________
Wildnet Group LLC
103 North Park, Suite 110
Covington, Lousiana 70433
Office 985-875-9453
__________________________
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/18/03

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