procmail
[Top] [All Lists]

Re: Unusual Msgs Message

2000-01-03 01:46:54
At 04:05 PM 1/1/00 -0700, SoloCDM wrote:
Why is the following message from the backup cache recipe occasionally
displayed in procmail's log with a different file each time?

    ls: msg.koRB: No such file or directory

This can happen when two mails arrive at about the same time.
The backup recipe, assuming you took it from the man page, will
look something like this:
     :0 c
     backup

     :0 ic
     | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,32d`

The shell expands msg.* here, making the argument list for the
`ls` expansion.  However, the process for the other piece of mail
may come along and remove one of those files between the shell
expansion and the ls execution; hence ls issues the message.

If you really care (wanting a "clean" logfile?) you could either
lock the recipe (expensive) or just dump any error messages
from it (which in some cases might lose other error messages):
 :0 ic
 | cd backup && rm -f dummy `(ls -t msg.* | sed -e 1,32d) 2>/dev/null`

Cheers,
Stan

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