I have a pretty usual requirement with procmail but I am unable to get the results somehow. I have procmailrc file with this content:
:0
* ^To.*@myhost
| /usr/bin/python /work/scripts/privilege_emails_forward.py
Wherein my custom python script(privilege_emails_forward.py) will be scanning through the email currently received and do some operations on the mail content. But I am unable to get the script getting executed at the first shot(let alone scanning through the mail content).
- Is this a correct way of invoking an external program(python) as soon as new mail arrives?
- And how does my python program(privilege_emails_forward.py) will receive the mail as input? I mean as sys.argv or stdin????