Re: [Exim] rewrite rules with mysql

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Philip Hazel
Data:  
Para: Margrit.Lottmann
CC: exim-users
Assunto: Re: [Exim] rewrite rules with mysql
On Wed, 22 Aug 2001 Margrit.Lottmann@??? wrote:

> I've attampted following rule:
>
> *@mysql;select domain from local_domains where \
> domain='${quote_mysql::$domain}' "${lookup mysql{select main_addr from \
> synonyms where syn_addr= \
> '${quote_mysql:$local_part@$domain}'}{$value}fail}" Fftq
>
> I hope, You can read the whole line !
>
> exim dididn't start ...unknown (o) flag... (panic-file)


The problem here is that, although lookups are permitted in the pattern
that matches the incoming address, there is no provision for handling
spaces in the pattern. This is because I didn't forsee this kind of
lookup when I first implemented rewrites.

I will think about this for Exim 4. Meanwhile, you have to recast your
rewrite rule like this:

*@*  "${lookup mysql{select domain from local_domains where \
      domain='${quote_mysql::$domain}'}
      {\
      ${lookup mysql{select main_addr from \
      synonyms  where syn_addr= \
      '${quote_mysql:$local_part@$domain}'}{$value}fail}\
      }\
      fail}" Fftq



-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.