procmail
[Top] [All Lists]

Re: Executing external cmds via procmail

2003-05-07 13:20:31
On Wed, May 07, 2003 at 06:10:36PM +0200, Dallman Ross wrote:

No the lock file should go on the wrapper, because we don't know if
changing 'file' while 'program' is running will screw things up.  (If we
knew that 'program' could handle appends, we could do it your way.)

If you put the lockfile before the open brace, how will procmail
know what to name it?  Perhaps a regional (global that is then unset)
lockfile is in order, then.

To quote the procmailrc(5) man page:

              :0 [flags] [ : [locallockfile] ]
              <zero or more conditions (one per line)>
              <exactly one action line>

So with:

  :0: /path/to/file.lock
  #whatever
  {
    :0 bwc
    /path/to/file

    :0
    | /path/to/program /path/to/file
  }

The lockfile is named "/path/to/file.lock", and execution of program is
protected by the lock.

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Abuse / Whatever
  it.canada, hosting and development                   http://www.it.ca/


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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