Re: save only mail body into a file
Stan Ryckman <[email protected]> Sat, 11 Nov 2017 03:26:53 -0500
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
On 2017-11-10 09:52, Zhiliang Hu wrote:
> For one of my specific purposes I used to pass certain mails to a perl
> script in order to save/process ONLY the mail body.
> =
> It can simplify the process if I can directly drop a mail body into a
> file. I tried ':0 b' to save mailbody, 'formail -I' to remove mail
> headers, without success. I also fail to find useful hints by onine
> searches. Any advice/hint? :)
:0 b works for me as it does for Erik Christiansen.
I will add, though, that if you must use external processing, something
more lightweight than perl would probably be a good idea.
In this case, you might use awk:
...
| awk 'NF=3D=3D0{x=3D1;next}x' >> file
but of course, :0 b is preferable. I suspect you have some other typo
since you didn't provide context.
Coffee for me too, please.
Stan