procmail
[Top] [All Lists]

Help with formail -X (another forwarding to phone)

1999-06-08 06:01:48
Hi folks!

I'm really confused. I just got a mobile phone with an address to send SMS
messages to (like everybody else), and I'm trying to get procmail to
forward some stuff to me. I've seen that the archives are full of this 
stuff, but I have found nothing that does what I want. What I'm thinking
about, is that I tell my friends that they can send me e-mail, and if it
contains a line beginning with 
X-Mobilmelding: 
either as a header or in the body, the contents will be forwarded to my
phone. My phone can take up to 160 characters, but it will also display
the contents of From:-line. Now, I've got:

PHONEADDRESS="12345678(_at_)sms(_dot_)netcom(_dot_)no"

:0 HBc:
* ^X-Mobilmelding: ()\/.*
| $FORMAIL -k -XFrom:; printf "\n%.160s" "$MATCH" \
| $SENDMAIL -oi $PHONEADDRESS

and it forwards beautifully, but with my own address in the From:-line. 
From the FAQ,
<URL:http://www.iki.fi/era/procmail/mini-faq.html#forward-mod>
it seems the 'formail -k -X "From:"'-stuff (yeah, I've tried both),
should make sure the From-header is kept as it is, but it isn't.... 
What am I doing wrong? Could it be that sendmail doesn't let me keep the
header?

My printf-stuff, that I use to make sure no more than 160 characters are
sent, is it safe? (I do want to discard longer stuff, the e-mail ends up
in my inbox anyway)

Finally, an idea I have is that the script only forwards after checking if
I've been idle for say, one hour. I have no idea how to do this, though...
Anybody? 

Help would be greatly appreciated.

Best,

Kjetil
-- 
Kjetil Kjernsmo
Graduate astronomy-student                    Problems worthy of attack
University of Oslo, Norway            Prove their worth by hitting back
E-mail: kjetikj(_at_)astro(_dot_)uio(_dot_)no                                - 
Piet Hein
Homepage <URL:http://www.astro.uio.no/~kjetikj/>
Webmaster(_at_)skepsis(_dot_)no 



<Prev in Thread] Current Thread [Next in Thread>