[Top] [All Lists]

Re: save only mail body into a file

2017-11-11 02:30:14
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==0{x=1;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.

procmail mailing list   Procmail homepage:

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