procmail
[Top] [All Lists]

Re: formail syntax?

2007-08-30 17:41:43
On 30-Aug-2007, at 13:36, Scott Moseman wrote:
On 8/28/07, Scott Moseman <scmoseman(_at_)gmail(_dot_)com> wrote:
1)  cat ~/mail/test | formail -xFrom:
2)  FROM=`formail -xFrom:`

How come, when I perform command #1, I get only the From: header,
but when I use syntax #2 in my procmailrc script, the variable  
contains
the From (w/o colon) header?

No one knows why I'm getting different results using -formail- from
the command-line versus my procmail recipe?

I expect it's a difference in how procmail hands off the unfolded  
headers, but I am surprised.  I would expect formail to always return  
the header contents without the label (From: in this case)

I mean, the x flag specifically says to extract the CONTENTS of the  
header. If you want the header WITH the label, you need to pass a -X  
(note case).

Are you sure the command line version wasn't using -X instead of -x?

-- 
Well boys, we got three engines out, we got more holes in us than a  
horse trader's mule, the radio is gone and we're leaking fuel and if  
we was flying any lower why we'd need sleigh bells on this thing...  
but we got one little budge on those Roosskies. At this height why  
they might harpoon us but they dang sure ain't gonna spot us on no  
radar screen!
____________________________________________________________
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>