Re: [exim] LDAP router section - part 2

Top Page
Delete this message
Reply to this message
Author: Nigel Wade
Date:  
To: exim-users
Subject: Re: [exim] LDAP router section - part 2
On 16/09/10 13:49, Stanczak Slawomir wrote:
> On Thu, 16 Sep 2010, Nigel Wade wrote:
>
> Thank you for your hlep.
>
> I will use real names. I have simple LDAP base on one mail host
> (not for all environment).
>



> Router configuration:
>
> ldap_user:
>    debug_print = "R: ldap_user for $local_part@$domain"
>    driver = accept
>    domains = +local_domains
>    condition = ${lookup 
> ldap{ldap:///UBASE?uid?sub?(uid=${quote_ldap:$local_part})}{$value}}
>    transport = local_delivery
>    --------------------------
>    cannot_route_message = Unknown user


Ok, so this is now working? It looks ok and your test gets to delivery
so I presume the recipient is accepted and routed.

>
> Transport configuration:
>
> local_delivery:
> ---------------
>    debug_print = "T: local_delivery for $local_part@$domain"
>    driver = appendfile
>    directory = $home/Maildir
>    create_directory
>    create_file = anywhere
>    delivery_date_add
>    envelope_to_add
>    return_path_add
>    maildir_format
>    directory_mode = 0700
>    mode = 0660
>    mode_fail_narrower = false
>    group = Debian-exim

>
> It's fine. Exim find LDAP user but it can't deliver message:
>
> opr@??? R=ldap_user T=local_delivery defer (13):
> Permission denied: cannot create /Maildir
> -----------------------------------------
>
> Why "/Maildir"?
> ---------------


> <opr@???> transport=local_delivery
> 14:36:05 14299 uid=100 gid=102 pid=14299
> 14:36:05 14299 auxiliary group list: <none>
> 14:36:05 14299 home=NULL current=/


$home is only set for local users when you use check_local_user in the
router. Your router doesn't use this option so $home is not set, the
debug output shows home=NULL. So $home/Maildir ends up as just /Maildir.

For non-local accounts you can set the "home" directory with various
options: router_home_directory or transport_home_directory in the
router, or home_directory in the transport. Or just set an explicit
value for directory in the transport.

-- 
Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@???
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555