none
Deleting messages before a certain date

    Question

  • We use a document management system for all of our invoices (filebound.com).  Each site we have sends invoice to a site mailbox (EX:  Bookeeper at site1 would send a scanned invoice to site1@company.com).

    There is an unattended pc that monitors these mailboxes for these attachments, and imports them in to the document management system.

    The message remains in the mailbox.

    On exchange, what can I do to automatically delete any message, in each maibox, dated after a year ago?  They want to retain anything before the year mark for record purposes and to make sure they were all imported.

    Thanks.  


    • Edited by rudnicke Tuesday, June 5, 2018 6:38 PM Update statement
    Tuesday, June 5, 2018 1:10 PM

Answers

  • Hi rudnicke,

    Those steps below may be useful to you:

    1. Enable achieve for this mailbox:

    Enable-Mailbox xxx -Archive -ArchiveDatabase "Mailbox Database xxx"

    2. Create a retention tag to achieve mails from mailbox automatically:

    3. Add this retention tag to a retention policy:

    4. Apply this retention policy to this mailbox:

    Set-Mailbox xxx -RetentionPolicy "1 Year Achieve"
    Start-ManagedFolderAssistant -Identity xxx
    After that, Exchange will achieve those mails which older then 1 year to database and remove them from user's mailbox.

    Regards,

    Kyle Xu


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

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Wednesday, June 6, 2018 8:50 AM

All replies

  •  Ok so to clarify

    1. How long do you want to retain the items in this mailbox?
    2. I ask because you say you wanted to delete then after a year but then say you wanted to retain them for record purposes

    Couple of ways to approach this

    • Go to the PC, open outlook, sort by date and delete
    • Or if you want to retain them but not within the inbox you could create subfolders for each year and then again sort by date, highlight the desired range and MOVE them to the new folder
    • Use the Exchange Shell to search for and delete messages via the DeleteContent parameter https://technet.microsoft.com/en-us/library/ff459253(v=exchg.141).aspx

    Another option would be to use a 3rd party utility like DigiScope via the Search ON Find action which allows you to setup criteria such as date range, search and when an item is found you can have it Delete/Purge the items or Export to PST and then Delete/Purge etc https://www.lucid8.com/documentation/DSWebHelp/DigiScopeHelp.htm#t=MNG%2FSearch_On_Find_Option.htm&rhsearch=Purge&rhhlterm=Purge&rhsyns=%20


    Search, Recover, Export Mailboxes, Folders, Email, Contacts, Calendars, Tasks, etc. from Offline Exchange Databases (EDBs), On-Premise Exchange Servers and Office 365. Migrate/Recover direct from any offline EDB into any On-Premises Exchange Server, even cross version i.e. 2003 → 2007 → 2010 →2013 → 2016 → Office 365 with Lucid8's DigiScope


    Tuesday, June 5, 2018 6:32 PM
  • Sorry for the confusion.

    1.  Keep anything not yet a year old.

    I'm curious if retention policies would do what I need.

    Tuesday, June 5, 2018 6:40 PM
  • Hi rudnicke,

    Those steps below may be useful to you:

    1. Enable achieve for this mailbox:

    Enable-Mailbox xxx -Archive -ArchiveDatabase "Mailbox Database xxx"

    2. Create a retention tag to achieve mails from mailbox automatically:

    3. Add this retention tag to a retention policy:

    4. Apply this retention policy to this mailbox:

    Set-Mailbox xxx -RetentionPolicy "1 Year Achieve"
    Start-ManagedFolderAssistant -Identity xxx
    After that, Exchange will achieve those mails which older then 1 year to database and remove them from user's mailbox.

    Regards,

    Kyle Xu


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

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Wednesday, June 6, 2018 8:50 AM
  • Hi rudnicke,

    Any update now?
    If the above suggestion helps, please be free to mark it as answer for helping more people.

    Regards,

    Kyle Xu


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

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, June 25, 2018 3:15 AM
  • I apologize for the long delay.  The above suggestion worked.  Thank you.
    Monday, June 25, 2018 12:11 PM