procmail
[Top] [All Lists]

Re: Help with procmail recipe

2002-04-29 01:15:08
On Mon, 29 Apr 2002 francisv(_at_)dagupan(_dot_)com wrote:

Here's my procmail recipe:

:0c
* ^TOsmsalert\(_at_)dagupan(_dot_)com
| ( email2sms | gnokii --sendsms <phone1>; sleep 10;\
   email2sms | gnokii --sendsms <phone2>; sleep 10;\
   email2sms | gnokii --sendsms <phone3> )
}

If you do it like this instead it will work as you want.

:0c
* ^TOsmsalert\(_at_)dagupan(_dot_)com
| ( email2sms | gnokii -- sendsms <phone1>; sleep 10; )

:0c
* ^TOsmsalert\(_at_)dagupan(_dot_)com
| ( email2sms | gnokii -- sendsms <phone2>; sleep 10; )

:0
* ^TOsmsalert\(_at_)dagupan(_dot_)com
| ( email2sms | gnokii -- sendsms <phone3>; )

I would ofcourse rather use the 'a'-flag on the <phone2> and <phone3>
recipe like this.

:0c
* ^TOsmsalert\(_at_)dagupan(_dot_)com
| ( email2sms | gnokii -- sendsms <phone1>; sleep 10; )

:0ac
| ( email2sms | gnokii -- sendsms <phone2>; sleep 10; )

:0a
| ( email2sms | gnokii -- sendsms <phone3>; )

I receive the contents of the e-mail on phone1 but the succeeding phone
numbers receive only the character "?"

The reason for this is that the first pipe is one email only... So the
first program that reads it takes all the input and therefor there is
nothing left for the next two programs so email2sms outputs only '?'.

-- 
She was only a mortician's daughter but anyone cadaver.

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