On 10 Aug 1999, Martin Bialasinski wrote:
> looks like my box is too slow for the archive size. I occasionally get
> the message, that mhonarc couldn't get the lock in time. So I guess it
> is time for th FAQ advice
>
> NOTE As an archive increases in size, performing updates as a
> message is received takes more processing time. Therefore, for
> large archives, you may need to do updates through a periodic batch
> process (like via cron(8)) to avoid time-out problems from MHonArc.
>
> Hmm, OK. But how do you do this without creating another race
> condition. Is cp atomic, so I can copy the interim mailbox, process it
> with mhonarc, or will a message coming in during the cp operation be
> lost, or will this cause a file corruption or such?
No, cp is not atomic, but mv is as long as you move within the same
partition.
I had the same problem, so I let sendmail deliver mail to file (but don't
use sendmail 8.8 then). Just after midnight I do the following steps
1. Rename the file to a temporary name with mv.
2. Sleep to give sendmail time to finish anything ongoing.
3. Lock the file in the same way as sendmail does (so make sure that there
is no slow ongoing delivery by sendmail).
4. Convert with mhonarc.
5. Delete file.
This has worked very well.
-----------------------------------------------------------------
Mats Dufberg [EMAIL PROTECTED]