procmail
[Top] [All Lists]

Procmail dies...

1998-03-02 19:49:04
I wrote earlier about this problem, but I didn't have it well enough
defined to explain it at the time. So I wrote a test.rc to see if I could
make the problem happen and illustrate it in a logfile.

Breifly, on running a lengthy procmail rcfile procmail suddenly has
problems and can't do shell commands, and loses some or all of it's
environment.

Here is the rcfile I concocted, followed by a logfile of the job. The
test.rc uses a counter, and calls itself until the counter reaches a
preset limit. Well, that's how it's supposed to work, but before reaching
it's preset, procmail loses the variable "counter". The rcfile sets
verbose=on at the point where it loses it's variables. 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# test.rc
LOGFILE=test.logfile
SHELL=/bin/sh
counter=${counter:-0}
counter=${counter:+`expr $counter + 1`}
LOG="counter=$counter   `date +%T`
"
        :0
        * ! counter ?? [0-9]
                { VERBOSE=on
                LOG="`date +%T;env`
"               }
        :0
        * ? test $counter -lt 60
                { INCLUDERC=$_ }

LOG="End of test.rc. Unsetting HOST to stop test.
"
HOST=

# eof
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

And here's the logfile. The counter gets to 57 and here should report that
it is set to 58, but it set to a tab chacter. Procmail is still running,
but notice that it can't do a `date' or `env' command, either. 


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
counter=56
counter=57
counter=        
procmail: [3502] Mon Mar  2 18:15:30 1998
procmail: Executing "date +%T;env"
procmail: [3502] Mon Mar  2 18:15:31 1998
procmail: Assigning "LOG=
"

procmail: Executing " test $counter -lt 60"
/bin/sh: test: argument expected
procmail: [3502] Mon Mar  2 18:15:32 1998
procmail: Program failure (1) of " test $counter -lt 60"
procmail: No match on " test $counter -lt 60"
procmail: Assigning "LOG=End of test.rc. Unsetting HOST to stop test.
"
End of test.rc. Unsetting HOST to stop test.
procmail: Assigning "HOST="
procmail: HOST mismatched "acme"
  Folder:                                                                     1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


<Prev in Thread] Current Thread [Next in Thread>
  • Procmail dies..., David Hunt <=