[EMAIL PROTECTED] writes: > This has been brought up before, but as far as I know there is no > way to add dynamic/shell escaped headers in the TMDA outgoing filter.
I suggested this in October 2002 and we couldn't come up with a real need, so we "de-prioritized" it. <wink> Last night Jason and I were talking about adding it back in precisely because of this (HashCash). > I had quick peek at the source, and it seems syntax along the lines of > > to * tag > X-hashcash shell="hashcash -b20 $RECIPIENT_ADDRESS" > > would not be too hard to add. Although I don't know much about how > the variable interpolation would work. The mechanics of variable interpolation in the filter parser are such that the above would work, if RECIPIENT_ADDRESS were defined in the config file or in the environment. With regard to interpolation, the parser knows nothing of quotes, which actually turns out to be to our advantage. With regard to RECIPIENT_ADDRESS, it's actually spelled TMDA_RECIPIENT and, if the message is sent to multiple recipients, it is updated for each recipient before parsing/searching the filter with that recipient's address. In other words, with the addition of the shell escape/capture of stdout, everything else is in place. > I would be willing to put a few hours into it, if the idea (or > some variation) seem palatable. I suppose python escapes are another > natural idea. Yep, they are. I had toyed with the idea of using shell syntax for program output capture: "$(hashcash -b20 $TMDA_RECIPIENT)" instead of the above, but "shell='shell command line'" is fine and, in fact, would mean that a "python='some Python code here'" escape would have a consistent syntax. If you're up for grunging through FilterParser, have a go at it! I am deep in the guts of re-organizing of TMDA library code and don't have the inclination to switch gears right now. I'll of course be available for any FilterParser questions, should you run across unexplained weirdnesses. Tim _________________________________________________ tmda-workers mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-workers
