On 14.08.15 08:14, Ian Zimmerman wrote: > On 2015-08-14 21:57 +1000, Erik Christiansen wrote: > > The recipe's only variable assignment contains nothing expandable, so > > no overflow can occur there. The limit then is the capacity of the > > receiving environment variable, not $LINEBUF. > > In that case, man procmailrc(5) is lying here: > > The assignments and substitutions of these environment variables > are handled exactly like in sh(1) (that includes all possible > quotes and escapes), > > because sh expands the backticks in an assignment eagerly.
It would be a mistake, I think, to expect that mutt replicates sh internally, just to inflict on itself a $LINEBUF limit. That system commands are executed in a subshell is confirmed here: >>> Environment variables set inside the shell-interpreted-`|' action part of a recipe will not retain their value after the recipe has finished since they are set in a subshell of procmail. To make sure the value of an environment variable is retained you have to put the assignment to the variable before the leading `|' of a recipe, so that it can capture stdout of the program. <<< I.e. environment variables set by shell actions are set by the implementing (sub)shell. Since the shell can do it all, why would one hobble things by unnecessarily involving mutt? > (Easily verified e.g. by running top(1) in one terminal while doing > foo=`ls -lRa / | tail -1` in another one.) Verifying shell behaviour is one thing, but your point, AIUI, is that excessive pipe output to an environment variable should overflow mutt's rcfile-reading line buffer. To test that hypothesis, I think it'd be more germane to set LINEBUF to 128 (the minimum possible), and throw a full two-line subject header at mutt. If that could trigger an abort, then you'd have a point in theory, i.e. that a message with 3500 lines of subject header could cause mutt to abort the message when using a 250K LINEBUF. I don't know how many hundreds of millions of posts there are in the world's mail archives, but if this discussion is for real, then I invite you to show me _one_ such post in the wild. (One with 2048 characters of subject, even? That's over 27 lines of 72 characters.) Erik