procmail
[Top] [All Lists]

Re: changing log file within a 'c'

1999-09-23 10:24:02
Timothy J Luoma <tjlists(_at_)bigfoot(_dot_)com> writes:
...
However I do not want/need to see this in the procmail log
Unless something goes wrong

so i change the LOGFILE entry within the { }

Since this is a ':0c' receipe, what I am wondering is this:
      will this effect the LOGFILE of the other copy of the message?
      I want to assume that it will NOT since the other
              LOGFILE= is within the { }
      but I also want to double check

On a nested block recipe with the 'c' flag, the parent procmail process
always skips the block, so that assignments inside of the nested block
will only ever apply to the cloned child process.

I will note that setting LOGABSTRACT=no is more efficient than
LOGFILE=/dev/null as it doesn't take any system calls.


Note that you almost always want to end a nested block with a delivery
to /dev/null or an assignment to HOST so that if all of the previous delivery
attempted failed you won't get duplicate messages later.


:0c
{
...
              # if that didn't work, try just /tmp
      :0:
      /tmp/emailbackups.luomat.$$

I would follow that with:

        # It *still* didn't work!  Log an error then toss this copy.
        LOG = "procmail: Help me, help me -- couldn't deliver to /tmp!
"
        HOST



Philip Guenther

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