[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] What OS/Architecture Do You Run nmh On? |
Date: |
Fri, 16 Feb 2018 21:07:59 -0500 |
>Is there a documented pros/cons discussion of MH mailstore vs Maildir.
>They do have similar structures in that a Maildir stores individual
>messages in individual files. I've often wondered what I might gain from
>switching to Maildir (it's benefits are clear with respect to locking
>and crash prevention).
Here are my thoughts:
In the MH mailstore, the filename IS the message identifier. This is
a kind of double-edged sword; this means you don't need to maintain a
mapping from message identifiers to filenames. This means there are no
issues with caching; it's all maintained by the filesystem. This is
very simple and leverages the Unix filesystem very nicely.
But ... with a few exceptions, it is NOT safe to run two MH programs
at the same time. Because no one ever expected that to happen, no one
ever sat down and specified exactly how you are supposed to add a message
to a MH folder, so third-party implementations aren't guaranteed to
do it the same way. And in stock MH (and for a long time in nmh) you could
get sequence file corruption, because no one ever did locking on sequence
files (we fixed that).
In Maildir, the filenames mostly only have the property that they have
to be unique. The filenames do have a little bit of optional metadata
in them that some programs use (see Dovecot for a richer example). So
you have to maintain a mapping from message identifiers to filenames.
But, it's well defined how to add messages to those mailboxes, so as
long as you maintain your own mapping namespace you can use multiple
tools without problems.
So, which one is better? Well, what do you want, exactly?
Oh, regarding a previous discussion ... here's why I was leaning towards
Maildir being more of a mail drop than a mail box. From:
http://www.qmail.org/qmail-manual-html/man5/maildir.html
INTRODUCTION
maildir is a structure for directories of incoming mail mes-
sages. It solves the reliability problems that plague mbox
files and mh folders.
It just says "structure for directories of incoming mail messages".
However, that document is incorrect; if you are using rcvstore(1) to
deliver a message to a MH folder from your MTA directly, it first writes
it into a tmp file and then uses link() to hard link it to the "correct"
name (and if two files try to use the same name, whomever loses the race
will end up with the next highest message number, so no mail will be
lost nor should there ever be corruption).
--Ken
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, (continued)
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Paul Vixie, 2018/02/14
- Message not available
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Ken Hornstein, 2018/02/15
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Paul Vixie, 2018/02/15
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Ken Hornstein, 2018/02/16
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Paul Fox, 2018/02/16
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Ken Hornstein, 2018/02/16
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Paul Fox, 2018/02/16
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Andy Bradford, 2018/02/16
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Ken Hornstein, 2018/02/16
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Andy Bradford, 2018/02/16
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?,
Ken Hornstein <=
- [Nmh-workers] nmh on Maildir., Ralph Corderoy, 2018/02/17
- Re: [Nmh-workers] nmh on Maildir., Paul Vixie, 2018/02/17
- Re: [Nmh-workers] nmh on Maildir., Ken Hornstein, 2018/02/17
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Paul Vixie, 2018/02/13
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Michael Richardson, 2018/02/13
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Paul Vixie, 2018/02/13
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Paul Fox, 2018/02/13
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Ken Hornstein, 2018/02/14
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Michael Richardson, 2018/02/14
- Re: [Nmh-workers] What OS/Architecture Do You Run nmh On?, Ken Hornstein, 2018/02/14