use python-kopano/python-mapi to talk to zarafa server?



  • Hi!

    Is it or should it be possible to use python3-kopano [1] to talk to an zarafa server?

    When i tried I always end up getting “MAPI error 80040115 (MAPI_E_NETWORK_ERROR)”

    my test_code looked like this:

    import MAPI
    from MAPI.Util import *
    session = OpenECSession('user', 'pass', 'http://127.0.0.1:236/zarafa')
    ...
    MAPIErrorNetworkError: MAPI error 80040115 (MAPI_E_NETWORK_ERROR)
    

    (that’s with correct credentials. if i supply wrong creds i get ‘MAPI_E_LOGON_FAILED’. )

    I’d like to use python-kopano to connect to an old zarafa server and access certain items.

    any thoughts or hints?

    [1]
    https://documentation.kopano.io/kopano_python_kopano/getting_started.html
    ml#connecting-to-the-server


  • Kopano

    @hodor27,

    You are now using python-mapi , python-kopano is a lot easier to use

    import kopano 
    #logon with an username
    server =  kopano.Server(server_socket='https://localhost:237/zarafa', auth_user='user', auth_pass='pass') 
    
    #logon with  ssl certificates
    server =  kopano.Server(server_socket='https://localhost:237/zarafa',  sslkey_file='/path/to/ssl/key',  sslkey_pass='password if needed') 
    
    


  • @robing yes sorry i was not being clear.
    I tried using python-kopano before but got the error "Error: could not connect to server at ‘https://1.2.3.4:236/zarafa

    trying to dig further down, I then went and used python-mapi directly(since python-kopano imports it anyway) which resulted in the errors mentionend in my 1st post.

    Now i managed to work around my current use-case by using python-zarafa on one server, pickling files and then using python-kopano on the destination server. (doing import export).

    But my main question remains: Is it possible to use python-kopano to interact with a Zarafa-Server 7.1? Is it possible with Zarafa 7.2?

    thanks in advance!


  • Kopano

    @hodor27 If it’s about import/export why not use kopano-backup?

    Generally it should work, since it does work for kopano-backup to connect to an old zarafa installation.



  • @fbartels said in use python-kopano/python-mapi to talk to zarafa server?:

    @hodor27 If it’s about import/export why not use kopano-backup?

    Generally it should work, since it does work for kopano-backup to connect to an old zarafa installation.

    thanks for the hint! didn’t know the tool could be used for that.
    kopano-backup gives me a similar error when try to connec tot the old zarafa-server:

    kopano-backup  --auth-user "..." --auth-pass "..."  --server-socket "http://1.2.3.4:236/zarafa" ...
    ...
    [error  ] gsoap connect: ()
    [error  ] HrLogon server "http://1.2.3.4:236/zarafa" user "user.name": network error
    2019-01-25 18:00:56,105 - backup - WARNING - could not connect to server at 'http://1.2.3.4:236/zarafa', retrying in 5 sec
    

    the zarafa version there is: 7.1.14-51822

    any other thoughts what could be wrong here?


  • Kopano

    @hodor27 no sorry no direct idea. If you have a subscription I would recommend to get in contact with out support so that someone can examine the logs on your system.



  • @fbartels said in use python-kopano/python-mapi to talk to zarafa server?:

    If you have a subscription I would recommend to get in contact with out support so that someone can examine the logs on your system.

    ok thanks for your help! I managed to achieve what i needed by using python-zarafa for zarafa 7.1 on the old server. If I have a similar problem in the future I’ll open a ticket.


Log in to reply