procmail
[Top] [All Lists]

Re: lockfile -ml and -mu

1997-07-31 23:12:00
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

<Prev in Thread] Current Thread [Next in Thread>