Bulk Creation

Timotheus Pokorra timotheus at kolab.org
Sat Oct 3 08:49:28 CEST 2015


Hello Paul,

> Would that work with a multi domain setup as well if we did the bounty thing? Is anyone else interested in bulk import of email accounts?

I just checked, kolab add-user at the moment does not check the ou
parameter, and when you specify another email address, you get "ERROR:
Email address 'timotheus.pokorra at test.de' not in local domain (code
693)".

I tested this by modifying
/usr/lib/python2.7/site-packages/pykolab/wap_client/__init__.py where
test.de is another domain, apart from the primary domain.
def user_add(params=None):
    params = {"type_id": "1", "preferredlanguage": "en_US",
"object_type": "user", "objectclass": ["top", "inetorgperson",
"kolabinetorgperson", "mailrecipient", "organizationalperson",
"person"], "sn": "Pokorra", "ou": "ou=people,dc=test,dc=de",
"givenname": "Timotheus", "userpassword": "topsecret", "mail":
"timotheus.pokorra at test.de"}
    if params == None:
        params = get_user_input()

    params = json.dumps(params)

    return request('POST', 'user.add', post=params)

I would be able to make kolab add-user work for multiple domains as well.

Timotheus


More information about the users mailing list