Mailing List Archive

redirect router that calls a script that generates a .forward
Hi,

I would like to build a python script whose output (a stream with exim
filter commands) is piped to a redirect router.
Maybe in a more self explanatory way, each time the router is reached, it
launches the script that returns the .forward file to it.
Is that possible to set this or do I really need to input a file?

Thanks,

Fab

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
redirect router that calls a script that generates a .forward [ In reply to ]
Hi,

I would like to build a python script whose output (a stream with exim filter commands) is piped to a redirect router.
Maybe in a more self explanatory way, each time the router is reached, it launches the script that returns the .forward file to it.
Is that possible to set this or do I really need to input a file?

Thanks,

Fab

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: redirect router that calls a script that generates a .forward [ In reply to ]
On 04/03/2024 14:09, Fabien LUCE via Exim-users wrote:
> Maybe in a more self explanatory way, each time the router is reached, it
> launches the script that returns the .forward file to it.

A redirect router, using a "data" option, which has as its value
a "${run ...}" expansion, that calls the python, that returns the
"non-filter redirection list" (ie. a .forward file).

https://exim.org/exim-html-current/doc/html/spec_html/ch-the_redirect_router.html

(You're doing something fairly complex. Be careful of the security aspects.)
--
Cheers,
Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: redirect router that calls a script that generates a .forward [ In reply to ]
Thanks!
Yes I will take care of it as much as I can.

On Mon, 4 Mar 2024 at 15:43, Jeremy Harris via Exim-users <
exim-users@lists.exim.org> wrote:

> On 04/03/2024 14:09, Fabien LUCE via Exim-users wrote:
> > Maybe in a more self explanatory way, each time the router is reached, it
> > launches the script that returns the .forward file to it.
>
> A redirect router, using a "data" option, which has as its value
> a "${run ...}" expansion, that calls the python, that returns the
> "non-filter redirection list" (ie. a .forward file).
>
>
> https://exim.org/exim-html-current/doc/html/spec_html/ch-the_redirect_router.html
>
> (You're doing something fairly complex. Be careful of the security
> aspects.)
> --
> Cheers,
> Jeremy
>
>
> --
> ## subscription configuration (requires account):
> ##
> https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
> ## unsubscribe (doesn't require an account):
> ## exim-users-unsubscribe@lists.exim.org
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: redirect router that calls a script that generates a .forward [ In reply to ]
Am 04.03.24 um 15:50 schrieb Fabien LUCE via Exim-users:
> Thanks!
> Yes I will take care of it as much as I can.

In that case, you would use a database connection, which simplifys the
entire task and saves a lot of cpu cycles.

Starting a python interpreter for every mail is just a waste of a lot of
energy.

best regards,
Cyborg