Re: [exim] Checking against two LOGIN mecanisms in one insta…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Stephen Gran
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Checking against two LOGIN mecanisms in one instance of
On Wed, Aug 25, 2004 at 08:21:36AM +0200, Jarek said:
> I found explanation of this statement in exim-html documentation (or
> {{<cond1>}{<cond2>}...}) now I'm trying to set something like:
>
> ${if or {{<cond1>}{<cond2>}} {yes}{no}}
>
> where:
> <cond1>={eq{${if and {{!eq{$1}{}}{!eq{$2}{}}{crypteq{$2}{\{md5\\}${lookup
> mysql{SELECT password FROM boxes WHERE user_name='$1'}{$value}fail}}}}}
> {1}{0}}}{1}}
>
> <cond2>={eq{${if saslauthd{{$1}{$2}}{1}{0}}}{1}}
>
> Well i'm stuck, this is a bit tricky for me.


server_condition="${if or {\
  {and {{!eq{$1}{}}{!eq{$2}{}}{crypteq{$2}{\{md5\\}\
    {lookup mysql{SELECT password FROM boxes WHERE user_name='$1'}{$value}fail}}}}{1}}\
  {saslauthd{{$1}{$2}}}\
  }{yes}{no}}"


I am not sure about the SQL line - I am using LDAP for primary and
falling through to a flat file, and neither of them has to do the empty
string checking that you are doing for SQL. Hopefully that's enough to
get you futher along though - maybe one of people really good at exim's
syntax will jump in - my eyes always start to cross when the curly
braces get too common :)
--
--------------------------------------------------------------------------
|  Stephen Gran                  | *** Topic for #redhat:  ReDHaT is the   |
|  steve@???             | answer to all your problems. It         |
|  http://www.lobefin.net/~steve | could be the start too!                 |

--------------------------------------------------------------------------