procmail
[Top] [All Lists]

possibly useful for vonage users

2006-04-19 17:35:07
Email from Vonage includes the caller's phone number only in the body  
in a line that looks like this:

From: Outside Caller (1AAAXXXNNNN)

So I threw this together...

# Vonage messages come to user+vonage
:0fw
* To:(_dot_)*+vonage(_at_)domain(_dot_)tld
{
    :0B
    * ^From: Outside Caller \(\/[^)]*
    | formail -i "Subject: $MATCH $SUBJECT"

    :0
    $MLDIR/Voicemail
}

If you want to get clever you can check the $MATCH against a list of  
phone numbers and set the subject to something like "Message from  
Mom" or "Message from John Doe"

I'm considering changing the phone number to AAA-XXX-NNNN as well...  
but am likely too lazy to do so :)

something like:

:0
* $PHONE ?? ^^\/[0-9][0-9][0-9]
{ ACODE = $MATCH }
:0
* $PHONE ?? ^^[0-9][0-9][0-9]\/[0-9][0-9][0-9]
{ XCHANG = $MATCH }
:0
* $PHONE ?? ^^[0-9][0-9][0-9][0-9][0-9][0-9]\/[0-9][0-9][0-9][0-9]
{ PNUM = $MATCH }

$PHONE = ($ACODE) $XCHANG-$PNUM

   | formail -i "Subject: $PHONE $SUBJECT"

would work, I guess, though there is likely a more elegant way

-- 
Mickey and Mallory know the difference between right and wrong; they  
just don't give a damn.



____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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