"Stephen A. Cochran"
<stephen(_dot_)a(_dot_)cochran(_dot_)lists(_at_)cahir(_dot_)net> writes:
formail seems to be choking (it was coring on version 3.15, but
upgraded to 3.22) on large message. The recipe I'm using is:
:0
* > 31000
| formail -r | formail -xTo: | perl ./doError.pl junk errTooBig
the last two items are variables passed to the perl script. This works
fine for most messages, but gets the following error in Procmail on
large messages:
Error while writing to " formail -r | formail -xTo: | perl
./doError.pl junk errTooBig"
That just means that formail stopped reading it's input. Indeed,
"formail -r" stops reading its input as soon as it sees the end of of the
message header. If you place the 'h' flag on the recipe, that warning
from procmail should disappear. You can also combine the two formail
commands:
:0 h
* > 31000
| formail -rxTo: | perl ./doError.pl junk errTooBig
I'm just using formail to get the correct return address and pass it to
the perl script using STDIN. Because this recipe fails, the mail falls
through to a default rule which forwards to another procmail managed
account. And formail fails there with the following error:
procmail: Excessive output quenched from "formail"
procmail: Excessive output quenched from "formail"
procmail: Exceeded LINEBUF
Unmatched "
with the only recipe being:
mTO= `formail -xTo:`
mFROM= `formail -xFrom:`
mSUBJECT= `formail -xSubject:`
mBODY= `formail -I ""`
mHEADER = `formail -X ""`
The "Excessive output quenched" are from those last two assignments:
procmail uses a buffer of $LINEBUF bytes when expanding the value for
an assignment. If the header or body of the message is bigger than that,
procmail will throw away everything past the cut off point.
:0
| perl ./parser.pl "$mTO" "$mFROM" "$mSUBJECT" "$mBODY" "$mHEADER"
When procmail tries to expand this, it'll hit the limit (thus the
"Exceeded LINEBUF" message) and will run the command using the shell
(even though it doesn't contain anything from SHELLMETAS) in the hope
that the shell will have a bigger limit. Apparently your shell isn't
very happy about that, as it generated the 'Unmatched "' message.
Raising LINEBUF will only help up until you hit the limit on the argument
vector imposed by the kernel. If you want a program to see the entire
header, body, or both, don't try to pass them via the command line:
just feed them in via stdin.
Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail