procmail
[Top] [All Lists]

Re: Odd error.

1997-03-28 08:30:42
Jesper Pedersen <blackie(_at_)imada(_dot_)ou(_dot_)dk> writes:
I have a problem with my procmail setup, which only occurs sometimes, ie
lots of times it works fine.

Well here's the recipe I have problem with:
======================================================================
:0B
* 1^1 ^(.|$)
{
       VAR8 = $=
}
VAR9 =  `/usr/local/bin/formail -zx from:`
VAR10 =  `/usr/local/bin/formail -zx subject:`

:0c:lock
|echo $VAR8 lines, `/usr/local/gnu/bin/date +%e`/`/usr/local/gnu/bin/date +%m`
/`/usr/local/gnu/bin/date +%y`, `/usr/local/gnu/bin/date +%k`:`/usr/local/gnu/b
in/date +%M`, $VAR9, $VAR10 | gzip >> log.gz
======================================================================

Please do not commment the layout, it is generated automaticly.
It works fine most of the time, but once in a while I get the following
message:

The second recipe needs the 'i' flag, since it doesn't actually read
the message that procmail tries to feed to it.  For consistency with
the rest of the universe you should probably use "log.gz.lock" as the
lockfile instead of just "lock" (procmail will choose this name
automatically if you leave the name of the locallockfile empty, and
just put the second colon in).  You should also fix the automatic
generator to collapse those date calls into one:

:0 ci:
|echo $VAR8 lines, `/usr/local/gnu/bin/date "+%e/%m/%y, %k:%M"`, $VAR9, $VAR10 
| gzip >>log.gz


Philip Guenther

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