View | Details | Raw Unified | Return to bug 53466
Collapse All | Expand All

(-)management/univention-management-console-module-adtakeover/umc/python/adtakeover/takeover.py (-8 / +5 lines)
Lines 1334-1347 class AD_Takeover(object): Link Here
1334
			for attr in ("mail", "proxyAddresses"):
1334
			for attr in ("mail", "proxyAddresses"):
1335
				if attr in msg:
1335
				if attr in msg:
1336
					for address in msg[attr]:
1336
					for address in msg[attr]:
1337
						address = address.decode('UTF-8').find("@")
1337
						address, _, domainpart = address.decode('UTF-8').lower().rpartition('@')
1338
						char_idx = address.find("@")
1338
						# if not domainpart.endswith(".local"): ## We need to create all the domains. Alternatively set:
1339
						if char_idx != -1:
1339
						# ucr:directory/manager/web/modules/users/user/properties/mailAlternativeAddress/syntax=emailAddress
1340
							domainpart = address[char_idx + 1:].lower()
1340
						if domainpart and domainpart not in maildomains:
1341
							# if not domainpart.endswith(".local"): ## We need to create all the domains. Alternatively set:
1341
							maildomains.append(domainpart)
1342
							# ucr:directory/manager/web/modules/users/user/properties/mailAlternativeAddress/syntax=emailAddress
1343
							if domainpart not in maildomains:
1344
								maildomains.append(domainpart)
1345
		for maildomain in maildomains:
1342
		for maildomain in maildomains:
1346
			returncode = run_and_output_to_log(["univention-directory-manager", "mail/domain", "create", "--ignore_exists", "--position", "cn=domain,cn=mail,%s" % self.ucr["ldap/base"], "--set", "name=%s" % maildomain], log.debug)
1343
			returncode = run_and_output_to_log(["univention-directory-manager", "mail/domain", "create", "--ignore_exists", "--position", "cn=domain,cn=mail,%s" % self.ucr["ldap/base"], "--set", "name=%s" % maildomain], log.debug)
1347
			if returncode != 0:
1344
			if returncode != 0:

Return to bug 53466