Solved

Exchange 2010 Public Folder Not Deleting Items after Age Limit

Posted on 2014-03-17
30
977 Views
Last Modified: 2015-06-24
Hello Experts,

DISCLAIMER: I'm not a Exchange Guru of any sort.  I'm more of your Level 2 Jack-Of-All-Trades types.  So go easy on me.

I'd like to delete items in a mail-enabled public folder (Exchange 2010) after X amount of days.  I've found blogs, articles, and even Microsoft documentation on how to do so.  So to start off I'm going to explain what I've done:
In the Public Folder Management Console (PFMC) I went under the PF's properties > Replication and set the "Local Replica Age Limit" to X days.  Our PF Database's replication time is set to every 15 minutes, so I waited an hour to see any change.  I saw nothing.
Thinking that I had somehow misinterpreted the Microsoft documentation on public folder attributes I also set the "age limit for replicas (days)" attribute to X days as well.  This time I waited 24 hours, but still no emails were deleting themselves.

At this time I have this PF's "Local Replica Age Limit" and "age limit for replicas (days)" set to X days.  EVERYTHING I'm reading is telling me that if I set the "Local Replica Age Limit" that items (in my case emails) should be deleting themselves automatically so I MUST be missing something.

Help me out here Guys/Gals.
0
Comment
Question by:elitegk
  • 14
  • 9
  • 2
  • +1
30 Comments
 
LVL 63

Accepted Solution

by:
Simon Butler (Sembee) earned 500 total points
ID: 39936412
Are you backing up the Public Folder database with an Exchange aware backup application?
The best practise is to have the option enabled to NOT delete items until a backup has completed. Therefore if your backup isn't working or isn't Exchange aware then I don't think the data will delete.

You may also find that the content will not delete until the number of days have passed - so if you have set it to 30 days, it will take 30 days before content gets deleted.

Simon.
0
 

Author Comment

by:elitegk
ID: 39936900
Simon,

Firstly, thanks for responding.  Ok, so we currently use a backup solution that does it's backups at the server level, so I don't believe it's "Exchange Aware".  Is there a mechanism built into exchange to do the backups necessary?  Or is there a way to check the last time the database was backed up with the EMS?

And oh...ok.  So I understand correctly, if I set the "Local Replica Age Limit" to 30 days, the items 30 days or older (at this moment) will not be deleted.  It would take 30 days for everything past 30 days to start deleting?  The requester of the cleanup wants to keep things 6 months out so I'm going to have to wait ~180 days to see if this starts to delete.
0
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 39937839
A server level backup isn't Exchange aware, therefore recovery of the Exchange data may not work correctly. Exchange is not designed to be backed up using any kind of "open files" or image based backup. The backup flushes the logs and Exchange does other things in the background.

If you look at the properties of the database then it will tell you when the database was last backed up by an Exchange aware backup. There is nothing in Exchange to do the backup (like there is with SQL). You can use Windows Backup, but that isn't very flexible and not many clients of mine use it.

My instinct is the lack of backups is the cause.

Simon.
0
 

Author Comment

by:elitegk
ID: 39938111
I checked the PF Database and it shows it was backed up at 4PM today, so the backups either appear to be exchange aware or there is another backup locally on the box.

So with that out of the way, are we sure that the deletion of old email will not take place until the setting has been in place for that specified amount of days?

Example: I set "Local Replica Age Limit" to 30 days.  There are emails in the PF that are 60+ days old currently, but those emails will not automatically delete until that settings has been active for 30 days.  I feel like I misunderstood what you were saying, which is why I want to clarify.  That seems a bit off.
0
 

Author Comment

by:elitegk
ID: 39951038
Simon - Any news?

Everyone else - Anyone else willing to chime in on what I have going on?

Thanks in Advance,

EliteGK
0
 
LVL 15

Expert Comment

by:jrhelgeson
ID: 39986419
Run a repair of the public folder database.
New-PublicFolderDatabaseRepairRequest -Database "Public Folders" -CorruptionType ReplState

