Email editing with Procmail, sed etc
I am trying to use Procmail (with subsequent tools like sed) to amend an incoming email, but I'm still not having much luck even after reading a thousand FAQs! Could somebody please help?
What I am trying to do is this:
1. Deliver an email as normal, BUT
2. Amend and forward a copy of that amended email to another email address. The amendments should be:
a. Insert as first line of text 'Email from John'
b. Send only 160 characters of the message.
3. The added complication is that the message may, or may not, be in MIME (HTML) format, so the 160 characters need to be (I guess) extracted from the plain text part only...
I know this is asking a lot, but could anyone please help?