Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a situation where users have an average of 20 to 30,000 emails in their inbox. We are adding more employees and mailboxes and this is getting out of control.

I have limited each mailbox to 1GB total however most of the time because these emails are so small even with 50,000 messages it's less than 1GB mailbox size.

My question. Is there a way to limit the mailbox by # of messages. Similar to mailbox size restrictions ?

It's an Exchange 2007 server.

share|improve this question
3  
What issues are you running into with 30,000 small emails. I have mailboxes with over 100,000 messages without issue –  Jim B May 5 '11 at 18:39
    
Exchange can handle 100,000 message in total, but not 100,000 messages in one folder (ie the inbox). It think it is recommended to keep the number down to below 3000. –  sgmoore May 5 '11 at 19:26
    
My mistake. The Exchange 2007 'limit' is 20,000 –  sgmoore May 5 '11 at 19:34
1  
@sgmoore are you sure, i had a folder that regularly had 100k+ messages in it on an Exchange 2003 server (long story don't ask). –  Zypher May 5 '11 at 19:53
    
@Zypher. See the article 'Understanding the Performance Impact of High Item Counts and Restricted Views' on technet link . On re-reading my message, I should have said, Exchange can easily handle 100,000 message in total, but not 100,000 messages in one folder (ie the inbox) .... The original implied that Exchange would not handle that number, whereas I meant it could struggle. Also, it does make a big difference if the folder is regularly opened (eg inbox) as opposed to a folder which may rarely be accessed. –  sgmoore May 5 '11 at 20:53

3 Answers 3

up vote 6 down vote accepted

You can only limit mailboxes by size, not item count in Exchange.

Is there any reason you care how many items are there, as long as the quota is maintained?

Here is some light reading on Exchange quotas.

share|improve this answer

If you want Exchange to automatically enforce a limit, I think you have to resort to monitoring the size of the folders.

The Exchange Team Blog has an Article about Finding High Item Count Folders using this PowerShell command:

Get-Mailbox | Get-MailboxFolderStatistics | Where {$_.ItemsInFolder -gt 5000} | Sort-Object -Property ItemsInFolder -Descending | fl Identity, ItemsInFolder

It's not an automated limit like you're looking for, but can help you monitor the situation and take action as you see is appropriate. There's a lot more information in the article too, including a downloadable version of the script.

share|improve this answer
    
Apologies. I didn't see anything in the original question that mentioned how he was monitoring the folders, so thought he may be doing it manually. The link, which points to the exchange team blog (blogs.technet.com/b/exchange/archive/2009/12/07/3408973.aspx ) gives details of Powershell command which can be used to report only the folders which have more than a specified number of messages, plus a powershell script which can export the information to excel. –  sgmoore May 5 '11 at 20:41

There's no way to do this built into Exchange. With the right amount of gumption you could do this with Exchange Web Services. The TotalCount property from the GetFolder operation could be performed on each folder within the users inbox and a total could be established.

See the reference for this here: http://msdn.microsoft.com/en-us/library/aa580274%28v=EXCHG.140%29.aspx

There's a bunch of reasons to be careful when doing this. You'd need an account with alot of access. You'd also want to watch the performance hit this would generate by testing a mailbox or two at a time first.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.