Open in new window

Check the event log for any errors.

Also, you do not want to use "age limit for replicas (days)". Only use the "Local replica age
limit (days):" setting.
0
 

Author Comment

by:elitegk
ID: 39989350
Thank you for responding.  I was starting to loose hope. :/

I'm going to be captain obvious and say that the db repair needs to be done off hours, correct?  Also, I'm going to guess that backing up the DB is a good thing.  Any suggestions on the easiest/best way to do that?

Thanks in advance,

EliteGK
0
 
LVL 15

Expert Comment

by:jrhelgeson
ID: 39989638
Actually, db repair can be done online and is non-disruptive starting with Exchange 2010. Therefore, captain, it can be done during business hours. ;-)

Backing up of exchange databases should be done by any decent server backup software.  It's always good to have backups, but these repair tools are quite safe to run.
0
 

Author Comment

by:elitegk
ID: 39989666
Ok thanks for the info.  I'm working on another outage currently and don't want to stack them on top of each other, so I should be able to try this out tomorrow.

Thanks again,

EliteGK
0
 

Author Comment

by:elitegk
ID: 40000014
So I ran the repair just a moment ago and it completed successfully.  This is what I saw in the event logs.

Corruption(s) detected during online integrity check for request 5a2fb391-b90a-45c0-84e2-15ee0fbb50f5 
Database:Public_Folders 
Table:ReplState 
Corruption	Is Fixed	FID	Property	Resolution 
Public Folder Replication State, Yes, 2-FFFFFFFF0004, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 3-7, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 3-8, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 5-12, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 5-13, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 5-14, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 5-16, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 5-17, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 5-18, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 5-19, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 5-1A, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 6-11, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 6-12, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 6-13, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 6-15, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 7-7, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 7-8, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 8-22, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 8-23E4A, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 8-23E4B, 0x66980102, Remove mismatched replication state entries
Public Folder Replication State, Yes, 9-8, 0x66980102, Remove mismatched replication state entries

Open in new window


Let me know your thoughts on the above.  It seems like it identified some corruption on the DB and is either telling us that it removed mismatched replications or is making a suggestion to do so.

Thanks,

EliteGK
0
 
LVL 15

Expert Comment

by:jrhelgeson
ID: 40000212
You always can re-run the repair and see if it comes back clean.

Also, is it now behaving as expected?
0
 

Author Comment

by:elitegk
ID: 40000271
So I re-ran the repair and it did come back clean, so that's good! :)

Unfortunately I don't believe that it's working as expected.  Under properties for the Public Folder DB and then Replication I'm seeing the following

Replication Tab for Public Folders DB
My understanding is that the public folder settings should be pushing out every 15 minutes.  With that in mind the 180 day Local Replica Age Limit should be deleting the emails older than that every 15 minutes, correct?
0
 
LVL 15

Expert Comment

by:jrhelgeson
ID: 40000373
That screen simply shows replication intervals and message sizes.

You want to get to the Local replica age limit (days): setting.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:elitegk
ID: 40000383
That setting is already set at 180 days at the folder-level for the folder in question.  I'm asking where to view how often that setting would be applied (i.e. enforced) so I can check to see if the emails are being deleted?

If you need clarification on what I mean let me know.
0
 
LVL 15

Expert Comment

by:jrhelgeson
ID: 40000442
Mailbox cleanup process usually happens every 24 hours.
0
 

Author Comment

