locked
Delete emails from the server after certain days RRS feed

  • Question

  • Hi Team,

    we are in very unique  situation where we need to implement a new policy. The policy says emails older than xx days has to be deleted from the system automatically.

    but we understand the importance of emails. So we thought use outlook auto archive to archive emails before the xx days and then apply exchange retention policy to delete emails. Yes! obviously there wont be anything to delete in the mailbox, because by the time it reaches the XX days emails will be archived. But that was the plan to cover this policy. However after contacting Microsoft they confirmed that Exchange retention policy and outlook auto archive will not work together.

    so that's the background of this problem. 

    we need to run a script everyday from the server to delete emails after xx days. so then we will be able to use Outlook auto archive also without any issue.

    please help us.

    Tuesday, September 20, 2016 11:45 AM

Answers

  • You might be able use Messaging Records Management to do that with retention tags and retention policies.  However, be aware that MRM requires an Enterprise CAL.

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

    • Proposed as answer by Lynn-Li Wednesday, September 28, 2016 8:12 AM
    • Marked as answer by Lynn-Li Monday, October 3, 2016 1:27 AM
    Wednesday, September 21, 2016 10:37 PM

All replies

  • Honestly and frankly, that is a terrible idea.  You should revisit the business reason for deleting the mail after six days before configuring Outlook archiving, which is much less reliable than a server and is generally circumvents most of the reasons for a policy like the one you're being asked to enforce.

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

    Wednesday, September 21, 2016 12:58 AM
  • Hi Ed,

    I know, i have questioned about this few times and now it has become job threat that i cant question anymore. :(

    so do you see any way of creating a script to run in a scheduled time? the script should be able to do the same as retention Policy does. (the retention policy can be configured to delete emails)

    Thanks.

    Wednesday, September 21, 2016 3:35 AM
  • Hi,

    That's not a good idea to use script running in a scheduled time to delete emails. You should be consider to use either retention policy or outlook archive feature, that's the proper way. If you insist on script, use search-mailbox cmdlet. Note that it's not suggested and exchange performance may be affected when running this script if there are too may mailboxes in your organization.

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

    Script for reference

    https://social.technet.microsoft.com/Forums/exchange/en-US/581ea5df-0e65-47ea-8efd-aa67e27c0320/powershell-script-that-deletes-email-older-than-x-days-with-a-specific-subject-line-exchange?forum=exchange2010


    Regards,

    Lynn-Li

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, September 21, 2016 9:53 AM
  • You might be able use Messaging Records Management to do that with retention tags and retention policies.  However, be aware that MRM requires an Enterprise CAL.

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

    • Proposed as answer by Lynn-Li Wednesday, September 28, 2016 8:12 AM
    • Marked as answer by Lynn-Li Monday, October 3, 2016 1:27 AM
    Wednesday, September 21, 2016 10:37 PM