procmail
[Top] [All Lists]

Re: forward mechanism

1997-03-09 21:26:58
On Mon, 10 Mar 1997 05:42:07 +0200 (EET), I wrote:
Naive and dangerous way to do it:
 $ # Kids, don't try this at home
 $ cp /var/spool/mail/walt /tmp/inbox && echo -n >/var/spool/mail/walt

A slightly more atomic and thus less dangerous operation would be to
just rename the spool file. Again, you might not have the permissions.

 $ mv /var/spool/mail/walt /var/spool/mail/walt.moving.to.venice

After this, there's no need to lock on this second file, but you
should probably take care to recreate /var/spool/mail/walt with the
correct permissions before somebody else does it for you ;-)

Also, don't leave temp files hanging in the mail spool, or your admin
will get you. 

Sorry for following up on myself like this. I'll stop now, I promise.

/* era */

"slightly more atomic"? I should go back to sleep

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

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