----- Original Message -----
From: "Clifton Royston" <[EMAIL PROTECTED]>
To: "Mark" <[EMAIL PROTECTED]>
Cc: "Subscribers of Qpopper" <[EMAIL PROTECTED]>
Sent: Friday, December 21, 2001 4:17 AM
Subject: Re: Qpopper loch mechanism
> On Thu, Dec 20, 2001 at 11:10:03PM +0100, Mark wrote:
>
> > Dear folks,
> >
> > I have a question about Qpopper's locking mechanism (3.x). I have a
> > Perl LDA on my FreeBSD 4.1.1 box, in which I use an exclusive flock to
> > lock a user mailbox before writing to it. I always thought qpopper
> > honors the same flock, and will not truncate on the user's mailbox
> > until it can acquire a lock. But since I suspect to have lost some
> > mail, I want to be sure now.
>
> Hi, Mark!
Hi Clifton!
I already saw your name pop up in the mailing list archives; ltns. :) Your
answer was most comprehensive, lucid and total. Thanks!
> Create user.lock in an atomic way (e.g. by creating a different file and
> relinking it to user.lock, or by opening it with O_CREAT|O_EXCL if you
> trust them) and if feasible flock it too, then reverse those steps at the
> end to unlock it. "man open" and "man flock", also read common/maillock.h
> in the qpopper sources.
>
> The "lockfile" utility included with procmail does a good job for mail
> locks, and is also a good starting point for understanding the locking
> mechanism.
Since I already have procmail for some accounts, I also have "lockfile" too.
I will take it apart and use its mechanism.
Again, thanks!
- Mark
System Administrator Asarian-host.org
---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx