[NBLUG/talk] Remote mail access

Lincoln Peters sampln at sbcglobal.net
Sat Feb 11 22:59:36 PST 2006


On Saturday 11 February 2006 22:30, Eric Eisenhart wrote:
> 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.

I haven't really looked into how KMail behaves with regard to locking.  Since 
I had no reason to be concerned with it until now (i.e. there was no reason 
for me to ever try to access the mailbox from two programs simultaneously), I 
had just disabled locking entirely.

The options KMail offers for locking are:
* Procmail lockfile [must specify a path; defaults to /var/mail/YOURNAME.lock]
* Mutt dotlock
* Mutt dotlock priviledged
* FNCTL
* None (use with care)

No documentation seems to exist to explain the options in any detail (I 
checked the KDE Help Center, and I checked Google).

>
> 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).

Actually, I think that KMail stores all of its messages (but not its indices) 
in maildir format, so maybe this isn't as serious an issue as I had thought.  
Although I imagine that, because KMail uses index files, I could run into 
sync errors if I tried to manipulate the contents of KMail's maildir with a 
program other than KMail.

>
> 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.

I'm currently running exim, so it sounds like I shouldn't run into difficulty 
here.  Aside from the non-functional uw-imapd installation, that's the only 
server-type mail software running on this computer.

>
> 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

If I'm reading this correctly, then this means that SSU is running qmail and 
Courier IMAP behind the scenes (presumably all that most users see is the 
SquirrelMail interface via their web browser)?  Considering how widespread 
its use seems to be (and it seems to work pretty well), I take it that those 
programs work pretty well.


-- 
Lincoln Peters
<sampln at sbcglobal.net>

The system was down for backups from 5am to 10am last Saturday.

/~\  The ASCII Ribbon Campaign
\ /    No HTML/RTF in email
 X     No Word docs in email
/ \  Respect for open standards



More information about the talk mailing list