Finding Email Aliases through Python



  • Is there a way to retrieve all the Email Addresses, including Email Aliases, through the Python Kopano module?

    Or are the Email Aliases solely a postfix (MTA) thing?

    Thanks
    Bob


  • Kopano

    Hi Bob,

    This is possible with python-kopano

    In [10]: import kopano`
    In [11]: kopano.Server().user('user1').prop(0x800f101f).value
    Out[11]: 
    [u'SMTP:user1@mailtje.nu',
     u'smtp:Chlo\xe9@mailtje.nu',
     u'smtp:Chlo\xe9.van.der.Heijden@mailjte.nu',
     u'smtp:what@mailtje.nu']
    

    Regards,

    Robin



  • Excellent! So I tried this and it didn’t work. It returned the primary email address but nothing else.

    I’m assuming I have to add something like this to the /etc/kopano/ldap.propmap.cfg

    # PR_ALIASES
    0x800F101F      = otherMailbox
    

    I reloaded the kopano-server , but sill nothing.

    BTW, I’m using Active-Directory LDAP for my user database.

    Any ideas?
    Bob


  • Kopano

    You need to restart kopano-server for this.
    The user plugin is not changed with a HUP signal.



  • That worked perfectly. Thanks!

    I haven’t tried yet, but I’m assuming I could “extend” the /etc/kopano/ldap.propmap.cfg file my adding other random attributes with different codes (that aren’t already being used ) to present other LDAP fields through Kopano? For instance:

    # PR_SPOUSES_NAMES
    0x3A581F1E     =  spouse
    

    Or can it only be pre-define fields? If so what are those pre-defined fields?

    I’m not too sure of a use case, but it would be nice to know if I could.

    Thanks
    Bob


Log in to reply