procmail
[Top] [All Lists]

extraction of certain headers & body from the incoming mail into a file

1998-11-09 11:13:57
Hi,
        I have to extract certain headers like From, From address, To & the 
body into a file. I am doing this using the following code in $HOME/.procmailrc 
file

:0 hc:
| headfile
:0 bc:
| bodyfile

This is creating the headfile & bodyfile but they are empty.

I also tried a different code using formail

:0 hc:
| formail -X "" | headfile
| formail -I "" | bodyfile

But this also is not doing whatever I want.

Further I also tried another code using sed
:0 c:
|sed -n -e '1,/^$/w headerfile' -e '/^$/,$w bodyfile' 

This too failed. Can somebody help on this. I am quite new to procmail.. 

Thanks in advance 

Somiya
<Prev in Thread] Current Thread [Next in Thread>
  • extraction of certain headers & body from the incoming mail into a file, Somiya <=