Hello List!
I would like to filter mail based on output of a script that I wrote;
this script reads the mail-message and...
- outputs something if it should be filtered
- outputs nothing if it should *NOT* be filtered
writing the script was easy! now how I use this in my procmailrc?
the best way I could find was:
:0
* ^FROM_MAILER
X=|my_script param1 param2 param3
:0A
* ? test -n "$X"
mail/filtered
it works. I can definitely live with that!
but I don't like the fact that I have to do it in 2 passes (one for
saving the script output in X and another for checking if anything was
actually saved in X);
also I'd like my script to reply via the return status of the script and
not via the output; it would be perfect if I could do:
:0
* ^FROM_MAILER
* ? my_script param1 param2 param3
mail/filtered
as I said: I can live with what I already have.
any clues?
[]s,
--
Otavio Exel /<\oo/>\ oe...@economatica.com.br