Autor: Tim Jackson Data: A: exim-users Assumpte: Re: [exim] Exim Final Delivery to XML SOAP WebService
On Thu, 7 Jul 2005 09:59:00 +0100
"Chris Bond" <chris@???> wrote:
> Currently im using exim and its final delivery method is currently
> maildir. Im currently changing the infrastructure on the network and
> would like exim todo the final delivery to an XML SOAP WebService.
> Has anybody done this before or got any examples how to achieve this?
No, but I have done special-purpose deliveries to "non traditional"
mechanisms like a database.
The long and short of it is that unless you want to write some funky
new kind of transport that can speak SOAP internally, you probably just
want to write a script of some kind in the language of your choice
which is called by an Exim pipe transport. This script will then take
the message, do any necessary post-processing and do the SOAP call. A
PHP or Perl script would probably do the job quite well.
Just a note: you will probably want to consider failure scenarious
carefully and keep a close eye on what the intermediate script outputs,
and what exit codes it returns, to make sure you don't end up bouncing
mail and/ or returning mails to senders that expose all manner of
internal stuff like connection failures etc. So, for example, you might
have something like this (untested simplified variation of something I
use):
special_xmlsoap_transport:
driver = pipe
command = /path/to/your/script
user = unprivuser
group = unprivuser
# pick up any secondary group perms we should have, assuming they are
# needed
initgroups
# to aid debugging; errors_to should be set!
# to use this your script should be quiet except in case of error
# otherwise use return_fail_output
# note also temp_errors
return_output