[sylpheed:36057] Re: File locking
celejar at gmail.com
Thu Apr 24 11:47:25 JST 2014
On Thu, 24 Apr 2014 10:29:16 +0900
Hiroyuki Yamamoto <hiro-y at kcn.ne.jp> wrote:
> On Wed, 23 Apr 2014 13:51:57 -0400
> Celejar <celejar at gmail.com> wrote:
> > I have been unable to find documentation of what method Sylpheed uses,
> > or whether this is configurable. Can anyone shed light on this? Am I
> > doing something wrong to begin with here? [I know some people recommend
> > against using mbox at all these days, and that there are other ways of
> > handling the getmail / Sylpheed interaction.]
> Sylpheed uses flock()* to lock mbox.
Aha - so there's the problem:
"The Mboxrd destination delivers to an mboxrd-format mbox file with
either fcntl-type (lockf) or flock-type file locking. ...
You must ensure that all other programs accessing any the mbox file
expect mboxrd-format mbox files and the same type of file locking that
you configure getmail to use; failure to do so can cause mbox
corruption. If you do not know what type of file locking your system
expects, ask your system administrator. If you are the system
administrator and don't know what type of file locking your system
expects, do not use Mboxrd files; use Maildirs instead. ...
The default in getmail 4.7.0 and later is lockf."
So to get Sylpheed to work correctly with getmail, I need to tell
getmail to use flock, rather than the default lockf. Consider
documenting this, and including a big fat warning, as getmail does?
More information about the Sylpheed