It is not possible to:
- delete a domain
- remove mail hosting from a domain
in an Exchange subscription, in case it contains too many mailboxes.
The following error is shown in the Control Panel:
An unforeseen error occurred. Please contact email@example.com.
The domain contains Exchange mail hosting and it is associated with a big amount of mailboxes. Upon removal, the system needs to update all mailbox APS resources and exclude the removed alias from them. This operation is the bottleneck, as it cannot be done in bulk. Finally, the domain removal hits the 5-minute transaction timeout of OSA core. The limitation is acknowledged under ID POA-81859.
In order to workaround the limitation:
- Download removeEmailAddressesBasedOnExchangeDomain.py script to OA Management Node.
Run the script with the parameters:
# python removeEmailAddressesBasedOnExchangeDomain.py --subscription 10000001 --domain example.com
where example.com is the domain to be deleted
- Wait for 'Updating addresses of mailbox 'XXXXX' (id=NNN)' tasks completion.
- Delete the domain again in Control Panel.