Autor: Nico Erfurth Data: Para: Rich CC: exim-users Assunto: Re: [Exim] Setting a dynamic From: in Autoreply transport
Rich wrote: > In an autoreply transport, you can specify what to use as the "From"
> header in the generated reply.
>
> If undefined, Exim uses the local_part, domain and system gecos field as
> the "From". It can also be specified with "from = $local_part@$domain".
> Or, you can specify some global address, "from =
> autreply-daemon@???".
>
> But, is there a way you can set this dynamically for virtual domains and
> aliases?
>
> For example, a message comes in for "webmaster@???", which is
> an alias for "dm4031@???". Their autoreply should say "From:
> webmaster@???". But, obviously the local_part Exim sees is
> "dm4031".
>
> Can Exim be told to look in the "file = autoreply.msg" for a "From"
> header, or somehow use the original RCPT? A lookup?
Just use
from = ${lookup {$local_part} lsearch {/etc/exim/localpart_2_reply}}
Or use whatever lookup type you prefer.
but you can also try to use