Hi Gerald,
Thanks for your suggestion. See below.
At 2006:04:19 16:22 -0500, Gerald V. Livingston II wrote:
On Tue, 18 Apr 2006 17:51:56 -0700 Craig
<craig(_at_)0604(_dot_)zuym(_dot_)com> wrote:
:0 fh w
| formail -i "X-My-Header: Long string of text here."
I'm guessing that I need to pipe this into fold somehow, but I'm not
"getting" how to do it. The fold syntax, if the header I want to insert is
in a file, would be:
fold -s -w78 x_my_header.txt
I could assign this to a variable in the recipe, which would make things
easier, like this:
x_my_header = 'X-My-Header: Long string of text here.'
Just looking at what you have. This is untested.
If your header *IS* in a file how about:
X_MY_HEADER = `fold -s -w78 /path/to/x_my_header.txt`
:0 fh w
| formail -i $X_MY_HEADER
Gerald
Tried that and got similar results to what I had before:
procmail: Executing "fold,-s,-w78,/path/to/x_my_header.txt"
procmail: [10197] Thu Apr 20 16:00:45 2006
procmail: Assigning "X_MY_HEADER=X-My-Header: Long string of
text wrapped
properly on
several lines."
procmail: Executing
"formail,-i,X-My-Header:,Long,string,of,text,with,commas,between,each,word,all,on,one,line."
Usage: formail [-vbczfrktqY] [-D nnn idcache] [-p prefix] [-l folder]
[-xXaAiIuU field] [-R ofield nfield]
Or: formail [+nnn] [-nnn] [-bczfrktedqBY] [-D nnn idcache] [-p prefix]
[-n [nnn]] [-m nnn] [-l folder] [-xXaAiIuU field] [-R ofield nfield]
-s [prg [arg ...]]
procmail: Program failure (64) of "formail"
procmail: Rescue of unfiltered data succeeded
Obviously I have replaced the actual header with other text for the purposes of
this message. The message in question then sits in the mail queue until I put
back the working recipe and then it gets delivered later.
I also tried:
X_MY_HEADER = `fold -s -w78 /path/to/x_my_header.txt`
:0 fh w
| formail -i "$X_MY_HEADER"
... but that put the second and subsequent appropriately folded lines of the
long header at the top of the body of the message.
Incidentally, Procmail version is 3.22 2001/09/10.
Craig
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail