Hello,
I like to forward specific messages to my pager.
I have no problem to match the conditions, but with
some string operations...
So, my recipe begins with
:0 c
to forward a copy of the mail, and with a sample condition:
* ^TO_pager@
Now, I want to copy the From: and the Subject: line
without the words From: and Subject: to a new Subject with the
maximum size of 100 chars. Then I like to delete the whole
body and forward the result to my pager address.
I tried a lot with sed and formail, but after over 20 tries
I'm giving up :-(
Here is an example:
From: Somebody <somebody(_at_)domain(_dot_)com>
To: pager(_at_)domain(_dot_)com
Date: 11-11-1111
Subject: This is the Subject
body line 1
body line 2
body line 3 etc..
Result should be:
From: Somebody <somebody(_at_)domain(_dot_)com>
To: 0123456(_at_)mypager(_dot_)address
Date: 11-11-1111
Subject: Somebody <somebody(_at_)domain(_dot_)com> This is the Subject <--
cut to max.
100 chars
{empty body}
Thank you so much for any help!
Konstantin