Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Finding Email Aliases through Python

    Scripting
    2
    5
    1454
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • robertwbrandt
      robertwbrandt last edited by

      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

      1 Reply Last reply Reply Quote 0
      • robing
        robing Kopano (Inactive) last edited by

        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

        Regards Robin,

        Need support?
        Have a look at https://kopano.com/support/ for options.

        Helpful resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        1 Reply Last reply Reply Quote 0
        • robertwbrandt
          robertwbrandt last edited by

          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

          1 Reply Last reply Reply Quote 0
          • robing
            robing Kopano (Inactive) last edited by

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

            Regards Robin,

            Need support?
            Have a look at https://kopano.com/support/ for options.

            Helpful resources:
            https://kopano.com/blog/how-to-get-kopano/
            https://documentation.kopano.io/
            https://kb.kopano.io/

            1 Reply Last reply Reply Quote 0
            • robertwbrandt
              robertwbrandt last edited by

              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

              1 Reply Last reply Reply Quote 0
              • First post
                Last post