[exim] exim and unknown user

Top Page
Delete this message
Reply to this message
Author: Patrice
Date:  
To: exim-users
Subject: [exim] exim and unknown user
Hi,

I have setup an exim server + cyrus-imap + openldap ,

I need to extract the uid of the user from ldap , to be able to deliver
(because the local_part is not unique , (ie: multiple domains with same
local_part)
all is working fine but I have some troubles with unknown users, because
if user does not exist, 'data' take the value:     @testdomain.com


here is a part of my log:

LDAP search: no results
lookup failed
expanded: @testdomain.com
file is not a filter file
parse_forward_list: @testdomain.com
extract item: @testdomain.com
cyrus_uid router: defer for unknowntest@???
message: error in redirect data: no local part in "@testdomain.com"
search_tidyup called
unbind LDAP connection to localhost:389
>>>>>>>>>>>>>>>> Exim pid=3170 terminating with rc=1 >>>>>>>>>>>>>>>>

unknowntest@??? cannot be resolved at this time:
error in redirect data: no local part in "@testdomain.com"



here is my router

cyrus_uid:
    debug_print = "R: cyrus_uid for $local_part@$domain"
    driver = redirect
    redirect_router = cyrus_user
    allow_fail
    data = ${expand:${lookup ldapm {user="cn=Manager,dc=nice,dc=nm"
pass=secret ldap://localhost:389/dc=nice,dc=nm?
uid?sub?((mail=$local_part@$domain))}}}@$domain




How to say to the router to decline if nothing is extracted from ldap ?
or maybe, is there another solution to do what I want ?


Thank you very much for you support

Best Regards
Patrice