On Tue, Nov 20, 2012 at 11:09:54AM -0500, Robert Blayzor wrote:
> I have an Exim router looking up a simple redirect from one domain to another:
>
> db_routed:
> driver = redirect
> allow_defer
> allow_fail
> domains = +db_dns
> data = ${lookup pgsql {REDIR_SQL}{$value}fail}
> user = mailnull
> group = mail
> pipe_transport = address_pipe
> file_transport = address_file
>
> The query works, and returns:
>
> [email protected]
>
> However the "$local_part" is never expanded and is used literally... from the
> log:
>
> 2012-11-20 15:45:57 1Taq1N-0000LE-1P ** [email protected]
> <[email protected]>: No such mailbox
>
> Does string expansion not happen on data returned by the database? ideas on
> what to check?
Expansion only runs once on the original string. You can force a second
expansion by using:
data = ${expand:${lookup pgsql {REDIR_SQL}{$value}fail}}
--
Dean Brooks
[email protected]
--
## 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/