Re: [Exim] Setting a dynamic From: in Autoreply transport

Pàgina inicial
Delete this message
Reply to this message
Autor: Nico Erfurth
Data:  
A: Rich
CC: exim-users
Assumpte: 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

from = $original_local_part@$original_domain

this should use the address before any aliasing.

ciao