0
I have a saved mail (in Maildir format) including all headers and attachments.
I would like to send this file as email (with all the given headers intact) to a new email address, something like:
$ cat mail.txt |
forwardMailtest@example.com
which should basically connect to the MTA, use test@example.com
as the "RCPT TO" and the contents of mail.txt
as the DATA.
I tried things like the following, but it doesn't handle headers and attachments gracefully; also, I have to specify the subject on the cmdline (while it is already defined in mail.txt
).
$ cat mail.txt | mail -s "foo" test@example.com