Re: [Evolution] mbox locking scheme ?



Thank you so much for the reply! Under FreeBSD the port building for
evolution is fairly non-interactive, so I don't recall how it was
configured. I started it again to see what defaults would be used (note
the ">>>>" lines in the snippet of the build log below):

=========================================================================
[...]
creating test-data/Makefile
creating zoneinfo/Makefile
creating config.h

        Evolution has been configured as follows:

        Mail Directory:   /var/mail, writable by group mail
        LDAP support:     no
        Pilot conduits:   yes
        Kerberos 4/5:     no/no
        SSL support:      yes (Mozilla NSS)
   Dot Locking:      yes
   File Locking:     fcntl
        Gtk-doc:          no

        Programming documentation files will not be built.
        You may want to install the gtk-doc package
        so that you will get the Evolution Developer's Guide.

===>  Building for evolution-1.0.7
gmake  all-recursive
gmake[1]: Entering directory `/red/ports/mail/evolution/work/evolution-1.0.7'
Making all in intl
[...]
=========================================================================

So this looks very promissing. Procmail acquires both a "kernel-lock" and
a "dotfile" lock (the filename is configurable):

        procmail: Locking ".inbox.lock"
        procmail: Assigning "LASTFOLDER=inbox"
        procmail: Opening "inbox"
        procmail: Acquiring kernel-lock
        procmail: Unlocking ".inbox.lock"

I guess it is safe to assume that in my environment I will not have
problems with concurrent access to my mbox files by Evolution and
procmail, since they share and honour the same locking mechanisms.

Thanks again for the reply, and apologies for the long posting. I did
quite a bit of searching on-line before asking the list, and the details
may be useful to the next person attempting the same set-up.

Antonio



On 2 Jul 2002, Jeffrey Stedfast wrote:

On Tue, 2002-07-02 at 12:15, Antonio Bemfica wrote:
I have my mail filtered with procmail and delivered to mbox files located
at the directory $HOME/incoming-mail/ - I know I can have Evolution
pick-up mail from spool files, but am a bit concerned with how it will
interact with the procmail delivery.

How does Evolution lock the spool files?

yes

Does it use lockfiles (if so, what is the convention?)?

it can, depends on how you ./configure'd it.

by default, evolution uses dot-locking and fcntl. dot-locking is where
it creates /path/to/file.lock (I assume that's what you were asking?)

Does it use kernel locks (with flock and lockf
under FreeBSD, which is the OS I use)?

it can, depends on how you ./configured it. Well, actually I don't think
we support lockf, just flock. Never even heard of lockf.

From the lockf man page:

       Apply, test or remove a POSIX lock on an open  file.   The
       file  is  specified by fd.  This call is just an interface
       for fcntl(2).  Valid operations are given below:

So yea, we default to use fcntl() which is what lockf uses too :-)

 Does camel-lock do the locking? If
so, how?

yes, unless evolution itself has permissions to the directory.

Jeff








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