I have email files in my Maildir received with postfix server (Ubuntu). Is there a utility that can forward a selected email file to the specified email address? Something like:
cat emailfile | utility email@example.com
I tried to use mail command but it just sent the entire file contents including all technical header information as a plain text, which does not look nice.
cat emailfile | mail -s subject firstname.lastname@example.org
Sorry for not being specific. What I wanted is to forward an email file from a shell script, without attachments, but removing all the header and metadata and presenting it in human-friendly way. Like in gmail, when you click 'forward' it automatically parses the email nicely, adds "forwarded message" text on the top and then puts the body text message. I know I can parse the email file myself and construct a new email, but I thought there was a utility that could save me couple hours.