procmail
[Top] [All Lists]

Re: Why no lockfile in this example in PROCMAILEX(5)?

1996-05-22 09:49:09
Philip Guenther wrote:
Dick Moores <rdm(_at_)netcom(_dot_)com> writes:
In PROCMAILEX(5) this "safety net" is recommended for people like me who
are just beginning to learn Procmail:

:0 c
backup

Why isn't a lockfile used, i.e., why not this:
...


You didn't look at the context closely enough:

                                  In order  for  it  to  work  as
     intended,  you  have to create a directory named `backup' in
     $MAILDIR prior to inserting these two recipes.

Directory folders don't need lockfiles, as each message acts as a lock
on itself.

I think a lock would be best in the *second* part of the example,
though (not mentioned by the original poster):
        :0 ic
        | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,32d`

Here, warning messages result from "ls" if one or more files have been
removed since the expansion of "msg.*" occurred.

The messages are in fact harmless, but annoying, and confused me
when I was starting to use procmail.  Since the point of the section
was something like "how not to lose mail while mucking with your
.procmailrc", it is most apt to be used by novices like me who will
worry about them.

I'm not sure enough about the syntax, but perhaps a judicious
"2>/dev/null" would work in there somewhere instead of a lockfile.

Cheers,
Stan Ryckman (stanr(_at_)tiac(_dot_)net)

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