Today I was fighting with the pretty often case. User complained scheduled archiving doesn't archive items thus the mailbox reaches its quota.
Usually the reason of that is lot of new items or items were restored recently, which aren't eligible for archiving by age. But this time I saw a lot of old items, which were not archived.
I checked dtrace log for calling method CArchivingAgent::IsEligibleForArchive(), hoping to find a reason why definitely eligible iteam appear not eligible. But instead I've found out there are much less items checked then mailbox contains. So I tried to find any information on getting list of items and found following entries:
EFP - Folder Policy Settings for [Inbox]| Filter Type = Not archiving this folder (do not archive)| Archive Settings Locked = FALSE| Override Locks = FALSE| Delete Original = FALSE| Create Shortcut = FALSE| Archive unread items = FALSE| Archiving based on : Quota| Quota Percent Free = 0| Using age based size priority| Minimum Size 1024KB| Do not archive items younger than 3 Weeks
So several folders including Inbox were (I hope mistakenly) excluded by user from archiving.
Fixing the setting (just inherited settings for these folder from the parent has fixed the problem