[Dovecot] imap locking spool?

Mark Hedges hedges at scriptdolphin.org
Tue Mar 3 23:54:56 EET 2009


How does IMAP lock the /var/spool/mail/user file?

Here's my problem:  I'm writing a script to expire old or
oversize mail through a series of archive folders.  I don't
want to take the whole server down to do this, nor does it
seem like I would have to lock the user out entirely if I
can manage to emulate the locks correctly.

I am able to lock /var/spool/mail/user (and ~user/mail/*)
from procmail, dovecot popmail, and openwebmail using
dotlocks.

What do I do to prevent dovecot imap from writing the spool
and various mbox files while my script is running?  Just
posix fcntl on the various files?

I'm trying to use Mail::Box in perl which I'm having some
problems with, corresponding with the developer, but if
anyone has any easy way out I would appreciate the advice
very much!

Mark


More information about the dovecot mailing list