[Exim] authenticator/lookup problem

Top Page
Delete this message
Reply to this message
Author: Frank Elsner
Date:  
To: exim-users
Subject: [Exim] authenticator/lookup problem
I've a problem with authentification (plaintext).

Let's begin with the old and working version:

The authenticator reads:

 plain:
  driver = plaintext
  public_name = PLAIN
  server_condition = "${if \
         crypteq {$3} {${lookup{$2}dbm{DBM/auth_plain}{$value}fail}}{yes}{no}}"
  server_set_id = $2


And works very well when feeded with incorrect authentication data
as you can see:

SMTP<< auth plain AHN0dWViZXIAdmFiYW5xdWU=
search_open: dbm "/opt/exim/dbm/auth_plain"
search_find: file="/opt/exim/dbm/auth_plain"
key="stueber" partial=-1
LRU list:
1/opt/exim/dbm/auth_plain
End
internal_search_find: file="/opt/exim/dbm/auth_plain"
type=dbm key="stueber"
file lookup required for stueber
in /opt/exim/dbm/auth_plain
lookup failed
plain authenticator:
$1 =
$2 = stueber
$3 = vabanque
expansion failed: "lookup" failed and "fail" requested
SMTP>> 435 Unable to authenticate at present: "lookup" failed and "fail" requested

435 Unable to authenticate at present: "lookup" failed and "fail" requested
LOG: 0 MAIN REJECT
Authentication failed for komma.zedat.fu-berlin.de (test) [130.133.1.46]: 435 Unable to authenticate at present: "lookup" failed and "fail" requested

This works fine.

Now we come the problem case.
I tried to lookup more than one file (which I cannot mix into one)
with a new authenticator:

plain:
driver = plaintext
public_name = PLAIN
server_condition = \
"${if or {\
{crypteq {$3} {${lookup{$2}dbm{DBM/auth/mailszrz}{$value}}}}\
{crypteq {$3} {${lookup{$2}dbm{DBM/auth/linux}{$value}}}}\
{crypteq {$3} {${lookup{$2}dbm{DBM/auth/sp}{$value}}}}\
}{yes}{no} }"
server_set_id = $2

When fed with incorrect authentication data it incorrectly succeeds, strange.
But see yourself:

SMTP<< auth plain AHN0dWViZXIAdmFiYW5xdWU=
search_open: dbm "/opt/exim/dbm/auth/mailszrz"
search_find: file="/opt/exim/dbm/auth/mailszrz"
key="stueber" partial=-1
LRU list:
1/opt/exim/dbm/auth/mailszrz
End
internal_search_find: file="/opt/exim/dbm/auth/mailszrz"
type=dbm key="stueber"
file lookup required for stueber
in /opt/exim/dbm/auth/mailszrz
lookup failed
plain authenticator:
$1 =
$2 = stueber
$3 = vabanque
expanded string: yes
SMTP>> 235 Authentication succeeded

235 Authentication succeeded

*I* have absolutly no idea, really. Any pointer or hints on rewriting the 
                                    server_condition are very welcome.


Regards        _______________________________________________________________ 
Frank Elsner  /                           c/o  Technische Universitaet Berlin |
 ____________/                                 ZRZ, Sekr. E-N 50              |

|                                              Einsteinufer 17                |

|Voice: +49 30 314 23897                       D-10587 Berlin                 |
|SMTP : Elsner@???                Germany       _________________|
|____________________________________________________________| Ich habe fertig