Mailing List Archive

changing envelope from within an user filter
Hi,

I'd like to run a filter per recipient (however filters are managed by
the admin), basically something like

filter:
driver = redirect
domains = ${if exists{CONFDIR/virtual.d/}{dsearch;CONFDIR/virtual.d}{}}
file = CONFDIR/virtual.d/$domain/$local_part
user = Debian-exim
allow_filter = true
allow_fail = true
allow_defer = true
reply_transport = filterreply
directory_transport = filterdirectory


However, I'd like to be able to change the envelope from address when
forwarding to others. 'errors_to' seems however only to be supported
in system filters. However, in a system filter, I cannot adjust for
just one recipient but have to take care of the full message (if I
understand that correct), especially it is only run once even if
multiple of my recipients would qualify.


What would be the most appropriate way to set the envelope from
address in this situation (apart from replacing my system filter with
a hand-crafted router)?


Regards,
Andi

PS: This is my second try in sending out that mail (with a bit
different subject), the first one didn't reach me back (and I can see
it neither on the list page), so I hope noone is getting this as
duplicate message.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: changing envelope from within an user filter [ In reply to ]
On 18/09/2021 11:17, Andreas Barth via Exim-users wrote:
> What would be the most appropriate way to set the envelope from
> address in this situation

Does the return_path transport option do what you need?

--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: changing envelope from within an user filter [ In reply to ]
* Jeremy Harris via Exim-users (exim-users@exim.org) [210920 13:43]:
> On 18/09/2021 11:17, Andreas Barth via Exim-users wrote:
> >What would be the most appropriate way to set the envelope from
> >address in this situation
>
> Does the return_path transport option do what you need?

This works from an transport (or similar within an router), but I'd
like to take the decision in an filter script, and not within the main
configuration file.

Is there a way to achive that? (To do that with routers / transports
is of course possible but I'd like to avoid splitting the
configuration that way.)


Andi

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: changing envelope from within an user filter [ In reply to ]
On 20/09/2021 17:05, Andreas Barth via Exim-users wrote:
> I'd
> like to take the decision in an filter script, and not within the main
> configuration file.
>
> Is there a way to achive that?

Nothing that comes to mind is particularly convenient.

I'd suggest that you can probably do anything you want
in a data-time ACL, equivalent to doing it in a system
filter, and that would give you the use of any named
acl variable - set in ACL and use for expansion in the
transport.
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/