Re: [exim] mysql expansion

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Mike Cardwell
Data:  
Para: exim-users
Assunto: Re: [exim] mysql expansion
* on the Mon, Feb 26, 2007 at 03:37:09PM +0000, #Ronan McGlue wrote:

> My redirect router looks like
>
>
>    data = ${lookup mysql{select mailbox,host from routing where alias = 
> '${quote_mysql:$local_part}'}}

>
> according to the spec this will return
>
> mailbox=testuser host=testhost.qub.ac.uk
>
> how do i change this to be mailbox@host ?


Do it in the query it's self:

data = ${lookup mysql{select concat(mailbox,'@',host) from routing where alias = '${quote_mysql:$local_part}'}}

That will return "testuser@???" rather than
"mailbox=testuser host=testhost.qub.ac.uk" as the result is a single
value, rather than a list.

Mike