Craig schreef:
Ruud H.G. van Tol:
Gerald V. Livingston II:
[posting order restored]
:0 fh w
|formail -i $X_MY_HEADER
Should be:
:0 fh w
|formail -i"$X_MY_HEADER"
That was the important part, and all that you needed to grok. The only
important difference is the dquotes around the variable. Did you really
not see that? Wait, you are not reading rechnical messages in a
proportional font, are you? (sorry for having this kind of fun)
Test:
Now follows a test, to check things, to see how it works, to validate
assumptions, etc.
-rwx------ longheader:
Create an executable file called 'longheader' with the following
contents.
#!/usr/local/bin/procmail
VERBOSE = 'yes'
H_SUBJ = 'Subject: abc def ghi jkl mno pqr stu vwx yz1
abc def ghi jkl mno pqr stu vwx yz2
abc def ghi jkl mno pqr stu vwx yz3
abc def ghi jkl mno pqr stu vwx yz4'
:0 fh w
| formail -i"$H_SUBJ"
Then (look after the $-prompt) perform the following command:
$ echo 'From: a' | longheader
I'm afraid that I don't follow you on this. Are you saying that the
file that contains the long header I want to insert ("longheader" in
your example) should be executable and should contain more than just
the header I want to insert?
The 'longheader' procmail-script starts with the line
#!/usr/local/bin/procmail
which in any modern shell gets picked up to process the script.
Adjust that line to where your procmail lives, find out by running
which procmail
And where does the echo 'From: a' |
longheader come into it?
That is just there to create a very minimal test message, containing
only a From: header field.
Do you already know more now than you ever wanted to? <g>
--
Groet, Ruud
____________________________________________________________
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