Re: [Exim] Crazy expansion

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Peter Galbavy
Data:  
Para: exim-users, Vadim Vygonets
Asunto: Re: [Exim] Crazy expansion
> fixed_login:
> driver = plaintext
> public_name = LOGIN
> server_prompts = "Username:: : Password::"
> server_condition = "${if eq {${if match{$1}{@}{yes}{no}}}{yes}\
> {${if and{\
> {match{$1@$2}{(^[^@]+)@([^@]+)@(.+)\\$}}\
> {exists{/path/to/$2/passwd}}\
> {crypteq {${lookup{$1}lsearch{/tmp/$2/passwd}{$value}}}\
> {$3}}}\
> {yes}{no}}}\
> {${if pam{$1:$2}{yes}{no}}}}"
> server_set_id = $1


Argh. Macro's are your friends.

My config files (similar problem, bot exactly the same) say:

#
# Macros
#
EXIM_HOME       = /etc/exim
EXIM_DB         = EXIM_HOME/db


...

AUTH_ACCOUNT    = ${lookup{${domain:$1}}dbm{EXIM_DB/localdomains}{$value}}
AUTH_PASSWD     = ${lookup{AUTH_ACCOUNT}nis{passwd.byname}{$value}}
AUTH_USERDIR    = ${extract{6}{:}{AUTH_PASSWD}}
AUTH_MAILDIR    = AUTH_USERDIR/domains/${domain:$1}/mail
AUTH_USERPW     = ${lookup {${local_part:$1}} lsearch {AUTH_MAILDIR/passwd}
{$value}}


...

plain_password:
driver = plaintext
public_name = PLAIN
server_condition = ${if crypteq{$2}{AUTH_USERPW} {1}}
server_set_id = $1

login_password:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${if crypteq{$2}{AUTH_USERPW} {1}}
server_set_id = $1