On Tuesday, November 26, 2002, at 02:14 AM, Philip Guenther wrote:
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
Thanks. I didn't think I needed the h flag since the man page listed it
as the default. Solved that one easily.
mTO= `formail -xTo:`
mFROM= `formail -xFrom:`
mSUBJECT= `formail -xSubject:`
mBODY= `formail -I ""`
mHEADER = `formail -X ""`
: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.
Great explanation, thanks. I wasn't sure what was happening under the
covers.
So I'd want something like this?
mTO= `formail -xTo:`
mFROM= `formail -xFrom:`
mSUBJECT= `formail -xSubject:`
# mBODY= `formail -I ""`
# mHEADER = `formail -X ""`
:0
| perl ./parser.pl "$mTO" "$mFROM" "$mSUBJECT"
And then in the perl script for a while (<>) to get entire message, and
then call formail from the perl script to split them apart? Or even
just use formail from the perl script and don't pass any arguments in?
It's been about two years since I wrote this, but I seem to remember
that I had problems when I tried to do it that way at first.
Steve Cochran
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail