procmail
[Top] [All Lists]

Re: possibly useful for vonage users

2006-04-19 22:06:32
On Wed, 19 Apr 2006 18:27:00 -0600 Google Kreme <gkreme(_at_)gmail(_dot_)com> 
wrote:

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"


Voicemail messages come "From:" (my number(_at_)vm(_dot_)vonage(_dot_)com) so I 
use that to
identify voicemails specifically and send myself a text message to my cell
phone that I've been left a voicemail. The text message includes the date
of the VM message and the phone number from the body. (I include the date
in case I'm driving off-network when the VM text message is sent and I
receive it in "delayed" mode when I get back into a Sprint coverage area).

After special handlinf for voicemails I just grab everything from Vonage
and drop it into a /vonage/ maildir -- including the voicemail. When I get
a text message I can just log into my mail server if I'm near a computer or
call in to retrieve the message if I'm not.

Here's my vonage section:

#Vonage stuff
:0
* ^From:(_dot_)*1234567890(_at_)vm\(_dot_)vonage\(_dot_)com
* B ?? Date:\/.* [AP]M
{ VMDATE="Date- $MATCH" }
:0
* ^From:(_dot_)*1234567890(_at_)vm\(_dot_)vonage\(_dot_)com
* B ?? From:\/.*\)
{ VMFROM="From- $MATCH" }
:0
* ^From(_dot_)*1234567890(_at_)vm\(_dot_)vonage\(_dot_)com
* ! ^X-loop: me(_at_)domain(_dot_)tld
{
:0c
|(echo "Subject: Voicemail";\
echo $VMDATE;\
echo $VMFROM;\
)|/usr/sbin/sendmail -oi AAAXXXNNNN(_at_)messaging(_dot_)sprintpcs(_dot_)com
}

:0
* ! ^From:(_dot_)*1234567890(_at_)vm\(_dot_)vonage\(_dot_)com
* ! ^From:(_dot_)*customerservice(_at_)vonage\(_dot_)com
* ! ^From:(_dot_)*questions(_at_)vonage\(_dot_)com
* ! ^From:(_dot_)*billing(_at_)vonage\(_dot_)com
{ }
:0 E:
.vonage/

Gerald

____________________________________________________________
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>