Dynamics CRM 2013 Server-Side Synchronization Email Process Issue After Disabled Mailbox
BLOG UPDATED 3rd March 2015
This article is to highlight a potential issue customers may run into with Dynamics CRM 2013 when using Server-Side Synchronization and disabling a mailbox.
We have seen recently that if you disable a mailbox, due to reasons such as a maintenance window, when you re-enable the mailbox any incoming emails that arrived in the timeframe when the mailbox was disabled, will not be processed by Dynamics CRM 2013.
Certain values in the mailboxbase SQL table change when you disable the mailbox.
When the mailbox is disabled it sets the PostponeMailboxProcessingUntil value in the mailboxbase table to 9999-12-31. In other words, it postpones the processing of the mailbox until the year 9999; so forever.
When you reactivate the mailbox, in SQL on the mailbox table you can see what the values of PostponeMailboxProcessingUntil and ProcessEmailReceivedAfter now are.
When the mailbox is re-activated, at the next sync cycle of the async service to poll the email (e.g. 3 minutes but depends on load) it will start processing the emails received after the mailbox was re-activated, but as stated above, it will not process/ bring in emails received while the mailbox was disabled.
Updated, Supported Method to be done:
In CRM go to Settings – Email Configuration – Email Server Profiles, and open the Email Server Profile in question and expand “Advanced” near the bottom of the page and update the value for “Process Email From”
Unsupported method (for information purposes only, not to be done in production systems)
The below action will NOT create duplicate emails, as it does not affect the systemstate xml, (same as email router), and the email has its unique messageid, so no duplicate of the email is created for emails that have been processed already.
In SQL run the below 2 statements, changing the email address to your mailbox and the time for ProcessEmailReceivedAfter to before you disabled the mailbox.
It does not matter if you set the time for ProcessEmailReceivedAfter 1 hour before the mailbox was disabled or 1 week before, as it will not create duplicates, but it will of course take longer to go through emails.
The value of ProcessEmailReceivedAfter will change in SQL once the next poll of emails has been done.
Note: As always when making changes to SQL, ensure you have a database backup.
update mailboxbase
set ProcessEmailReceivedAfter = '2015-01-21 13:42:59.000'
where Emailaddress = 'kev@crm5.local'
update mailboxbase
set PostponeMailboxProcessingUntil = GETUTCDATE()
where Emailaddress = 'kev@crm5.local'
Once the above has been run, emails that arrived while the mailbox was disabled will be processed by Dynamics CRM 2013.
Best Regards
Dynamics EMEA CRM Support Team
Share this Blog Article on Twitter
Follow Us on Twitter
Dynamics CRM Support Team
Comments
- Anonymous
September 16, 2015
sorry for my English :) I found the article very interesting, but I would find the mailboxex for which the state is changed to disabled