On Wed, 7 May 1997, Henry Stilmack - JAC System Manager wrote:
> OS: Solaris 2.5
> Exim 1.62
>
> We have a problem with certain users who _insist_ onusing Sun's OpenLook
> mailtool as their MUA (most of our users use pine, some CDE mailtool, and a
> smattering of Emacs and exmh). It's only the OpenLook mailtool users who have
> this problem:
>
> A user runs up mailtool in the morning. From that point on, Exim can't deliver
> any amil to that user because it cannot get a lock on the mail file. The
> incoming mail sits in the queue until I can get the user to exit mailtool,
> then run the queue.
>
> Is this an Exim problem (I doubt it) or a mailtool problem (probably), and
> does anyone have a fix?
It is at least known. Somebody else in Cambridge hit this one recently.
The problem is that mailtool keeps a lock on the mail file in order to
stop any other instance of mailtool accessing the file. Exim uses both
a lockfile and an fcntl() lock, in order to be safe against any kind of
lock the client might use. Unfortunately, in the current release, you
cannot configure it not to use fcntl(). Mailtool apparently expects to
use only a lockfile when locking against the MTA. The next release of
Exim will have a suitable option.
However, all is not lost. There is an option in mailtool that can be set
to fix this. Here is the message I had from the user who hit this:
------------------------------------------------------------------------
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!
------------------------------------------------------------------------
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714