1 (edited by alexp 2011-03-29 16:37:39)

Topic: shared folder not working with ldap -- SOLVED

hi all,

i just can't get shared folder to work.

i've installed the latest iredmail (0.70 rc1) on a fresh ubuntu 10.04. then i followed the instructions from http://www.iredmail.org/wiki/index.php? … MAP.Folder. most of the things are already set in the latest release rc1 i only needed to enable acl and imap_acl in dovecot.conf.
the instructions in the wiki partially use different mysql users than the current files (vmailuser vs. iredadmin), also the mysql table "share_folder"" does belong to the database "iredadmin" instead of "vmail".. but when i set acls via telnet the table in mysql gets properly filled with an entry so this seems to work.

via telnet i've shared the folder "Sent" of the user www@ like in the instructions.

i set mail_debug to yes in dovecot, this is what i get when i log in as www:

--
Mar 23 20:38:25 imap-login: Info: Login: user=<www@rendertaxi.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Loading modules from directory: /usr/lib/dovecot/modules/imap
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Loading modules from directory: /usr/lib/dovecot/modules/imap
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib02_imap_acl_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib02_imap_acl_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Effective uid=1000, gid=1000, home=/var/vmail
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota root: name=user backend=dict args=:proxy::quotadict
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Effective uid=1000, gid=1000, home=/var/vmail
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota root: name=user backend=dict args=:proxy::quotadict
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota rule: root=user mailbox=* bytes=104857600 messages=0
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota warning: bytes=89128960 (85%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 85
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota warning: bytes=94371840 (90%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 90
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota warning: bytes=99614720 (95%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 95
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: dict quota: user=www@rendertaxi.de, uri=proxy::quotadict, noenforcing=0
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota rule: root=user mailbox=* bytes=104857600 messages=0
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota warning: bytes=89128960 (85%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 85
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota warning: bytes=94371840 (90%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 90
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: maildir: data=~/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Quota warning: bytes=99614720 (95%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 95
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: dict quota: user=www@rendertaxi.de, uri=proxy::quotadict, noenforcing=0
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: maildir++: root=/var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir, index=, control=, inbox=/var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl: initializing backend with data: vfile
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl: acl username = www@rendertaxi.de
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl: owner = 1
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: maildir: data=~/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl vfile: Global ACL directory: (null)
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: maildir++: root=/var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir, index=, control=, inbox=/var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Namespace: type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl: initializing backend with data: vfile
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: shared: root=, index=, control=, inbox=
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl: acl username = www@rendertaxi.de
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl: owner = 1
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl vfile: Global ACL directory: (null)
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Namespace : Using permissions from /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir: mode=0700 gid=-1
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Namespace: type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: shared: root=, index=, control=, inbox=
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Namespace : Using permissions from /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir: mode=0700 gid=-1
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl vfile: file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/dovecot-acl not found
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Disconnected: Logged out bytes=254/3826
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl vfile: file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/dovecot-acl not found
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl vfile: reading file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/.Sent/dovecot-acl
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl vfile: file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/.Trash/dovecot-acl not found
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl vfile: file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/.Drafts/dovecot-acl not found
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: acl vfile: file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/.Junk/dovecot-acl not found
Mar 23 20:38:25 dict: Error: sql dict iterate: Invalid/unmapped path: shared/shared-boxes/anyone/
Mar 23 20:38:25 IMAP(www@rendertaxi.de): Info: Disconnected: Logged out bytes=233/880
--

when i log in as another user (the one i shared the folder to), roundcube doesn't show the additional folder like in your example screenhsot from roundcube.
do i miss something? does roundcube need an additional plugin? also logging in with thunderbird doesn't offer the folder for subscription.

any help is heavily appreciated.

best regards, alex

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: shared folder not working with ldap -- SOLVED

I didn't have it working with OpenLDAP backend yet, but it works with MySQL backend (tested with openSUSE + MySQL).
Still need some troubleshooting. Sorry.

3

Re: shared folder not working with ldap -- SOLVED

hi ZhangHuangbin,

thanks for your answer. i don't understand why this is related to LDAP? everything is mysql related which needs to be set to get shared folders working.. but maybe its me.. smile

i am trying to track this down. the bigger goal is to also install sogo on  top so i am bound to LDAP. so if i keep asking questions maybe we can lead it to a working ldap version as well.

does iredadmin pro give me further possibilities? i would puchase it if it then works!

still your project is great! very good! keep it going!

best regards, alex

4

Re: shared folder not working with ldap -- SOLVED

hi ZhangHuangbin,

i installed the version with mysql backend and there sharing works like you described. i compared the dovecot-logs to see what are the differences in setup.
my conclusion now is that the ldap version of iredmail has some problems with the maildir.. the log of the mysql version shows the correct path of the dovecot shared namespace while the ldap version shows different paths.. :

in the ldap version the paths are somehow mixed up and incomplete. see below. so my conclusion ist that it is not reading the paths from ldap correctly (homeDirectory etc.) but i don't know where i can change these.

if this helps you to get it working i am digging deeper.

are you planning on fixing the ldap version in general in the next future? i am sure it is just some little things.. smile

thanks a lot for your effort!


-- begin dovecot.log mysql-backend

Mar 25 21:11:30 IMAP(www@rendertaxi.de): Info: acl: initializing backend with data: vfile
Mar 25 21:11:30 IMAP(www@rendertaxi.de): Info: acl: acl username = www@rendertaxi.de
Mar 25 21:11:30 IMAP(www@rendertaxi.de): Info: acl: owner = 1
Mar 25 21:11:30 IMAP(www@rendertaxi.de): Info: acl vfile: Global ACL directory: (null)
Mar 25 21:11:30 IMAP(www@rendertaxi.de): Info: Namespace: type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no
Mar 25 21:11:30 IMAP(www@rendertaxi.de): Info: shared: root=, index=, control=, inbox=
Mar 25 21:11:30 IMAP(www@rendertaxi.de): Info: Namespace : Using permissions from //var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.25.16.15.55//Maildir: mode=0700 gid=-1
Mar 25 21:11:30 IMAP(www@rendertaxi.de): Info: acl vfile: file //var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.25.16.15.55//Maildir/.Drafts/dovecot-acl not found
Mar 25 21:11:31 IMAP(www@rendertaxi.de): Info: acl vfile: file //var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.25.16.15.55//Maildir/.Junk/dovecot-acl not found
Mar 25 21:11:31 IMAP(www@rendertaxi.de): Info: acl vfile: file //var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.25.16.15.55//Maildir/.Sent/dovecot-acl not found
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: dict quota: user=test@rendertaxi.de, uri=proxy::quotadict, noenforcing=0
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: auth input: home=/var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28/
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: auth input: quota_rule=*:bytes=104857600
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: maildir: data=//var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir/:INDEX=//var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir/Shared/test@rendertaxi.de
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: maildir++: root=//var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir, index=//var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir/Shared/test@rendertaxi.de, control=, inbox=//var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: acl: initializing backend with data: vfile
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: acl: acl username = www@rendertaxi.de
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: acl: owner = 0
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: acl vfile: Global ACL directory: (null)
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: acl vfile: file //var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir/dovecot-acl not found
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: acl vfile: reading file //var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir/.Sent/dovecot-acl
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: acl vfile: reading file //var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.25.16.15.55//Maildir/.Trash/dovecot-acl
Mar 25 21:14:54 IMAP(test@rendertaxi.de): Info: acl vfile: file //var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir/.Shared.www@rendertaxi.de.INBOX/dovecot-acl not found
Mar 25 21:14:54 IMAP(test@rendertaxi.de): Info: acl vfile: file //var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir/.Shared.www@rendertaxi.de.Trash/dovecot-acl not found
Mar 25 21:14:54 IMAP(test@rendertaxi.de): Info: acl vfile: file //var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir/dovecot-acl not found
Mar 25 21:41:15 IMAP(www@rendertaxi.de): Info: Connection closed bytes=356/769
Mar 25 21:44:32 IMAP(test@rendertaxi.de): Info: Disconnected: Logged out bytes=423/1250
Mar 28 12:45:01 IMAP(test@rendertaxi.de): Info: Disconnected: Logged out bytes=127683/397275
Mar 28 12:45:01 IMAP(www@rendertaxi.de): Info: Disconnected: Logged out bytes=127676/397298

-- end dovecot.log mysql-backend



-- begin dovecot.log ldap-backend

Mar 24 17:19:54 dict: Error: sql dict iterate: Invalid/unmapped path: shared/shared-boxes/anyone/
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: dict quota: user=alex@rendertaxi.de, uri=proxy::quotadict, noenforcing=0
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: auth input: home=/var/vmail
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: auth input: mail=maildir:~/vmail1/rendertaxi.de/a/l/e/alex-2011.03.23.19.16.07//Maildir/
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: auth input: quota_rule=*:bytes=104857600
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: maildir: data=//var/vmail/Maildir/:INDEX=//var/vmail/Maildir/Shared/alex@rendertaxi.de
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: maildir++: root=//var/vmail/Maildir, index=//var/vmail/Maildir/Shared/alex@rendertaxi.de, control=, inbox=//var/vmail/Maildir
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: acl: initializing backend with data: vfile
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: acl: acl username = felix@rendertaxi.de
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: acl: owner = 0
Mar 24 17:19:54 IMAP(felix@rendertaxi.de): Info: acl vfile: Global ACL directory: (null)
Mar 24 17:20:18 imap-login: Info: Login: user=<www@rendertaxi.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Loading modules from directory: /usr/lib/dovecot/modules/imap
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib02_imap_acl_plugin.so
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Effective uid=1000, gid=1000, home=/var/vmail
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Quota root: name=user backend=dict args=:proxy::quotadict
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Quota rule: root=user mailbox=* bytes=104857600 messages=0
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Quota warning: bytes=89128960 (85%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 85
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Quota warning: bytes=94371840 (90%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 90
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Quota warning: bytes=99614720 (95%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 95
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: dict quota: user=www@rendertaxi.de, uri=proxy::quotadict, noenforcing=0
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: maildir: data=~/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: maildir++: root=/var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir, index=, control=, inbox=/var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl: initializing backend with data: vfile
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl: acl username = www@rendertaxi.de
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl: owner = 1
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl vfile: Global ACL directory: (null)
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Namespace: type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: shared: root=, index=, control=, inbox=
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Namespace : Using permissions from /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir: mode=0700 gid=-1
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl vfile: file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/dovecot-acl not found
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl vfile: reading file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/.Sent/dovecot-acl
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl vfile: file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/.Trash/dovecot-acl not found
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl vfile: file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/.Drafts/dovecot-acl not found
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl vfile: file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/.Junk/dovecot-acl not found
Mar 24 17:20:18 dict: Error: sql dict iterate: Invalid/unmapped path: shared/shared-boxes/anyone/
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: Disconnected: Logged out bytes=274/1240

-- end dovecot.log ldap-backend

5

Re: shared folder not working with ldap -- SOLVED

Hi, alexp.

I did try to make shared folder work with LDAP backend, but failed, and the worst thing is i can't find what the root cause was.

I found these lines in your log:

alexp wrote:

# from log of mysql-backend
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: acl vfile: reading file //var/vmail/vmail1/rendertaxi.de/t/e/s/test-2011.03.25.16.30.28//Maildir/.Sent/dovecot-acl
Mar 25 21:11:32 IMAP(www@rendertaxi.de): Info: acl vfile: reading file //var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.25.16.15.55//Maildir/.Trash/dovecot-acl


# from log of ldap-backend
Mar 24 17:20:18 IMAP(www@rendertaxi.de): Info: acl vfile: reading file /var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/.Sent/dovecot-acl

Seems dovecot found correct ACL setting file.

If you want to give it another try, you can try to check these files on Ubuntu:
- /etc/dovecot/dovecot-ldap.conf. LDAP lookup file used by Dovecot. You can find all attributes it needed.
- /etc/dovecot/dovecot.conf. Main config file of Dovecot. ACL related settings are defined here.

Paste related logs here if you found something interesting.

Also, iRedMail-0.7.0 is scheduled to be released on April 01, so if we can't fix it (with necessary testing) before April 01, we have to delay it.

6

Re: shared folder not working with ldap -- SOLVED

hi,

i think i got it working! :)thunderbird is now showing shared folders.. also telnet now shows the shared folders.

some further testing required but we are on the track.

ZhangHuangbin, if you put it in the code, i am looking forward to test the rc3 with a fresh install.

see below what i've changed.


a list "" *
* LIST (\HasChildren) "/" "folder1"
* LIST (\HasNoChildren) "/" "folder1/einunterordnder"
* LIST (\HasChildren) "/" "INBOX"
* LIST (\HasChildren) "/" "INBOX/test1"
* LIST (\HasNoChildren) "/" "INBOX/test1/subfolder_test1"
* LIST (\HasNoChildren) "/" "Trash"
* LIST (\HasNoChildren) "/" "Junk"
* LIST (\HasNoChildren) "/" "Drafts"
* LIST (\HasNoChildren) "/" "Sent"
* LIST (\Noselect \HasChildren) "/" "Shared/www@rendertaxi.de"
* LIST (\Noselect \HasChildren) "/" "Shared/test@rendertaxi.de"
* LIST (\Noselect \HasChildren) "/" "Shared/felix@rendertaxi.de"
* LIST (\HasNoChildren) "/" "Shared/www@rendertaxi.de/Sent"
* LIST (\HasChildren) "/" "Shared/test@rendertaxi.de/INBOX"
* LIST (\HasNoChildren) "/" "Shared/test@rendertaxi.de/INBOX/sub1"
* LIST (\HasNoChildren) "/" "Shared/felix@rendertaxi.de/sharetest"
* LIST (\HasNoChildren) "/" "Shared/felix@rendertaxi.de/Drafts"
a OK List completed.

the dovecot.log now shows the proper path also for data, index and inbox:


Mar 28 22:14:32 IMAP(alex@rendertaxi.de): Info: maildir: data=//var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/:INDEX=//var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/Shared/www@rendertaxi.de
Mar 28 22:14:32 IMAP(alex@rendertaxi.de): Info: maildir++: root=//var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir, index=//var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir/Shared/www@rendertaxi.de, control=, inbox=//var/vmail/vmail1/rendertaxi.de/w/ww/www/www-2011.03.23.19.03.21//Maildir



here is what i changed in dovecot-ldap.conf:

-- begin dovecot-ldap.conf
#
# File generated by iRedMail (2011.03.23.19.03.21):
#
# Version:  0.7.0-rc1
# Project:  http://www.iredmail.org/
#
# Community: http://www.iredmail.org/forum/
#

hosts           = 127.0.0.1:389
ldap_version    = 3
auth_bind       = yes
dn              = cn=vmail,dc=xxxxxx,dc=de
dnpass          = xxxxxxx
base            = o=domains,dc=xxxxxxx,dc=de
scope           = subtree
deref           = never
user_filter     = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
pass_filter     = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
pass_attrs      = userPassword=password
default_pass_scheme = CRYPT
user_attrs      = homeDirectory=home,mailMessageStore=mail=maildir:/var/vmail/%$/Maildir/,mailQuota=quota_rule=*:bytes=%$

-- end dovecot-ldap.conf

the ~ for  the home directoy was apparently not recognized correctly. so i replaced it withe the actual value. it only reads the mailMessageStore Directory from ldap as a variable and completes the path.

in thunderbird, i can list and subscribe the shared folders. in roundcube, the shared folders are properly displayed under folders, but subscribing is not successful. they are not listed when i go back to email tab. see attachement. do you have an idea? i haven't dug deep inside roundcubes config now

dovecot -n for complete config:

# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-4-pve x86_64 Ubuntu 10.04.2 LTS
log_path: /var/log/dovecot.log
protocols: pop3 pop3s imap imaps managesieve
listen(default): *
listen(imap): *
listen(pop3): *
listen(managesieve): 127.0.0.1:2000
ssl_ca_file: /etc/ssl/certs/iRedMail_CA.pem
ssl_cert_file: /etc/ssl/certs/iRedMail_CA.pem
ssl_key_file: /etc/ssl/private/iRedMail.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
first_valid_uid: 1000
last_valid_uid: 1000
mail_uid: 1000
mail_gid: 1000
mail_location: maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
mail_debug: yes
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_process_size: 1024
mail_plugins(default): quota imap_quota autocreate acl imap_acl
mail_plugins(imap): quota imap_quota autocreate acl imap_acl
mail_plugins(pop3): quota
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: shared
  separator: /
  prefix: Shared/%%u/
  location: maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u
  list: children
lda:
  postmaster_address: root
  auth_socket_path: /var/run/dovecot/auth-master
  mail_plugins: quota sieve autocreate acl
  sieve_global_path: /var/vmail/sieve/dovecot.sieve
  log_path: /var/log/sieve.log
auth default:
  mechanisms: plain login
  default_realm: rendertaxi.de
  user: vmail
  passdb:
    driver: ldap
    args: /etc/dovecot/dovecot-ldap.conf
  userdb:
    driver: ldap
    args: /etc/dovecot/dovecot-ldap.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/dovecot-auth
      mode: 438
      user: postfix
      group: postfix
    master:
      path: /var/run/dovecot/auth-master
      mode: 438
      user: vmail
      group: vmail
plugin:
  quota_warning: storage=85%% /usr/local/bin/dovecot-quota-warning.sh 85
  quota_warning2: storage=90%% /usr/local/bin/dovecot-quota-warning.sh 90
  quota_warning3: storage=95%% /usr/local/bin/dovecot-quota-warning.sh 95
  quota: dict:user::proxy::quotadict
  quota_rule: *:storage=0
  expire: Trash 7 Trash/* 7 Junk 30
  expire_dict: proxy::expire
  auth_socket_path: /var/run/dovecot/auth-master
  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
  autocreate: INBOX
  autocreate2: Sent
  autocreate3: Trash
  autocreate4: Drafts
  autocreate5: Junk
  autosubscribe: INBOX
  autosubscribe2: Sent
  autosubscribe3: Trash
  autosubscribe4: Drafts
  autosubscribe5: Junk
  acl_shared_dict: proxy::acl
  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
  sieve_dir: /var/vmail/sieve/%Ld/%Ln/
  acl: vfile
dict:
  expire: db:/var/lib/dovecot/expire/expire.db
  quotadict: mysql:/etc/dovecot/dovecot-used-quota.conf
  acl: mysql:/etc/dovecot/dovecot-share-folder.conf

Post's attachments

rdt-Roundcube_Webmail__Folders_-_Mozilla_Firefox-2011-03-28_19.04.30.jpg
rdt-Roundcube_Webmail__Folders_-_Mozilla_Firefox-2011-03-28_19.04.30.jpg 33.03 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

7

Re: shared folder not working with ldap -- SOLVED

alexp wrote:

the ~ for  the home directoy was apparently not recognized correctly. so i replaced it withe the actual value. it only reads the mailMessageStore Directory from ldap as a variable and completes the path.

Can you help perform another test with below steps?

- Install a fresh OS.
- Install iRedMail.
- Test shared folder with default setting (enable acl plugin in dovecot manually).
- If it doesn't work, replace '~' by actual value (e.g. /var/vmail/) in dovecot-ldap.conf.

So that we can confirm we changed the right thing, then i can commit the change into iRedMail-0.7.0 before April 01.

[I have very limit internet access, it's hard for me to perform new OS installation for testing. sorry. If you can help test and response quickly, i will commit changes as soon as possible.]

8 (edited by shake 2011-03-29 10:38:14)

Re: shared folder not working with ldap -- SOLVED

Thanks alexp

I have test in CentOS 5.5 use iRedMail R2 ldap backend. and work as expect.

1: add the acl in /etc/dovecot.conf

# LDA: Local Deliver Agent
protocol lda {
    postmaster_address = root
    auth_socket_path = /var/run/dovecot/auth-master
    mail_plugins = quota sieve autocreate acl
    sieve_global_path = /var/vmail/sieve/dovecot.sieve
    log_path = /var/log/sieve.log
}

# IMAP configuration
protocol imap {
    mail_plugins = quota imap_quota autocreate acl imap_acl

the second step is  modify  /etc/dovecot-ldap.conf  ,

#user_attrs      = storageBaseDirectory=home,mailMessageStore=mail=maildir:~/%$/Maildir/,mailQuota=quota_rule=*:bytes=%$
user_attrs      = homeDirectory=home,mailMessageStore=mail=maildir:/var/vmail/%$/Maildir/,mailQuota=quota_rule=*:bytes=%$

now Restart dovecot and use telnet seting .

work as expect.

9

Re: shared folder not working with ldap -- SOLVED

Hi, alexp.

I tested this and committed into iRedMail, here comes iRedMail-0.7.0-rc3:
http://www.iredmail.org/forum/topic1805 … eased.html

Thanks very much for your help. smile

10

Re: shared folder not working with ldap -- SOLVED

hi zhang,

thanks for the quick work! i will also install on a fresh os and test it again.

concerning displaying the shared folders in roundcube:

roundcube needs

namespace shared {
    separator = /
    prefix = Shared/%%u/
    location = maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u
    subscriptions = yes
    list = children
}

otherwise subscribing to the shared folders is not successful.

while for thunderbird it is recommendable to use subscriptions=no otherwise it is displaying the whole folder tree of the other users including shared folders.. also tbird seems to get confused by the dot in the domain name and thus showing users twice..

i will keep you updated which settings are best for thunderbird. as a next step i will install sogo on top. i'll tell you my experience!

best, alex

Post's attachments

rdt-Abonnieren-2011-03-29_09.31.33.jpg
rdt-Abonnieren-2011-03-29_09.31.33.jpg 78.35 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

11

Re: shared folder not working with ldap -- SOLVED

here the screenshot of roundcube with subscriptions = yes which is behaving correctly:

Post's attachments

rdt-Roundcube_Webmail__Sharedtestrendertaxi.deINBOX_-_Mozilla_Firefox-2011-03-29_09.33.59.jpg
rdt-Roundcube_Webmail__Sharedtestrendertaxi.deINBOX_-_Mozilla_Firefox-2011-03-29_09.33.59.jpg 31.98 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

12

Re: shared folder not working with ldap -- SOLVED

i tested shipped roundcubemail-0.5.1 only. Waiting for your further testing and sharing.

Personally, i hope you can share more experiense with us before April 01, so that we can test it some more times, then commit fixes into iRedMail-0.7.0 stable.

Thanks again, for your feedback and time. smile

13

Re: shared folder not working with ldap -- SOLVED

Hi Zhang,

I did a fresh install with the rc3 release with ldap backend and sharing email folders works out-of-the-box smile (ubuntu 10.04).

After some further reading and testing concerning Thunderbird as E-Mail Client: Dovecot Wiki gives hints for the E-Mail Clients: http://wiki.dovecot.org/Clients

Also this https://help.ubuntu.com/community/Dovecot wa a good ressource.

To use Dovecot with Thunderbird, edit the file /etc/dovecot/dovecot.conf:

protocol imap {
...
imap_client_workarounds = tb-extra-mailbox-sep
}

The shared namespace should have subscriptions = yes.

In Thunderbird, under 'Server Settings' -> Advanced, uncheck "Show only subscribed folders".

Now the hierachy is displayed correctly in Thunderbird as well as in Roundcube.


Best, Alex

14

Re: shared folder not working with ldap -- SOLVED

Thanks alexp, will commit these two fixes soon.

15

Re: shared folder not working with ldap -- SOLVED

alexp wrote:

protocol imap {
...
imap_client_workarounds = tb-extra-mailbox-sep
}

Seems TB works without this setting, the point is TB setting "Show only subscribed folders".
Anyway, i committed it into iRedMail for TB.

Thanks again.