Mitsuru Furukawa asked,
| Is this a correct way to use lockfile as follows?
|
| %cp /var/mail/furu furu.mbox
| % --- edit furu.mbox here! ---
| %lockfile -ml
| %cp furu.mbox /var/mail/furu
| %lockfile -mu
No! If you get new mail in your spool while you're editing it, copying
furu.mbox (after you have edited it) back to the name /var/mail/furu will
wipe out the new deliveries.
Try this instead:
%lockfile -ml
%cp /var/mail/furu furu.mbox
% --- edit furu.mbox here! ---
%cp furu.mbox /var/mail/furu
%lockfile -mu