procmail
[Top] [All Lists]

Re: Folding E-mail Headers

2006-04-21 11:08:25
Hi Ruud,


At 2006:04:21 11:34 +0200, Ruud H.G. van Tol wrote:
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)

Yes, I did see that actually, and Bart pointed it out too.


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.

Understood that too.


#!/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.

OK, I understood the purpose of the first line, and if I had known what to do 
with the script I would have changed it for my system, as Procmail is at 
/usr/bin/procmail . But not having used (or even seen in any of the references 
I read, including http://www.ii.com/internet/robots/procmail/qs/ and 
http://pm-doc.sourceforge.net/pm-tips.html ) Procmail scripts before (as 
opposed to recipes), I didn't know how to deal with it. That was the part of 
your message I that confused me.


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.

Ah right, OK. Call that one lack of experience doing the testing that way, 
although I should have figured it out.


Do you already know more now than you ever wanted to? <g>

One can't know too much. There is always more to learn!

Dank u wel.


Groet, Ruud

Groetjes.


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

<Prev in Thread] Current Thread [Next in Thread>