procmail
[Top] [All Lists]

Re: Duplicate Homebrew Entries in Logfile

1997-03-06 11:28:26
Paul O Bartlett <pobart(_at_)access(_dot_)digex(_dot_)net> writes:
   I am using procmail 3.10 under SunOS 4.1.4.  I had developed a
recipe for discarding specified emails and making a compact, one-line
entry in the logfile.  I wanted to add one more field to the record,
and after an inquiry on this list, I adapted a generous contribution. 
Now, however, for every entry, I am actually getting two identical
entries for every file processed, and I have not been able to determine
the cause of the duplication.  (Duplicate entries, of course, are
better than no entry.)
...
   The basic mail-discarding entry looks like this:
...
# Get message size (recipe from David W. Tamkin, slightly modified)
:0HBc  # note trailing period in first condition line
* 1^1 .
* 1^1 ^.*$
* -1^0
{ }
THESIZE = $=


Remove the 'c' flag.  It's causing procmail to fork, and each process
is doing the logging below.  99.99% of the time, a 'c' flag should only
be used on the nesting block is the block contains and is sure to execute
a delivering recipe that itself lacks the 'c' flag.  Otherwise you end
up with duplicate processing of your rcfile until the next delivering
recipe.


Philip Guenther

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