Re: [Exim] Crazy expansion

Top Page
Delete this message
Reply to this message
Author: Vadim Vygonets
Date:  
To: exim-users
Subject: Re: [Exim] Crazy expansion
Quoth Peter Galbavy on Sat, May 06, 2000:
> Argh. Macro's are your friends.


Yes. Dave will macroize it if he feels like it.

> AUTH_USERPW     = ${lookup {${local_part:$1}} lsearch {AUTH_MAILDIR/passwd}
> {$value}}

>
> public_name = PLAIN
> server_condition = ${if crypteq{$2}{AUTH_USERPW} {1}}
>
> public_name = LOGIN
> server_condition = ${if crypteq{$2}{AUTH_USERPW} {1}}


A problem. In PLAIN, username is $2 and password is $3. While
with the authenticators I wrote you can still macroize about half
of them, to macroize all of the server_condition you need macro
support like this of C pre-processor. Say,

#define AUTH_USERPW(user, pass)    \
    ${if crypteq{pass}\
    {${lookup{${local_part:user}}lsearch{AUTH_MAILDIR/passwd}{$value}}}{1}}


server_condition = AUTH_USERPW($1, $2)

But it's impossible to do in Exim right now.

Vadik.

--
Taunt not the sysadmin, for he can become you and make your life
interesting.