It is possible that python-mapi 8.5.2 fails to install due to a dependency issue. The python-mapi.postinst file of the .deb package invokes the following commands:
invoke-rc.d kopano-spooler restart invoke-rc.d kopano-dagent restart
but it does not check if these are present. So, unless kopano-spooler and kopano-dagent are already installed it is not possible to install python-mapi.
Could you please add the appropriate checks here?