[snip]
So I want to reorganize the incoming email
by extracting From: and Subject and put them in Body,
and replace From: to my address, To: to my pager service address.
Subject is ignored by the pager service.
I created following script but it is painfully far from functional.
Please give me advice.
:0 c
* (^To:.*(important|urgent)|^From:.*(important.com|urgent.com))
{
FROM=`formail -xFrom:`
SUBJECT=`formail -xSubject:`
(formail -I"From: furu(_at_)009(_dot_)com" \
-I"Subject: forwarding to pager" \
-I"To: 0399999999(_at_)docomonet(_dot_)or(_dot_)jp" \
$FROM $SUBJECT)|$SENDMAIL -t
}
FROM=`$FORMAIL -rt -xTo:`
SUBJECT=`$FORMAIL -zx 'Subject: '`
:0 c:
* (^To:.*(important|urgent)|^From:.*(important.com|urgent.com))
($FORMAIL -i"From: furu(_at_)009(_dot_)com" -i"Subject: forwarding to
pager" \
-i"To: 0399999999(_at_)docomonet(_dot_)or(_dot_)jp"; cat "From:
$FROM"; \
cat "Subject: $SUBJECT") | $SENDMAIL -oi -t
How's that?
Lates!
---------------------------------------------------------------------------
Tim <bodysurf(_at_)pobox(_dot_)com>
mailto:bodysurf(_at_)pobox(_dot_)com
Finger bodysurf(_at_)pobox(_dot_)com for my PGP public key (Bits 1024/KeyID
09DA5C49).
PGP Key FPrint (09/03/94): 4C 97 F1 FA 70 55 68 91 49 D1 AD F2 DD 63 0C 15
---------------------> Please PGP encrypt your email <---------------------