1
Exporting users and alias
Question asked by Heimir Eidskrem - 1/18/2024 at 2:34 PM
Unanswered
What are you guys using to export users/alias out of Smartermail.
We use some external gateways and we import the valid users/alias from text files.

The current function we are using does not include alias.


2 Replies

Reply to Thread
1
Sébastien Riccio Replied
Hi,

You could use something like this (quick and dirty example in python, to export all users, aliases and mailing lists from all domains and their domain aliases).


If you have many domains and mailboxes, this can take a while as it needs multiple different calls per domain. I haven't found a better way to do it.

The SM API badly need an unique query to export all valid targets for every domain/domain aliases for such usage as exporting them to incoming gateways.

Sébastien Riccio System & Network Admin https://swisscenter.com
0
Douglas Foster Replied
It looks like LDAP should work.  I can get it to work from ldp.exe, but have not worked out the authentication issues (or other mistakes) to work from vbscript.  

(I also do not know how to filter on Active accounts only.)

Using filter=(mail=*), I seem to get all expected results.

At least these attributes return data if any data exists:  mail;displayName;givenName;sn

The account types are OUs, not ObjectClasses or ObjectCategories,  Sample results (sanitized):

Dn: mail="alias1@example.com",ou=Aliases,cn=alias1,dc=bayviewphysicians,DC=com

Dn: mail="list1@example.com",ou=MailingLists,cn=list1,dc=bayviewphysicians,DC=com

Dn: mail="user1@example.com",ou=Aliases,cn=user1,dc=bayviewphysicians,DC=com

Reply to Thread