[NBLUG/talk] Remote mail access

Eric Eisenhart eric at nblug.org
Sat Feb 11 22:30:12 PST 2006


On Sat, Feb 11, 2006 at 10:15:33PM -0800, Lincoln Peters wrote:
> * Find a mail daemon that IS safe to access from two different programs at the 
> same time.  I seem to recall that the IMAP protocol is supposed to allow for 

It's not so much a protocol or mail daemon issue as a mailbox format issue. 
The IMAP server might be friendlier than Kmail only because it locks and
unlocks frequently.

Specifically, the "mbox" format, where a mailbox is a single giant file
requires locking for writing, especially when deleting (or otherwise
changing) a message.  (as opposed to appending a new message)

I recommend Maildir format.  Each message is a separate file with special
names to avoid collisions inside directories.  No locking is required. 
Designed for NFS, where locking can be problematic.  Mail delivery involves
writing a file (that includes unix timestamp, hostname and process id in the
filename) into the Maildir's "tmp" dir and then moving into the "new" dir
when it's done (moving a file from dir to dir on the same filesystem is an
atomic operation).  Marking a message as 'replied to' just changes the
filename (atomic operation).

I don't know what you're using for an MTA or MDA, but most can do Maildir
format these days.  exim and procmail for sure can.  Most IMAP servers are
quite capable of it, too.

We use Maildir as the underlying storage mechanism for over 10,000 email
users at my work (SSU).  Performance is a problem for us, but locking never
is.  (actually, technically we're using Maildir++ to get IMAP folders out of
Maildir)

http://cr.yp.to/proto/maildir.html
http://www.qmail.org/man/man5/maildir.html
http://www.inter7.com/courierimap/README.maildirquota.html
-- 
Eric Eisenhart
NBLUG Co-Founder, Scribe and InstallFest Coordinator
The North Bay Linux Users Group -- http://nblug.org/
eric at nblug.org, IRC: Freiheit at fn AIM: falschfreiheit



More information about the talk mailing list