[Exim] Re: Re: mysql expansion

Top Page
Delete this message
Reply to this message
Author: Artem S. Tashkinov
Date:  
To: exim-users
Subject: [Exim] Re: Re: mysql expansion
Nico Erfurth wrote:

> On Sat, 25 Jan 2003, Artem S. Tashkinov wrote:
>
>
>> Some people have already told me that this problem was discussed on this
>> mailing list long before but I couldn't find that message. I have this
>> router:
>>
 >> mysql_user:
 >>   driver = accept
 >>   condition = \
 >>    ${if eq{} \
 >>      { ${lookup mysql {SELECT maildir FROM users \
 >>          WHERE id='${local_part}@${domain}'}} \
 >>      } \
 >>      {no}{yes} \
 >>    }
 >> #  retry_use_local_part
 >>   transport=mysql_delivery

>>
>> the problem is that exim thinks that condition is true even if mysql
>> returns empty string (that actually means user doesn't exist). How
>> should I change the condition in order exim treats mysql answer

properly?
>
>
>
> Who told you that this is wrong?
> your ${if eq" will catch the case of a non existing user, but you can

make
> this easier
>
> condition = ${lookup mysql {YOUR LOOKUP}{yes}{no}}
>
> This will return yes if the lookup returned any value, or no if not.
>
> Nico
>
>
>



It's not that true and what I can see in exim's main.log:

2003-01-25 18:03:27 18cPgY-0002xg-00 == nonexistusser@???
R=mysql_user T=mysql_delivery defer (-21): appendfile: file or directory
name "" is not absolute

any ideas?

Artem Tashkinov