Hello,
Konstantin Boyandin wrote:
> Greetings,
>
> I need to pass outgoing (outgoing only) message to an external
> program, to make certain header transformations (namely, canonize
> certain To/From addresses) prior to their being actually sent. Could
> someone offer me the hints on how to do that?
>
> The program/script expects message on stdin and sends modified message
> to stdout for further processing/delivery.
>
It is relatively easy.
You can create a touter which calls a "custom" transport.
The router could look like this:
mypipe_router:
domains = internal.domain.tld
driver = accept
require_files = /home/example/mycommand
local_part_suffix_optional
transport = newspipe
The transport could be like this:
mypipe:
driver = pipe
command = /home/example/mycommand
return_path_add = false
return_fail_output = true
log_output = true
home_directory = "/tmp"
current_directory = "/tmp"
group = groupname