For forwarding mail to the client and for security reasons we encapsulate bounces and auto replies by composing them as attachment with standard tools from mailutils.
All work perfectly except if we want to add some header information if the mail is already multipart.
As documented saving the inner parts to get its Subject: and Date: and From: should be like
echo "s 1.3" | mail -f temp.eml
if the inner mail is within defined boundaries. Goal is to save the inner part for analyzing with frm.
But it is not working. It doesn't save only this one part.
The Content-Type
of the outer mail is
Content-Type: multipart/report; report-type=delivery-status;
The needed part has
Content-Description: Undelivered Message
What is my mistake?
We use documentation from
- .html#message-part-specification
- .html