LDAP user does not get a store "MAPI_E_NOT_FOUND"
-
According to this thread I got the same problem - the store for a LDAP user is not automatically created.
I sync the LDAP users with:
kopano-cli --sync
And they appear in Kopano - all good:
root@mail:~# kopano-cli --list-users User list for Default (3): User Full Name Homeserver ---------------------------------------------------------- SYSTEM SYSTEM Unknown admin admin Unknown john john Unknown
When I try to login i get:
“Unknown MAPI Error: MAPI_E_NOT_FOUND” and I can see, that the users don’t have a storage:root@mail:~# kopano-cli --list-orphans Stores without users: Store guid Username Last login Store size Store type -------------------------------------------------------------------------------------------------------- Users without stores (2): User Full Name Homeserver ---------------------------------------------------------- admin admin Unknown john john Unknown
An extraction of my server.cfg:
user_plugin = ldap user_plugin_config = /etc/kopano/ldap.cfg createuser_script = /usr/lib/kopano/userscripts/createuser deleteuser_script = /usr/lib/kopano/userscripts/deleteuser creategroup_script = /usr/lib/kopano/userscripts/creategroup deletegroup_script = /usr/lib/kopano/userscripts/deletegroup createcompany_script = /usr/lib/kopano/userscripts/createcompany deletecompany_script = /usr/lib/kopano/userscripts/deletecompany (...) log_level = 3
The scripts do exist, I can see them:
root@mail:~# ls -la /usr/lib/kopano/userscripts insgesamt 56 drwxr-xr-x 8 root root 4096 Feb 17 13:53 . drwxr-xr-x 3 root root 4096 Feb 17 13:53 .. -rwxr-xr-x 1 root root 733 Apr 25 2019 createcompany drwxr-xr-x 2 root root 4096 Feb 17 13:53 createcompany.d -rwxr-xr-x 1 root root 713 Apr 25 2019 creategroup drwxr-xr-x 2 root root 4096 Apr 25 2019 creategroup.d -rwxr-xr-x 1 root root 729 Apr 25 2019 createuser drwxr-xr-x 2 root root 4096 Feb 17 13:53 createuser.d -rwxr-xr-x 1 root root 735 Apr 25 2019 deletecompany drwxr-xr-x 2 root root 4096 Apr 25 2019 deletecompany.d -rwxr-xr-x 1 root root 715 Apr 25 2019 deletegroup drwxr-xr-x 2 root root 4096 Apr 25 2019 deletegroup.d -rwxr-xr-x 1 root root 731 Apr 25 2019 deleteuser drwxr-xr-x 2 root root 4096 Apr 25 2019 deleteuser.d
The log file “/var/log/mail.log” looks like this:
root@mail:~# cat /var/log/mail.log Feb 17 16:18:03 mail kopano-monitor[465]: Starting kopano-monitor version 8.7.0 (pid 465 uid 0) Feb 17 16:18:03 mail kopano-ical[477]: Starting kopano-ical version 8.7.0 (pid 477 uid 0) Feb 17 16:18:03 mail kopano-monitor[465]: Starting kopano-monitor version 8.7.0 (pid 465 uid 108) Feb 17 16:18:03 mail kopano-ical[477]: Starting kopano-ical version 8.7.0 (pid 477 uid 108) Feb 17 16:18:03 mail kopano-spooler[455]: Starting kopano-spooler version 8.7.0 (pid 455 uid 0) Feb 17 16:18:03 mail kopano-gateway[467]: Starting kopano-gateway version 8.7.0 (pid 467 uid 0) Feb 17 16:18:03 mail kopano-gateway[467]: Starting kopano-gateway version 8.7.0 (pid 467 uid 108) Feb 17 16:18:03 mail kopano-spooler[455]: Starting kopano-spooler version 8.7.0 (pid 455 uid 108) Feb 17 16:18:03 mail kopano-spooler[455]: gsoap connect: () Feb 17 16:18:03 mail kopano-spooler[455]: HrLogon server "default:" user "SYSTEM": network error Feb 17 16:18:03 mail kopano-spooler[455]: Unable to open admin session: network error (80040115) Feb 17 16:18:03 mail kopano-spooler[455]: Server connection lost. Reconnecting in 3 seconds... Feb 17 16:18:03 mail postfix/postfix-script[735]: warning: symlink leaves directory: /etc/postfix/./makedefs.out Feb 17 16:18:03 mail postfix/postfix-script[787]: starting the Postfix mail system Feb 17 16:18:03 mail postfix/master[789]: daemon started -- version 3.4.8, configuration /etc/postfix Feb 17 16:18:04 mail kopano-server[831]: Starting kopano-server version 8.7.0 (pid 831 uid 0) Feb 17 16:18:04 mail kopano-dagent[851]: Starting kopano-dagent version 8.7.0 (pid 851 uid 0) (LMTP mode)
No errors to see. Can anybody help me?
-
Hi @birduser,
the linked issue was when using our packaging, but seeing your version number (8.7.0) you seem to be using the packages provided through the Debian repositories?
In any case the log message should be printed when the actual users is created.
-
Hi @fbartels,
thank you very much for your response!Yes, you are correct, I installed it from the repo, I posted the steps I took for installing Kopano here in the first post
I am a little bit further, and I have the feeling, that the solution to the problem to both of my posts is the same. There is a right problem and Kopano cannot acces files outside of the /etc/kopano directory - but why?
I copied the user scripts for testing in /etc/kopano and changed the path in the server.cfg, and now I get an error in mail.log:
command userscripts/createuser" exited with non-zero status 127
But here I am stuck again. Ideas?
-
@birduser said in LDAP user does not get a store "MAPI_E_NOT_FOUND":
and Kopano cannot acces files outside of the /etc/kopano directory - but why?
Probably apparmor related.
As we (e.g. Kopano the company) are not maintaining the Debian packages I want to encourage you to approach the maintainers of the packages with your findings.
-
Hi @fbartels,
that is a good information, thank you very much for your help!I installed Kopano now not from the Debian packages, but with:
wget https://download.kopano.io/community/core:/core-10.0.1.121.9508180-Debian_10-amd64.tar.gz tar -xvzf core-10.0.1.121.9508180-Debian_10-amd64.tar.gz cd core-10.0.1.121.9508180-Debian_10-amd64/ dpkg -i *.deb
and the webapp analog to that with:
wget https://download.kopano.io/community/webapp%3A/webapp-4.0.2646+1551.1.960a130-Debian_10-all.tar.gz tar -xvzf webapp-4.0.2646+1551.1.960a130-Debian_10-all.tar.gz cd webapp-4.0.2646+1551.1.960a130-Debian_10-all/ dpkg -i *.deb
After that I Installed mysql and postfix and everything including the web frontend seems to work - great!
So again, I connected Kopano to my LDAP server and synced the user:
root@mail:~# kopano-cli --sync root@mail:~# kopano-cli --list-users User list for Default (4): User Full Name Homeserver ---------------------------------------------------------- SYSTEM SYSTEM Unknown admin admin Unknown joe joe Unknown john john Unknown root@mail:~# kopano-cli --list-orphans Stores without users: Store guid Username Last login Store size Store type -------------------------------------------------------------------------------------------------------- Users without stores (3): User Full Name Homeserver ---------------------------------------------------------- admin admin Unknown joe joe Unknown john john Unknown root@mail:~#
But as you can see, there is no store created for the users and when I try to login I get again:
“Unknown MAPI Error: MAPI_E_NOT_FOUND!”server.cfg looks like this:
root@mail:~# cat /etc/kopano/server.cfg # The user under which we connect with MySQL mysql_user = kopano # The password for the user (leave empty for no password) mysql_password = ******* user_plugin = ldap user_plugin_config = /etc/kopano/ldap.cfg createuser_script = /usr/lib/kopano/userscripts/createuser deleteuser_script = /usr/lib/kopano/userscripts/deleteuser creategroup_script = /usr/lib/kopano/userscripts/creategroup deletegroup_script = /usr/lib/kopano/userscripts/deletegroup createcompany_script = /usr/lib/kopano/userscripts/createcompany deletecompany_script = /usr/lib/kopano/userscripts/deletecompany user_safe_mode = no log_level = 5
and the scripts are present:
root@mail:~# ls -la /usr/lib/kopano/userscripts/createuser -rwxr-xr-x 1 root root 742 Feb 14 03:10 /usr/lib/kopano/userscripts/createuser
The log file “/var/log/mail.log” right after sync:
Feb 18 01:48:32 mail kopano-monitor[419]: Starting kopano-monitor version 10.0.1 (pid 419 uid 0) Feb 18 01:48:32 mail kopano-monitor[419]: Starting kopano-monitor version 10.0.1 (pid 419 uid 998) Feb 18 01:48:32 mail kopano-spooler[413]: Starting kopano-spooler version 10.0.1 (pid 413 uid 0) Feb 18 01:48:32 mail kopano-spooler[413]: Starting kopano-spooler version 10.0.1 (pid 413 uid 998) Feb 18 01:48:32 mail kopano-gateway[470]: Starting kopano-gateway version 10.0.1 (pid 470 uid 0) Feb 18 01:48:32 mail kopano-dagent[467]: Starting kopano-dagent version 10.0.1 (pid 467 uid 0) (LMTP mode) Feb 18 01:48:32 mail kopano-ical[466]: Starting kopano-ical version 10.0.1 (pid 466 uid 0) Feb 18 01:48:32 mail kopano-spooler[413]: Logon to file:///var/run/kopano/server.sock: Remote side closed connection. Feb 18 01:48:32 mail kopano-spooler[413]: HrLogon server "default:" user "SYSTEM": network error Feb 18 01:48:32 mail kopano-spooler[413]: Unable to open admin session: network error (80040115) Feb 18 01:48:32 mail kopano-spooler[413]: Server connection lost. Reconnecting in 3 seconds... Feb 18 01:48:32 mail kopano-gateway[470]: Starting kopano-gateway version 10.0.1 (pid 470 uid 998) Feb 18 01:48:32 mail kopano-ical[466]: Starting kopano-ical version 10.0.1 (pid 466 uid 998) Feb 18 01:48:32 mail kopano-dagent[467]: Starting kopano-dagent version 10.0.1 (pid 467 uid 998) (LMTP mode) Feb 18 01:48:33 mail postfix/postfix-script[767]: warning: symlink leaves directory: /etc/postfix/./makedefs.out Feb 18 01:48:33 mail postfix/postfix-script[808]: starting the Postfix mail system Feb 18 01:48:33 mail postfix/master[810]: daemon started -- version 3.4.8, configuration /etc/postfix Feb 18 01:48:34 mail kopano-server[837]: Audit logging not enabled. Feb 18 01:48:34 mail kopano-server[837]: Starting kopano-server version 10.0.1 (pid 837 uid 0) Feb 18 01:48:34 mail kopano-server[837]: Using epoll events Feb 18 01:48:34 mail kopano-server[837]: Listening on 0.0.0.0%lo:236 (fd 5) Feb 18 01:48:34 mail kopano-server[837]: Listening on [::]%lo:236 (fd 6) Feb 18 01:48:34 mail kopano-server[837]: Listening on unix:/var/run/kopano/prio.sock (fd 7) Feb 18 01:48:34 mail kopano-server[837]: Listening on unix:/var/run/kopano/server.sock (fd 8) Feb 18 01:48:34 mail kopano-server[837]: Audit logging not enabled. Feb 18 01:48:34 mail kopano-server[837]: Starting kopano-server version 10.0.1 (pid 837 uid 998) Feb 18 01:48:34 mail kopano-server[837]: Using epoll events Feb 18 01:48:34 mail kopano-server[837]: Re-using fd 5 for 0.0.0.0%lo:236 Feb 18 01:48:34 mail kopano-server[837]: Re-using fd 6 for [::]%lo:236 Feb 18 01:48:34 mail kopano-server[837]: Re-using fd 7 for unix:/var/run/kopano/prio.sock Feb 18 01:48:34 mail kopano-server[837]: Re-using fd 8 for unix:/var/run/kopano/server.sock Feb 18 01:48:34 mail kopano-server[837]: Connection to database 'kopano' succeeded Feb 18 01:48:34 mail kopano-server[837]: Using the "files_v2" attachment storage backend Feb 18 01:48:34 mail kopano-server[837]: Setting cell cache size: 1073741824 Feb 18 01:48:34 mail kopano-server[837]: Setting object cache size: 16777216 Feb 18 01:48:34 mail kopano-server[837]: Setting indexedobject cache size: 33554432 Feb 18 01:48:34 mail kopano-server[837]: Setting quota cache size: 1048576 Feb 18 01:48:34 mail kopano-server[837]: Setting userdetails cache size: 26214400 Feb 18 01:48:34 mail kopano-server[837]: Querying database for searchfolders. This may take a while. Feb 18 01:48:34 mail kopano-server[837]: Loading search folders. Feb 18 01:48:34 mail kopano-server[837]: Done loading search folders. Feb 18 01:48:34 mail kopano-server[837]: Startup succeeded on pid 837 Feb 18 01:48:45 mail kopano-server[837]: Synchronized user list
Why is it still not working?
-
@birduser could be related to https://jira.kopano.io/browse/KC-1692. Can you add
log_level=6
to your config?@birduser said in LDAP user does not get a store "MAPI_E_NOT_FOUND":
createuser_script = /usr/lib/kopano/userscripts/createuser
FYI options that just use the default value do not need to be included in the config
-
Hi @fbartels!
Thank you again for your help, I appreciate that!
I enabledlog_level=6
and this are the logs:Feb 18 14:04:33 mail kopano-server[839]: Auto-creating user (ext: login="admin" sig="1000") Feb 18 14:04:33 mail kopano-server[839]: Running script `/usr/lib/kopano/userscripts/createuser` Feb 18 14:04:33 mail kopano-server[839]: Running command: "/usr/lib/kopano/userscripts/createuser" Feb 18 14:04:33 mail kopano-server[839]: Accepted incoming connection from file:///var/run/kopano/server.sock Feb 18 14:04:33 mail kopano-server[839]: Accepted incoming connection from file:///var/run/kopano/server.sock Feb 18 14:04:33 mail kopano-server[839]: LDAP query in "dc=sxps,dc=it" failed: (&(&(kopanoAccount=1)(|(objectClass=User)(objectClass=Contact)))(|(sAMAccountName=))) (result=0x01, Operations error) Feb 18 14:04:33 mail kopano-server[839]: K-1516: Unable to resolve unknown user "": ldap_search_ext_s: Operations error (0x00000001) Feb 18 14:04:33 mail kopano-server[839]: /usr/lib/kopano/userscripts/createuser[915]: Executing "/usr/lib/kopano/userscripts/createuser.d/00createstore"... Feb 18 14:04:33 mail kopano-server[839]: Command "/usr/lib/kopano/userscripts/createuser" ran successfully Feb 18 14:04:33 mail kopano-server[839]: Auto-creating user (ext: login="john" sig="1001") Feb 18 14:04:33 mail kopano-server[839]: Running script `/usr/lib/kopano/userscripts/createuser` Feb 18 14:04:33 mail kopano-server[839]: Running command: "/usr/lib/kopano/userscripts/createuser" Feb 18 14:04:33 mail kopano-server[839]: Accepted incoming connection from file:///var/run/kopano/server.sock Feb 18 14:04:33 mail kopano-server[839]: Accepted incoming connection from file:///var/run/kopano/server.sock Feb 18 14:04:33 mail kopano-server[839]: LDAP query in "dc=sxps,dc=it" failed: (&(&(kopanoAccount=1)(|(objectClass=User)(objectClass=Contact)))(|(sAMAccountName=))) (result=0x01, Operations error) Feb 18 14:04:33 mail kopano-server[839]: K-1516: Unable to resolve unknown user "": ldap_search_ext_s: Operations error (0x00000001) Feb 18 14:04:33 mail kopano-server[839]: /usr/lib/kopano/userscripts/createuser[917]: Executing "/usr/lib/kopano/userscripts/createuser.d/00createstore"... Feb 18 14:04:33 mail kopano-server[839]: Command "/usr/lib/kopano/userscripts/createuser" ran successfully Feb 18 14:04:33 mail kopano-server[839]: Auto-creating user (ext: login="joe" sig="1002") Feb 18 14:04:33 mail kopano-server[839]: Running script `/usr/lib/kopano/userscripts/createuser` Feb 18 14:04:33 mail kopano-server[839]: Running command: "/usr/lib/kopano/userscripts/createuser" Feb 18 14:04:33 mail kopano-server[839]: Accepted incoming connection from file:///var/run/kopano/server.sock Feb 18 14:04:33 mail kopano-server[839]: Accepted incoming connection from file:///var/run/kopano/server.sock Feb 18 14:04:33 mail kopano-server[839]: LDAP query in "dc=sxps,dc=it" failed: (&(&(kopanoAccount=1)(|(objectClass=User)(objectClass=Contact)))(|(sAMAccountName=))) (result=0x01, Operations error) Feb 18 14:04:33 mail kopano-server[839]: K-1516: Unable to resolve unknown user "": ldap_search_ext_s: Operations error (0x00000001) Feb 18 14:04:33 mail kopano-server[839]: /usr/lib/kopano/userscripts/createuser[919]: Executing "/usr/lib/kopano/userscripts/createuser.d/00createstore"... Feb 18 14:04:33 mail kopano-server[839]: Command "/usr/lib/kopano/userscripts/createuser" ran successfully Feb 18 14:04:44 mail kopano-server[839]: Accepted incoming connection from file:///var/run/kopano/server.sock Feb 18 14:04:44 mail kopano-server[839]: Accepted incoming connection from file:///var/run/kopano/server.sock Feb 18 14:04:44 mail kopano-server[839]: PurgeCache 0x1e00 took 0 ms Feb 18 14:04:44 mail kopano-server[839]: Synchronized user list Feb 18 14:04:44 mail kopano-server[839]: Accepted incoming connection from file:///var/run/kopano/server.sock
As you said, It is nearly identical with the log files of the bug you mentioned and I guess that’s exactly where I am stuck.
Have you got an Idea when the bug will be fixed?
-
“Soon”, for some definition of soon…Done.