none
Retention policy on large mailbox

    Question

  • We have a journal mailbox, which has been running since our Exchange 2013 was set up in early 2014, this has grown to 1.1TB in size with over 9 million items in the inbox folder.  We've taken the decision to purge data over 365 days old, so i've set up a retention policy to do this, but it hasn't worked - it's literally done nothing at all.  There are no error messages in the event viewer.

    I set up a test user, with a 1 day delete policy, and this seems to work fine, so the only difference i can see is the size of the mailbox.

    Has anyone else had issues running a retention policy on a very large mailbox?

    Monday, February 20, 2017 3:23 PM

Answers

  • Ok this appears to be resolved now.  Once i had manually cleared a good amount of data from the folder (reduced down to <400GB), the retention policy has kicked in and it's now running automatically.

    Hope this is of use to someone else!

    James Wilson

    • Marked as answer by James R Wilson Monday, February 27, 2017 10:17 AM
    Monday, February 27, 2017 10:17 AM

All replies

  • Did you verify that the policy is applied (i.e. can you see the "1year delete tag" stamped), and whether the MFA has processed the mailbox after? You can check on the later via:

    Export-MailboxDiagnosticLogs user@domain.com -ExtendedProperties

    Look for the ELC* properties, they will tell you when the mailbox was last processed and how many items were affected, etc.

    Monday, February 20, 2017 7:47 PM
  • And have you run Start-ManagedFolderAssistant against the mailbox?

    https://technet.microsoft.com/en-us/library/aa998864(v=exchg.160).aspx


    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
    Celebrating 20 years of providing Exchange peer support!


    Tuesday, February 21, 2017 1:58 AM
    Moderator
  • Hi James,

    Except above suggestions, you can also consider using the following command to delete the messages as a workaround:

    Search-Mailbox "Journal mailbox Name" -SearchQuery "Received:(1/1/2016..12/31/2016)" -DeleteContent

    Best Regards,


    Niko Cheng
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, February 21, 2017 8:40 AM
    Moderator
  • I've not used that cmdlet before - it seems to be showing that the mailbox isn't being processed...

      <Name>ControlDataForElcAssistant</Name>  <Value>0x010000004F5532868259D448</Value>
      <Name>ElcLastRunTotalProcessingTime</Name>  <Value>14487241</Value>
      <Name>ElcLastRunSubAssistantProcessingTime</Name>  <Value>14486508</Value>
      <Name>ElcLastRunUpdatedFolderCount</Name>  <Value>10</Value>
      <Name>ElcLastRunTaggedFolderCount</Name>  <Value>0</Value>
      <Name>ElcLastRunUpdatedItemCount</Name>  <Value>249868</Value>
      <Name>ElcLastRunTaggedWithArchiveItemCount</Name>  <Value>0</Value>
      <Name>ElcLastRunTaggedWithExpiryItemCount</Name>  <Value>249868</Value>
      <Name>ElcLastRunDeletedFromRootItemCount</Name>  <Value>0</Value>
      <Name>ElcLastRunDeletedFromDumpsterItemCount</Name>  <Value>0</Value>
      <Name>ElcLastRunArchivedFromRootItemCount</Name>  <Value>0</Value>
      <Name>ElcLastRunArchivedFromDumpsterItemCount</Name>  <Value>0</Value>
      <Name>ELCLastSuccessTimestamp</Name>  <Value>09/02/2017 13:49:51</Value>

    When i check the same for the test mailbox i set up - thats showing the LastSuccessTimeStamp as today...


    Tuesday, February 21, 2017 9:00 AM
  • Yes - i've used that command to try and trigger the process - it's not failed or given an errors, it's just not done anything!
    Tuesday, February 21, 2017 9:01 AM
  • Thats what i'm in the process of doing now - the only issue is that the search-mailbox command is limited to 10,000 results.  I've written a script that will go through day by day and delete content for that day, but some days have more than 10,000 results so have to run it a couple of times then - it's a bit of a hassle.  I'm just hoping that when i've deleted some of the content the retention policy will actually kick in and work!
    Tuesday, February 21, 2017 9:03 AM
  • So it might be something with the actual mailbox or the DB, you can try getting more info via:

    Export-MailboxDiagnosticLogs mailboxname -ComponentName MRM

    The logs should also give some hint (https://technet.microsoft.com/en-us/library/bb310783(v=exchg.150).aspx).

    Oh, and did you also check if the mailbox is on retention hold?

    Tuesday, February 21, 2017 10:56 AM
  • So it might be something with the actual mailbox or the DB, you can try getting more info via:

    Export-MailboxDiagnosticLogs mailboxname -ComponentName MRM

    The logs should also give some hint (link removed)

    Oh, and did you also check if the mailbox is on retention hold?

    Thanks Vasil - i've checked the retention hold for the mailbox and thats set to False.

    I've run export-mailboxdiagnosticslogs command from above, and that has led me to see that there are errors of some description - i've posted below - i'm guessing that it's telling me that there is an item in the mailbox which is causing it to crash...

    19/02/2017 15:21:53 Exception: Microsoft.Exchange.Data.Storage.StorageTransientException: Cannot save
    changes made to an item to store. ---> Microsoft.Mapi.MapiExceptionTimeout: MapiExceptionTimeout: Unable
    to save changes. (hr=0x80040401, ec=-2147220479)
    Diagnostic context:
        Lid: 55847   EMSMDBPOOL.EcPoolSessionDoRpc called [length=175]
        Lid: 43559   EMSMDBPOOL.EcPoolSessionDoRpc returned [ec=0x80040401][length=178][latency=0]
        Lid: 32881   StoreEc: 0x80040401
        Lid: 50035
        Lid: 64625   StoreEc: 0x80040401
        Lid: 52176   ClientVersion: 15.0.1178.9
        Lid: 50032   ServerVersion: 15.0.1178.6009
        Lid: 50128
        Lid: 1494    ---- Remote Context Beg ----
        Lid: 53152   dwParam: 0xA
        Lid: 53152   dwParam: 0xA
        Lid: 43632   StoreEc: 0x80040401
        Lid: 58656   StoreEc: 0x80040401
        Lid: 35992   StoreEc: 0x80040401
        Lid: 1750    ---- Remote Context End ----
        Lid: 1494    ---- Remote Context Beg ----
        Lid: 53152   dwParam: 0xA
        Lid: 53152   dwParam: 0xA
        Lid: 43632   StoreEc: 0x80040401
        Lid: 58656   StoreEc: 0x80040401
        Lid: 35992   StoreEc: 0x80040401
        Lid: 1750    ---- Remote Context End ----
        Lid: 50288
        Lid: 23354   StoreEc: 0x80040401
        Lid: 25913
        Lid: 21817   ROP Failure: 0x80040401
        Lid: 17361
        Lid: 19665   StoreEc: 0x80040401
        Lid: 37632
        Lid: 37888   StoreEc: 0x80040401
       at Microsoft.Mapi.MapiExceptionHelper.InternalThrowIfErrorOrWarning(String message, Int32 hresult,
    Boolean allowWarnings, Int32 ec, DiagnosticContext diagCtx, Exception innerException)
       at Microsoft.Mapi.MapiExceptionHelper.ThrowIfError(String message, Int32 hresult, IExInterface
    iUnknown, Exception innerException)
       at Microsoft.Mapi.MapiProp.SaveChanges(SaveChangesFlags flags)
       at Microsoft.Exchange.Data.Storage.MapiPropertyBag.SaveChanges(Boolean force)
       --- End of inner exception stack trace ---
       at Microsoft.Exchange.Data.Storage.MapiPropertyBag.SaveChanges(Boolean force)
       at Microsoft.Exchange.Data.Storage.StoreObjectPropertyBag.SaveChanges(Boolean force)
       at Microsoft.Exchange.Data.Storage.AcrPropertyBag.SaveChangesWithAcr(SaveMode saveMode)
       at Microsoft.Exchange.Data.Storage.CoreItem.InternalSave(SaveMode saveMode, CallbackContext
    callbackContext)
       at Microsoft.Exchange.Data.Storage.Item.SaveInternal(SaveMode saveMode, Boolean commit,
    CallbackContext callbackContext, CoreItemOperation operation)
       at Microsoft.Exchange.Data.Storage.Item.Save(SaveMode saveMode)
       at Microsoft.Exchange.MailboxAssistants.Assistants.ELC.ItemPropertySynchronizer.<>c__DisplayClass2.<Co
    mmitChangesAlready>b__0()

    *** EDIT ****

    I note that in the event log, later instances of the MSExchangeAssistants source say that the mailboxes were successfully processed, and 0 mailboxes were skipped due to errors.

    Tuesday, February 21, 2017 11:53 AM
  • Ok this appears to be resolved now.  Once i had manually cleared a good amount of data from the folder (reduced down to <400GB), the retention policy has kicked in and it's now running automatically.

    Hope this is of use to someone else!

    James Wilson

    • Marked as answer by James R Wilson Monday, February 27, 2017 10:17 AM
    Monday, February 27, 2017 10:17 AM