Re: [Evolution] External scripts from filters



the shell command get the complete msg as stdin so all the script needs
to do is:

cat - > /tmp/file
and then you can run formail on the /tmp/file


On Thu, 2002-11-14 at 13:51, Cliff Wells wrote:
Is there a way to pass the body of an email to an external program via a
filter? (Please read the rest before replying).

What I'm looking to do is write a Python script that extracts PGP keys
from incoming email.  I don't think passing the email to an external
program in the criterion section would be good as then every email would
be run through the external script which would be bad performance-wise. 
Rather, in the criterion section I filter on "Message body contains
-----BEGIN PGP PUBLIC KEY BLOCK-----" and then I'd like to use a shell
command in the action section to run the script if a match is found, but
I'm not sure how to pass the body of the mail to the external program.

Any suggestions?  Are there %M or whatever arguments that can be
appended to the shell command?





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]