Re: Mailbox locking problems

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: David.Osborne
Cc: exim-users
Asunto: Re: Mailbox locking problems
On Thu, 3 Jul 1997 David.Osborne@??? wrote:

> Since we moved to exim for local deliveries on our Unix systems, I'm getting a
> number of users whose mailboxes are locked -- exim logs "local_delivery
> transport deferred: failed to lock mailbox /var/mail/username (fcntl)".
>
> In our case, /var/mail is NFS-mounted on the mail delivery system (Sun, Solaris
> 2.5) from our fileserver (DEC Alpha, OSF 3.2 + ADVFS). Most users use Pine to
> read their mail. I can usually clear the lock by su'ing to the affected
> usernames and running CDE's dtmail but this is tedious, so I need to fix the
> problem.


We run with NFS-mounted /var/mail on a Solaris 2.5 system, but in our
case it's mounted from an FAServer fileserver. I haven't noticed any
problems of the kind you mention. The error message means it is failing
to lock the mailbox using fcntl(), having managed to create a lock file
(unless you've configured it not to use lock files). By default Exim
uses both a lock file and fcntl() locking, on the belt-and-braces
principle. The current release has an option for turning off lock files,
but not fcntl. The next release has an option for turning off fcntl,
though it won't run if both locking mechanisms are turned off.

> Any ideas what's causing this? NFS problems? Mail client? Exim? No-one else
> seems to be suffering this problem, as far as I can tell.


As you mention dtmail and locking in the same message, I'll draw your
attention to the message below, though if your users are normally
*not* using dtmail, it can't be causing the problem, and in any case, it
doesn't seem to quite fit your symptoms.


---------------------------------------------------------------------
To: ph10@???
Subject: I've cracked it!!
From: Glenn Carver <Glenn.Carver@???>
Date: Tue, 11 Mar 1997 16:27:32 +0000

This is one for the exim FAQ if ever there was!

I started poking about in the properties of dtmail and mailtool because
I couldn't understand why dtmail worked and mailtool didn't as I know that
much of the code between the two is the same. It turns out
that under the 'Expert' settings of mailtool is a option to turn on the
option: 'Use network aware mail file locking'.

By default dtmail had this set, mailtool didn't. If you set it for mailtool,
hey presto! It all works.

The help info on dtmail has this to say about this option:

     Mailer tries to prevent two different instances of itself from opening the
     same mail file at the same time through a technique that detects this
     access when both instances of Mailer and the file are all on the same
     machine.


     A network-aware mail file locking protocol is available that uses ToolTalk
     to coordinate instances of Mailer running from more than one machine, or
     mail files accessed over the network.
     Mailer can only change this option when first opening a mail file. If you
     change this option when a mail file is open, you are given three choices:


However, this can't be the whole story because it must also force mailtool
not to use fcntl locking.

It's still a bit of a mystery to me why we never had this problem with
sendmail, unless sendmail relies solely on the .lock file. Which makes me
feel even better about moving to a MTA that's a bit more robust!

Anyway, the users are happy, I'm happy and I bet you're relieved!!
---------------------------------------------------------------------

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714