Mike Cardwell wrote:
> * 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 [EMAIL PROTECTED] ?
> 
> 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 "[EMAIL PROTECTED]" rather than
> "mailbox=testuser host=testhost.qub.ac.uk" as the result is a single
> value, rather than a list.
> 
> Mike
> 
Thanks Mike, that seems to do it. however...

bash3.1 #exim -bt [EMAIL PROTECTED]
[EMAIL PROTECTED] cannot be resolved at this time: failed to expand 
"${lookup mysql{select concat(mailbox,'@',host) from routing where alias 
= '${quote_mysql:$local_part}'}}": lookup of "select 
concat(mailbox,'@',host) from routing where alias = 'r.mcglue'" gave 
DEFER: incomplete MySQL server data: sXT
[EMAIL PROTECTED] ~]#

whereas


mysql> select concat(mailbox,'@',host) from routing where alias = 
'r.mcglue';
+-----------------------------+
| concat(mailbox,'@',host)    |
+-----------------------------+
| [EMAIL PROTECTED]       |
+-----------------------------+
1 row in set (0.00 sec)


whats this?

R
-- 
Regards

Ronan McGlue

===================
Analyst / Programmer
Queens University Belfast

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

Reply via email to