I currently have set up fetchmail to transfer mail to procmail and a .procmailrc file with the following content:
FILE_DIR=$HOME/incoming
:0
*
| munpack -q -C "$FILE_DIR"
If I receive emails with attachments, munpack will create a file123.ext and a file123.desc, the latter containing the text of the email. However, the headers are lost. Is there a way to save the headers of the email to a file123.headers file or something like that or, better yet, make munpack save the whole message - including headers - in the .desc file?