Question
In Control Panel > Exchange, a Provider sees a number of mailboxes in Updating and Deleting states.
Corresponding tasks to update or remove such mailboxes were canceled in the Parallels Operations Automation (POA) task manager and then deleted, and so cannot be rescheduled.
How can these statuses be set correctly?
Answer
To completely delete a mailbox, try to use the pem.exch.removeMailbox.xml
method first:
<methodCall>
<methodName>pem.exchange.removeMailbox</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>mailbox_id</name>
<value><int>$Entity_ID</int></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
To get $Entity_ID
, please see step 3.
Check that the user exists in Active Directory. If it is missing, recreate it (check the properties for other mailboxes, preferably for the same customer).
Check that the mailbox exists in Exchange:
PS> Get-Mailbox -Identity "user@domain.tld"
If it is missing, recreate it. Please note that a mailbox may be missing but the user can still exist in Exchange as a MailUser:
[PS] >Get-MailUser -Identity "user@domain.tld" Name RecipientType ---- ------------- $User MailUser
In this case, enable the user as a Mailbox:
[PS] >Get-MailUser -Identity "user@domain.tld" | Enable-Mailbox -Database $DATABASE Name Alias ServerName ProhibitSendQuota ---- ----- ---------- ----------------- $User $ALIAS $DBNAME unlimited
Update the mailbox status to 'Ready' in the POA database. Please note that it is strongly suggested you make backups before modifying the database.
Obtain the mailbox's entity_id:
plesk=> select * from actdir_entities where ldap_path LIKE '%$USER%';
Set the sync status to 0 in exch_mailboxes:
plesk=> update exch_mailboxes set sync_status=0,ops_scheduled=0 where mailbox_id=$Entity_ID;
If required, retry the removal after setting the correct status.