2

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.

5
  • 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, 2011 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, 2011 at 19:26
  • My mistake. The Exchange 2007 'limit' is 20,000
    – sgmoore
    May 5, 2011 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, 2011 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, 2011 at 20:53

3 Answers 3

6

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.

3

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.

1
  • 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, 2011 at 20:41
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .