[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tmda-workers
Subject:    Re: Running Programs/Python functions from Filter Files
From:       Tim Legant <tim-dated-1034912158.26023c () catseye ! net>
Date:       2002-10-11 3:35:56
[Download RAW message or body]

"Jason R. Mastaler" <jason@mastaler.com> writes:

> Tim Legant <tim-dated-1034896094.caeb8a@catseye.net> writes:
> 
> > I believe I could add that syntax to the filter file format in the
> > same way I've added variable interpolation (${VARIABLE}).  The output
> > of the program would be substituted into the filter text.
> 
> Couldn't you just execute the program from your .tmda/config instead
> and store the result as a string in a variable, and then reference
> that variable from the filter file?

Yes, with the issues related to timing that we've previously talked
about in regard to the batch processing.  When should the
program/function be run?  If there are no cases where it matters, then
just initializing stuff in .tmda/config is certainly easier.

On the other hand, if you want access to the mail message (say, for
example, to pass it on stdin to the program you're executing), you're
SOL.  It hasn't been read by TMDA yet when your function or program
executes.  If stdin isn't seekable, you can't rewind, which means that
when tmda-rfilter attempts to read the message from stdin, it'll just
get an EOF.  Probably not good. <wink>

For most cases, though, I would think that running from .tmda/config
would suffice.


Tim
_________________________________________________
tmda-workers mailing list (tmda-workers@tmda.net)
http://tmda.net/lists/listinfo/tmda-workers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic