I don't know anything about python, so I didn't want to muddy the waters with a response, but I see that this question is more than 16 hours old, so I'll give it a shot.
Can you change your python program so it does this?
Rather than read the input from file
guestmail, read the input from standard input. Write it to file
guestmail within the python script itself. Also (as you presumably do already), write the mail to its intended destination (
mail or
mbox/spam.
Then use the usual procmailrc configuration lines:
Code:
:0w:$HOME/.lockmail
| $HOME/decidespam.py
Hope this helps.