Symptoms

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 admin@example.com. 

Cause

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.

Resolution

In order to workaround the limitation:

  1. Download removeEmailAddressesBasedOnExchangeDomain.py script to OA Management Node.
  2. Run the script with the parameters:

    # python removeEmailAddressesBasedOnExchangeDomain.py --subscription 10000001 --domain example.com
    

    where example.com is the domain to be deleted

  3. Wait for 'Updating addresses of mailbox 'XXXXX' (id=NNN)' tasks completion.
  4. Delete the domain again in Control Panel.

Internal content