[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mutt + dovecot/squirrelmail + mbox ?



On Sun, Jun 05, 2005 at 07:19:15AM -0700, Steve Lamb wrote:
} Monique Y. Mudama wrote:
} > While I understand that maildir allows you to isolate corruption to
} > single messages instead of the entire mailbox, I guess corruption just
} > seems so unlikely that I haven't worried about it.  I'm sure it will
} > bite me soon.
} 
} Strictly speaking mbox is no different.  It is just a text file, nothing
} more.  And let's not get into "what is a text file on unix" discussion
} again, mmmmkay?  Anyway, corruption will have an effect on one message.
} Load it in a text editor, go to it, clear it out.  Simple as that.
} Anything which could wipe large swathes of messages could do it just as
} easily to maildir.  Trust me, maildir isn't all that and a bag of chips.
} Having been on the wrong side of maildir give me mbox any day of the
} week.  At least with mbox 500Mb of mail won't choke the machine into near
} uselessness.

This is incorrect information. If two programs are attempting to manipulate
the same file at the same time there are a variety of problems that can
occur. The best you can hope for is that the changes made by one program
are completely overwritten by the other program, which means you may lose
email messages accidentally. At worst, your mbox can wind up truncated or
garbled with interleaved data.

That said, if you think about your particular setup there are really three
programs that can be working on your spool at the same time: your MDA (e.g.
exim), your MUA (e.g. mutt), and your IMAP server (e.g. dovecot). Given
that dovecot *must* know how not to step on the toes of the MDA, and
likewise mutt knows how not to step on the MDA's toes, your locking
problems are probably minimal. Furthermore, since you're the only one
interacting with that particular mail spool (if I understand correctly),
you can be pretty sure that you won't have locking problems since you will
be interacting with the spool either via squirrelmail (i.e. through IMAP)
or via mutt, but not both at the same time.

There's been a raging debate about mbox vs. maildir for as long as both
have existed. Both sides claim the other is inefficient. Both make claims
of corruption. As far as I can tell it is only in rare cases, usually
involving network filesystems (NFS, usually), that anyone experiences
problems with either one. This is solved by dealing with mail remotely via
IMAP, a protocol suited to the purpose, rather than using a networked
filesystem. That made less sense when all we had was mail and elm, but mutt
and the innumerable graphical and web clients all support IMAP. Use dovecot
and mbox, use courier and maildir, whatever. I talked about courier and
maildir because that's what I chose, and I've had no difficulty with it.

}          Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
--Greg



Reply to: