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