[tpop3d-discuss] The way locking in /var/mail works...

Martin Schmitt mas at scsy.de
Thu, 29 May 2003 08:59:27 +0200


Hallo Chris Elsworth,
dear Chris Elsworth,

* chris@shagged.org wrote/schrieb:

> It's the easiest time; keeping the mbox locked for the duration of the
> sessions makes life a lot easier. It should be technically possible to
> only lock the mbox when an operation is being performed on it, but you
> then have to rescan it before every operation - something else might
> have changed it. This would be performance suicide for large
> installations, retrieving 2000 messages in a single session would
> result in 2000 locks being created and subsequently destroyed.

Well, an option would be to lock the mbox on the first operation after
login and not to unlock it again until the end of the session. But, again,
I'm not an expert on POP3 implementation and my view may be somewhat naive.

> It shouldn't matter if tmda isn't terminating properly, once the
> session is closed tpop3d ought to clear the lock. If I telnet to
> tpop3d, login, then kill -9 the telnet, the lock is cleared, so tpop3d
> is working (under normal circumstances - you may have found a bug
> where it sometimes doesn't clear the lock).

=2E..if I only had an idea on how to find out what's going wrong. Next time
my mbox locks up, I'll try to find something from syslog from the time the
lock was created.

-martin

--=20
665: Neigbour of the Beast