Re: [exim] LDAP router section - part 2

Top Page
Delete this message
Reply to this message
Author: Stanczak Slawomir
Date:  
To: exim-users
Subject: Re: [exim] LDAP router section - part 2
On Thu, 16 Sep 2010, Stanczak Slawomir wrote:

> local_delivery:
> ---------------
> debug_print = "T: local_delivery for $local_part@$domain"
> driver = appendfile
> directory = $home/Maildir

[...]

I changed it:

local_delivery:
debug_print = "T: local_delivery for $local_part@$domain"
driver = appendfile
directory = ${lookup ldap {ldap:///UBASE?homeDirectory?one?uid=${local_part}}{$value/Maildir/}fail}
---------------------------------------------------------------------------------------------------
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

Exim find LDAP user and user directory but still it can't deliver message:

2010-09-16 15:28:39 1OwEVy-0003nv-TS == opr@???
R=ldap_user T=local_delivery defer (13): Permission denied: cannot chdir
to /home/prac/sec/opr/Maildir/

15:28:39 14630 LRU list:
15:28:39 14630 internal_search_find: file="NULL"
15:28:39 14630   type=ldap 
key="ldap:///ou=people,dc=pam,dc=szczecin,dc=pl?homeDirectory?one?uid=opr"
15:28:39 14630 database lookup required for 
ldap:///ou=people,dc=pam,dc=szczecin,dc=pl?homeDirectory?one?uid=opr
15:28:39 14630 LDAP parameters: user=NULL pass=NULL size=0 time=0 
connect=0 dereference=0 referrals=on
15:28:39 14630 perform_ldap_search: ldap URL = 
"ldap:///ou=people,dc=pam,dc=szczecin,dc=pl?homeDirectory?one?uid=opr" 
server=ara.pam.szczecin.pl port=389 sizelimit=0 timelimit=0 tcplimit=0
15:28:39 14630 after ldap_url_parse: host=ara.pam.szczecin.pl port=389
15:28:39 14630 ldap_initialize with URL ldap://ara.pam.szczecin.pl:389/
15:28:39 14630 initialized for LDAP (v3) server ara.pam.szczecin.pl:389
15:28:39 14630 LDAP_OPT_X_TLS_TRY set
15:28:39 14630 binding with user=NULL password=NULL
15:28:39 14630 Start search
15:28:39 14630 ldap_result loop
15:28:39 14630 LDAP entry loop
15:28:39 14630 LDAP attr loop homeDirectory:/home/prac/sec/opr
15:28:39 14630 search ended by ldap_result yielding 101
15:28:39 14630 ldap_parse_result: 0
15:28:39 14630 ldap_parse_result yielded 0: Success
15:28:39 14630 LDAP search: returning: /home/prac/sec/opr
15:28:39 14630 lookup yielded: /home/prac/sec/opr
15:28:39 14630 expanding: $value/Maildir/
15:28:39 14630    result: /home/prac/sec/opr/Maildir/
15:28:39 14630 expanding: ${lookup 
ldap{ldap:///ou=people,dc=pam,dc=szczecin,dc=pl?homeDirectory?one?uid=${local_part}}{$value/Maildir/}fail}
15:28:39 14630    result: /home/prac/sec/opr/Maildir/
15:28:39 14630 appendfile: mode=660 notify_comsat=0 quota=0 warning=0
15:28:39 14630   directory=/home/prac/sec/opr/Maildir/ format=maildir
---------------------------------------------------------------------
15:28:39 14630   message_prefix=null
15:28:39 14630   message_suffix=null
15:28:39 14630   maildir_use_size_file=no
15:28:39 14630 ensuring maildir directories exist in 
/home/prac/sec/opr/Maildir/
15:28:39 14630 search_tidyup called
15:28:39 14630 unbind LDAP connection to ara.pam.szczecin.pl:389
15:28:39 14629 local_delivery transport returned DEFER for 
opr@???
15:28:39 14629 added retry item for T:opr@???: errno=13 
more_errno=0 flags=0
15:28:39 14629 post-process opr@??? (1)
15:28:39 14629 LOG: MAIN
15:28:39 14629   == opr@??? R=ldap_user T=local_delivery 
defer (13): Permission denied: cannot chdir to /home/prac/sec/opr/Maildir
-------------------------------------------------------------------------


ara:~# ls -l /home/prac/sec
total 24
drwx-----x  4 opr      sec  4096 2010-09-16 12:06 opr


ara:~# ls -l /home/prac/sec/opr
total 8
drwx------ 8 opr sec 4096 2010-09-16 12:04 Maildir

ara:~# ls -l /home/prac/sec/opr/Maildir
total 48
drwx------ 2 opr sec  4096 2010-09-04 05:30 cur
drwx------ 2 opr sec  4096 2010-09-16 12:04 new
-rw------- 1 opr sec    25 2010-09-04 05:30 subscriptions
drwx------ 2 opr sec  4096 2010-09-16 12:04 tmp


ara:~# ls -l /usr/sbin/exim4
-rwsr-xr-x 1 root root 848112 2008-09-30 20:57 /usr/sbin/exim4

I don't understand it.

Regards

Slawomir Stanczak