On 19 Apr 2006, at 22:50 , Gerald V. Livingston II wrote:
#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
}
But why scan the headers three times?
:0
* ^From:(_dot_)*1234567890(_at_)vm\(_dot_)vonage\(_dot_)com
{
:0
* B ?? Date:\/.* [AP]M
{ VMDATE="Date- $MATCH" }
:0
* B ?? From:\/.*\)
{ VMFROM="From- $MATCH" }
:0
* ! ^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
}
}
I do like this though. I wonder what the email address is for my
tmobile?
: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/
And I would do that with a single scored recipe, but that's simply a
matter of taste:
:0
* 987654321^0 ^From:(_dot_)*(_at_)(_dot_)*\(_dot_)vonage(_dot_)com
[etc]
.vonage/
(and, before anyone says anything, I would use the scored recipe even
though there's only one condition because it makes it easy to add
another domain:
:0
* 987654321^0 ^From:(_dot_)*(_at_)(_dot_)*\(_dot_)vonage(_dot_)com
* 987654321^0 ^From:(_dot_)*(_at_)(_dot_)*\(_dot_)skype(_dot_)com
[etc]
.voicemail/
for example.
Or you could do something clever like:
:0
* ^From:(_dot_)*(_at_)(_dot_)*\(_dot_)vonage(_dot_)com
{
:0
* H ?? ^From:(.*\<)?\/[^(_at_)](_dot_)*
.vonage/$MATCH/
}
--
This above all, to thine own self be true
And it must follow, as the night the day,
Thou canst not then be false to any man.
____________________________________________________________
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