Re: [exim] Router and transport for modifing message

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: improve.ripeness774
Fecha:  
A: exim-users
Asunto: Re: [exim] Router and transport for modifing message
On Tue, Apr 25, 2023 at 11:59:25AM +0300, mouse via Exim-users wrote:

> Hello. I'm using transport_filter to modify certain incomimg e-mail
> (for example, to set proper encoding for some headers). Based on
> others experience here is my configuration:


> # Router
> send_to_modify_email:
>     senders = <list_of_senders_whose_email_is_bad>
>     domains = +local_domains
>     no_verify
>     condition = ${if !eq {$received_protocol}{send_to_modify_email{1}{0}}
>     driver = accept
>     transport = send_to_modify_email

>
> # Transport
> send_to_modify_email:
>     driver = pipe
>     command = /usr/local/exim/bin/exim -oMr send_to_modify_email -bS
>     use_bsmtp = true
>     transport_filter = <path_to_modifing_script>


> My question is - is there any way to just pass e-mail through
> modifing script *without re-injecting* email via "command = ..."?


Why do you need to re-inject? By the time a transport is selected,
exim is already chomping at the bit to deliver the message. A
transport_filter just changes the contents of the message but not the
metadata or how it's gonna be delivered. What's the problem with just
proceeding with delivery after the filter runs?

--
Ian