procmail
[Top] [All Lists]

RE: recipe to stop procmail processing

2004-09-02 11:37:24
From: David W. Tamkin [mailto:dattier(_at_)panix(_dot_)com] 


Dallman Ross wrote:

However, whenever he writes "there's no other way," something fires
off in my head

In or at?

Does it have to be either/or?



and I have to find another way.

   LOCKFILE = foo.bar

   :0
   * HB ?? ? cat >> foo
   $DEFAULT

   LOCKFILE

Lovely, but you missed something, Dallman: other procmail 
processes may be writing to $DEFAULT without locking foo.bar.  
You still need a local lockfile on the recipe.

Funny, but I had on there and took it out at the last minute.

And, oh yes, you're assuming that foo is an mbox.

Yes.  But it's not a hidebound assumption, as long as one
of the two files (foo and $DEFAULT) is a file.  We'd
just switch the two.  And if both are dirs, we use standard
delivery to two on the action line, as you stated (with
the caveats you gave noted).

Shall I mention the forks of cat and $SHELL?  Well, you never said it 
was a great way, just a way.  If we're going that route anyway with 
forks and shells, if both foo and $DEFAULT are mboxes, try this:

  :0:
  | tee -a foo >> $DEFAULT

Yup.  Or

    :0: $DEFAULT$LOCKEXT
    | tee -a foo $DEFAULT

since tee, not unlike procmail, can "deliver" to more
than one files.  I'm really not sure the lockfile
covers foo, though, despite your having stated that
it would.  But I'm not in the mood to test.

Dallman


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail