On Fri, 13 Sep 2002, Andre Docena Correa wrote:
>
> Hi again, I was trying to solve my autoreply problem and figured out a
> transport for my needs. There is just a comparision problem that I
> cannot solve alone: (I am using exim 4.02)
>
> MYSQL_AUTOREPLY_CHECK = SELECT autoreply from passwd where \
> id = '${local_part}@${domain}'
>
>
> mysql_autoresponder:
> driver = accept
> condition = \
> ${if eq {"1"} \
> {${lookup mysql {MYSQL_AUTOREPLY_CHECK}}} }
> transport = mysql_autoresponder_delivery
> errors_to = ...@....com
> unseen
Er, the end result of condition should be 0 or 1, you dont need to check
it.
Eg, ${if eq{foo}{bar}{1}{0}}
would always return 0
${if eq{bar}{bar}{1}{0}}
would always return 1
In a router:
condition = 1
would cause the router to always run
and
condition = 0
to never run
>
> In my DB, the field "autoreply" is a tinyint(1) that has a value
> of '1' in it. How do I make this comparision work?!
>
> I've tried eq {'1'}, eq {1}, eq {"1"} without success...
>
> Any help will be really appreciated
>
> tks in advance.
>
> Andre Docena Correa
> andre.docena@???
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>