Hi,
I have a simple recipe which needs to search the BODY of a message for a
particular line of text.
This is what I came up with:
:0:
* ^To: paypal(_at_)xxxxx(_dot_)com
* ^Subject: Notification of Payment Received
* ? egrep -i "Item/Product Name: xxxx.com Donation"
* for \/.*
{
:0c
| php -q $HOME/bin/paypal.php "$MATCH"
:0
inbox
}
I need the "Donation" bit to filter non-donations out of my php script.
This is what procmail says:
procmail: [30688] Sun Mar 9 09:12:23 2003
procmail: Match on "^To: paypal(_at_)xxxx(_dot_)com"
procmail: Match on "^Subject: Notification of Payment Received"
procmail: Executing "egrep,-i,Item/Product Name: xxxxx.com Donation"
procmail: Non-zero exitcode (1) from "egrep"
procmail: No match on "egrep -i Item/Product Name: xxxx.com Donation"
procmail: Extraneous locallockfile ignored
procmail: Locking "/home/yyy/mail/inbox.lock"
procmail: Assigning "LASTFOLDER=/home/yyy/mail/inbox"
procmail: Opening "/home/yyy/mail/inbox"
procmail: Acquiring kernel-lock
procmail: Unlocking "/home/yyy/mail/inbox.lock"
procmail: Notified comsat: "yyy(_at_)7327226:/home/yyy/mail/inbox"
From payment(_at_)paypal(_dot_)com Sun Mar 09 09:12:23 2003
Subject: Notification of Payment Received
Folder: /home/yyy/mail/inbox
It says's "Non-zero exitcode (1)" - that means egrep found a match no?
Why doesn't procmail take this as a match and not say "No match"?
Or have I got things mixed up.
I would use * ? ^Body: *$STRING* but I'm not sure Body: is the right tag
nor whether it would work.
The recipe was working fine until I added the egrep bit.
Any ideas? Also, any pointers on bad style would also be greatly
appreciated.
Poff
ps. that "video attachement" post was a dead one?
poff(_at_)sixbit(_dot_)org
SDF Public Access UNIX System - http://sdf.lonestar.org
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail