You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Noel J. Bergman" <no...@devtech.com> on 2003/06/27 04:01:09 UTC
Piping to external applications
[From community@: RE: WORA Considered Evil ;-)]
> Java is the glue, let's glue it to what we have and trust... I believe
that
> 3 years ago, I asked him to do a mailet that could be an interface to
> "/usr/(lib|sbin)/sendmail", using Runtime.createProcess... After 2 years,
< that mailet didn't come up, and well, I decided to use EZMLM.
That is "before my time", but I will point out that we do have users who
have implemented anti-virus scanning in a similar manner. The message is
written out to disk, and Runtime.exec() is used to launch the native
application.
ref: http://portale.praxis.it/pub/james/
I don't see why the same basic code couldn't be used for:
<mailet match="..." class="PipeToExternal">
<command>/<path>/<executable> [replaceable parameter list]</command>
[<passthrough>false</passthrough>]
</mailet>
e.g.,
<mailet match="..." class="PipeToExternal">
<command>/usr/lib/sendmail -B7bit -f${sender} -- ${recipients}</command>
</mailet>
This would not be a difficult, or even non-portable, construction. One
question is what, if anything, to do with the output from the command. What
did you have in mind?
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org