by:elitegk
ID: 40001614
I checked this morning and there are still emails in the folder before October 17 (I believe that's 180 days prior to us now).  Two quick questions:

Is there a place to see what time the mailbox cleanup should take place?  If so, where?
If not, is there a universal time that this should be taking place?

As a side note, I did notice that under the public folder's Properties > Limits tab I had left the Use Database age defaults unchecked which allowed for the Age Limit for Replica (days) settings to be set.  I've corrected this so that only the Local Replica Age Limit (days) setting is set for the public folder.

Again thanks for all of your help so far.
0
 
LVL 15

Expert Comment

by:jrhelgeson
ID: 40001847
At this point, we'd need to take a wait-and-see approach.
In the meantime, could you post the output of the following into a "Code" window:
Get-PublicFolderDatabase | fl *period*,*delete*,*maint*

Open in new window

0
 

Author Comment

by:elitegk
ID: 40001876
Sure.

ItemRetentionPeriod                          : unlimited
ReplicationPeriod                            : 15
EventHistoryRetentionPeriod                  : 7.00:00:00
DeletedItemRetention                         : 14.00:00:00
RetainDeletedItemsUntilBackup                : False
BackgroundDatabaseMaintenance                : True
ReplayBackgroundDatabaseMaintenance          :
BackgroundDatabaseMaintenanceSerialization   :
BackgroundDatabaseMaintenanceDelay           :
ReplayBackgroundDatabaseMaintenanceDelay     :
MimimumBackgroundDatabaseMaintenanceInterval :
MaximumBackgroundDatabaseMaintenanceInterval :
MaintenanceSchedule                          : {Sun.1:00 AM-Sun.5:00 AM, Mon.1:00 AM-Mon.5:00 AM, Tue.1:00 AM-Tue.5:00
                                               AM, Wed.1:00 AM-Wed.5:00 AM, Thu.1:00 AM-Thu.5:00 AM, Fri.1:00 AM-Fri.5:
                                               00 AM, Sat.1:00 AM-Sat.5:00 AM}

Open in new window

0
 
LVL 15

Expert Comment

by:jrhelgeson
ID: 40001968
Methinks we need to update the value of ItemRetentionPeriod

From get-help set-publicfolderdatabase -full it states:
-ItemRetentionPeriod <Unlimited>
The ItemRetentionPeriod parameter specifies the length of time that items are retained in a folder before they're deleted during store maintenance.
Set-PublicFolderDatabase -Identity "Public Folders" -ItemRetentionPeriod 180

Open in new window

0
 

Author Comment

by:elitegk
ID: 40002064
The only issue I see is that there are other folders that I do not want to apply this setting to.  

*Puts his cpt. obvious cap on again*

I would assume that applying the item retention value at this level would force the other folders in the public folders DB to do the same, right?
0
 

Author Comment

by:elitegk
ID: 40007405
I've also checked again today and the same emails are in the folder back past 180 days.
0
 
LVL 15

Expert Comment

by:jrhelgeson
ID: 40008555
Have you repeated the troubleshooting steps you went through prior to the database repair?
0
 

Author Comment

by:elitegk
ID: 40012909
As per Sembee's original suggestion, I did again check the properties of the PF DB and it is showing that a backup did occur today.  There is no incremental backup showing, but a full backup time is listed there.

Other than that I've checked the settings again for the Local Replica Age Limit for the Public Folder in question and it is set.

To be clear, I did not set the ItemRetentionPeriod because of my previous post.  There are other public folders in this database that I do not want set with a local replica age limit.

I also have a question.  Sembee (the origional expert to respond to my post) was implying that if I set the Local Replica Age Limit for X days, that even though there are items older than X days old in that PF, they will not start deleting until X days have passed with that setting in place.  Does that sound correct to you?  It sounded a bit off to me and want to make sure I'm not going to need to wait 180 days for items to start deleting.

Let me know if any of that made sense.

EliteGK.
0
 
LVL 15

Expert Comment

by:jrhelgeson
ID: 40013467
Yes it makes sense, and yes, I would tend to think that he is correct in that it may take N-days to get it to start deleting data based upon the value contained for "age limit for replicas (days)".

I'd need to research to confirm this.  It isn't looking at the age of the object (the date/time stamp), it's looking at the date the replica took place.

What are the values you have set for:
Local Replica Age Limit
age limit for replicas (days)
0
 

Author Comment

by:elitegk
ID: 40013486
Thanks.  For the PF in question, I have:

Local Replica Age Limit: 180 days
Age Limit for Replicas (days): I have it checked to use the Database Default.
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40848174
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now