I need to truncate my e-mails at 160 characters and forward them to
my cell phone as SMS messages. Also keep a local copy. Only the body
should be truncated, the header is rewritten. The only problem is
that the rules below would not truncate massages *exactly* at 160
chars, and even more annoying MIME and uuencode blocks are forwarded
without being truncated at all.
:0
* !^FROM_DAEMON
* !^X-Loop: myaddress
{
:0c:
${DEFAULT}
:0fwh
| (formail -A"X-Loop: myaddress" | egrep -e '(^From|^X-Loop|^To)')
:0fwbi
| head -c 160
:0a
!myaddress(_at_)cellphoneco(_dot_)net
}
I searched the entire list archive but haven't found any useful
answers, can someone please give me a recipe for doing this? I
don't understand why the messages don't always get truncated.
Thanx in advance.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail