Hi,
It worked :) Thanks for your help. I also modified it for grouping purposes:
:0
* ^TOsmsalert\(_at_)dagupan(_dot_)com
{
:0 cw
| email2sms | gnokii --sendsms +639174568595; sleep 10
:0 Acw
| email2sms | gnokii --sendsms +639196360154; sleep 10
:0 A
| email2sms | gnokii --sendsms +639175080964; sleep 10
}
I'm now figuring out how to modify this so I'll just list all the numbers in
a file, read it and send it out via SMS.
Something like:
~/.procmailrc:
NOC=/etc/procmail/include/noc-numbers.txt
SOFTWARE=/etc/procmail/include/software-numbers.txt
:0
* ^TOnoc-alert\(_at_)dagupan(_dot_)com
| email2sms | for NUMBERS in $NOC; do gnokii --sendsms $NUMBERS;
sleep; done
-----Original Message-----
From: PSE-L(_at_)mail(_dot_)professional(_dot_)org
[mailto:PSE-L(_at_)mail(_dot_)professional(_dot_)org]
Sent: Monday, April 29, 2002 2:54 PM
To: procmail-users(_at_)procmail(_dot_)org
Subject: Re: Help with procmail recipe
At 13:53 2002-04-29 +0800, francisv(_at_)dagupan(_dot_)com did say:
:0c
* ^TOsmsalert\(_at_)dagupan(_dot_)com
| ( email2sms | gnokii --sendsms <phone1>; sleep 10;\
email2sms | gnokii --sendsms <phone2>; sleep 10;\
email2sms | gnokii --sendsms <phone3> )
}
:0
/dev/null
I receive the contents of the e-mail on phone1 but the succeeding phone
numbers receive only the character "?"
Uh, do you figure you get THREE copies of your message on STDIN, or just
the ONE, which is consumed by the first pipe process?
There's no need to use the 'c' flag if all you're going to do is discard
the message. However, your solution lies in a different use of the 'c'
flag:
:0cw
* ^TOsmsalert\(_at_)dagupan(_dot_)com
| email2sms | gnokii --sendsms <phone1>; sleep 10
:0Acw
| email2sms | gnokii --sendsms <phone2>; sleep 10
:0A
| email2sms | gnokii --sendsms <phone3>
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer:
<http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail