Hey,
you find the script attached to this post.
Several assumptions are made:
We sync mailinglists to horde groups, so all users of the mailinglist department1@test.local are synced to the horde group department1 . See line 35 for the command for getting the list (basically udm mail/lists list ).
The script runs against the local PostgreSQL database on the host, if you run any special configuration you have to take this into account.
Every group contains the CALENDARUSER, as this user shares the corresponding calendars to the horde groups. This has to be configured in the horde calendar sharing for this user.
You need to define the lists that will be considered on line 20.
The target groups must be created from the Horde GUI, the script only alters the users in each group.
Sync is one-way only from LDAP to horde, so changes (adding/removing user) via the horde GUI will not be synced back.
Nested groups are not supported.
The script runs in testmode at first and shows the SQL commands that will be executed. run the script with -c to commit changes.
Adding the script to a hook in univention that will be called after changes to the mailinglist configuration could be nice.
I am not a database GUI, so if this script deletes all of your data I AM NOT RESPONSIBLE FOR ANY DAMAGES DONE WITH THIS.
Best regards,
Robert
importUsersHorde.py (4.4 KB)