save only mail body into a file

Erik Christiansen dvalin at
Sat Nov 11 06:40:30 CET 2017

On 10.11.17 08: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, 

That works for me:

	* ^Subject: *furdlesnurk

erik at ratatosk:~$ mail erik
Subject: furdlesnurk
Only the body should be saved to file.

erik at ratatosk:~$ cat /tmp/snurdlefurk 
Only the body should be saved to file.

> 'formail -I' to remove mail headers,
> without success. I also fail to find useful hints by onine searches. Any
> advice/hint? :)

More coffee. That sometimes helps. ;-)


More information about the procmail mailing list