procmail
[Top] [All Lists]

Re: rcfile paths and `c' on captures

1997-04-02 22:56:00
dattier(_at_)wwa(_dot_)com (David W. Tamkin) writes:
...
One small comment about the `c' flag on a variable capture recipe.  Varia-
ble capture recipes perforce work with a copy of the message, so the `c'
flag isn't needed.  In more recent versions of procmail (I don't know ex-
actly when it changed), if you also have a logfile defined and
LOGABSTRACT=all in effect, a `c' on a variable capture recipe will get a
logabstract of the action; in older versions, back to the introduction of
variable capture recipes, it will generate a warning message that the ex-
traneous `c' flag was ignored.

Well, after reftping the source to make sure I hadn't broken my copy,
it appears that there's an actual bug in procmail regarding this.  You
are totally correct that the 'c' flag is not needed for variable
capture recipes, and that with LOGABSTRACT=all, a variable capture (or
filter recipe) with the 'c' flag will get it's own log entry.  However
it appears that procmail fails to set LASTFOLDER when doing variable
capture or filtering, and thus the abstract that is logged will be
whatever was previously in LASTFOLDER, possibly nothing if this is the
first recipe executed.

For example:

lunen% cat foo
LOGABSTRACT = all

:0 c
/dev/null

:0 fch
|cat

:0i
|env >/tmp/foo

lunen% procmail foo < /dev/null
  Folder: /dev/null                                                           0
  Folder: /dev/null                                                           0
  Folder: env >/tmp/foo                                                       2
lunen%


Philip Guenther

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