When I suggested this,
| | field1
| | :0
| | * flag1 ?? yes
| | { field1 = "-A 'X-header1: value'" }
| |
| | :0fh
| | | formail -A "X-my: required" $field1
Jari Aalto reported,
| David, I can't get this work with 3.11p7 The following simple tests says:
|
| field = "-A 'X-header1: value'"
|
| :0 fh
| | formail -rt $field
|
| procmail: Assigning "field=-A 'X-header1: value'"
| procmail: Executing "formail,-rt,-A,'X-header1:,value'"
and Philip Guenther warned me that that would happen. I think my last guess
was something like this:
field1 field2
:0
* flag1 ?? yes
{ field1 = "-AX-Header1:\ value" }
:0
* flag2 ?? yes
{ field2 = "-AX-Header2:\ value" }
:0fh
| formail -A "X-always: this" $field1 $field2
but the surer thing, as Philip and I agreed, was more like this:
field1 field2
:0
* flag1 ?? yes
{ field1 = "-AX-Header1: value" } # no backslash
:0
* flag2 ?? yes
{ field2 = "-AX-Header2: value" }
:0fh
| formail -A "X-always: this" ${field1+"$field1"} ${field2+"$field2"}
The major breakthrough came when Philip suggested putting "-A" next to
"X-Headerwhichever:" so that we wouldn't have two different kinds of spaces
in the definitions of field1 and field2.