procmail
[Top] [All Lists]

SMS forward, limiting characters

2004-03-07 04:53:23

Summary: My SMS provider is not honoring Errors-To and is bouncing 
messages which are forwarded which are too long for it to handle.  This 
means that people are getting bounces from forwards to my cell phone and 
then they think their message did not get through.

My SMS recipe has been this


:0c
<conditions for sms forwarding here>
{
        :0fhw
        |formail -I"Precedence: junk" -I"Errors-To: luomat(_at_)peak(_dot_)org"

        :0
        * ^^From \/[^ ]+
        ! -f "$MATCH" $CELLSMS
}

where "$CELLSMS" is previously defined as my cell SMS address.

This *should* prevent anyone but me from seeing when things go wrong (if I
am understanding the Errors-To: line correctly).  However, apparently if
the message is too long people are getting bounce messages.

1) Are there other headers I can use to prevent bounces?

2) Is there a way to limit the body of the message to 200 characters?

I've thought about doing something like this, but it seems ugly:

        :0fbw
        |grep -v "^>" | grep -i "[a-z]" | head -10

the first grep is to remove quoted lines, the second is to match non-blank 
lines, and then just grab the first 10 lines of whatever is left.

3) Is there a way to preserve the From: without the ^^From hack above 
(perhaps something which would be enough to prevent bounces from going to 
the original sender?)

TjL


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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