[exim] smtp authentication using default domain

Top Pagina
Delete this message
Reply to this message
Auteur: alexis
Datum:  
Aan: exim-users
Onderwerp: [exim] smtp authentication using default domain
Hello all, im using

server_condition = "${if and { \
                       {!eq{$1}{}} \
                       {!eq{$2}{}} \
                       {crypteq{$2}{\\{md5\\}${lookup mysql{SELECT
password FROM users WHERE username='${local_part:$1}' AND domain=
'${domain:$1}'}{$value}fail}}} \
                       } {yes}{no}}"


for fixed_login on smtp authentication, i tried to add a condition to
"if not domain is provided on $1, use this default domain" modifying
the last as

server_condition = "${if and { \
                    {eq {${domain:$1}}{}{defaultdomain.com}} \
                       {!eq{$1}{}} \
                       {!eq{$2}{}} \
                       {crypteq{$2}{\\{md5\\}${lookup mysql{SELECT
password FROM users WHERE username='${local_part:$1}' AND domain=
'${domain:$1}'}{$value}fail}}} \
                       } {yes}{no}}"



and im getting

28662 fixed_login authenticator:
28662   $auth1 = amf
28662   $auth2 = ashuda
28662   $1 = amf
28662   $2 = ashuda
28662 expanding: $1
28662    result: amf
28662 expanding: ${domain:$1}
28662    result:
28662 expanding:
28662    result:
28662 failed to expand: ${if and { {eq
{${domain:$1}}{}{defaultdomain.com}} {!eq{$1}{}} {!eq{$2}{}}
{crypteq{$2}{\{md5\}${lookup mysql{SELECT password FROM users WHERE
username='${local_part:$1}' AND domain='${domain:$1}'}{$value}fail}}}
} {yes}{no}}
28662    error message: missing } at end of condition inside "and" group
28662 expansion failed: missing } at end of condition inside "and" group
28662 expanding: $1
28662    result: amf


what's wrong? thanks for the help.

regards