Web User management - Function removed from PHP Mapi



  • Hello,

    I built few years ago a web based UI so the users can change their password and admin can manage users (add/edit/delete/right)

    For doing that I was using the PHP Mapi library, but unfortunately, I just updated my kopano install and the function I needed got removed which is kind of a disaster: https://github.com/Kopano-dev/kopano-core/commit/9a003acd34857cf2c27d0d9c581af0e233b48510#diff-4d4539e6dcf717bc5ac213a6768baeca

    So I can no longer create, edit, delete users and change passwords…

    I’m using the DB as the backend so I cannot use a LDAP library.

    I checked what was available and the options are not so great…

    • kopano-admin => need to be root to use it and I don’t really want to run root cmd from a web app or to allow sudo kopano-admin
    • kopano-cli => has parameters -U and -P to “log as” but it means executing command with PHP and giving password in clear as no prompt is available. I don’t like having users passwords in the web logs.

    Is there any other solution ? can I directly modify the values in the DB then force somehow a re-sync ? or would it be possible to add back those very useful functions to PHP Mapi ?

    • mapi_zarafa_createuser()
    • mapi_zarafa_setuser()
    • mapi_zarafa_deleteuser()

    Thanks a lot !



  • kopano-admin => need to be root to use it and I don’t really want to run root cmd from a web app or to allow sudo kopano-admin

    No; you can either use a SSL certificate to authenticate, or the Unix socket credential passing mechanism (e.g. server.cfg local_admin_users=root apache).


Log in to reply