Let's face it, almost every organization has a "spammer-user" that likes to send tons of emails all at once. Depending on your server load and/or spam filter settings, it could clog the system - especially if you run a smaller Exchange environment.
With PowerShell, it's easy to restrict those users from hammering the queues:
First, we'll need to create a new Throttling Policy that limits the number of messages per minute:
New-ThrottlingPolicy -Name LimitSentMessages -MessageRateLimit 10
**Note** The above policy will limit the amount of messages sent per minute to 10. You can change that limit to how you see fit. You can also name the policy whatever you want.
If you wanted to limit the number of Recipients, you would run:
New-ThrottlingPolicy -Name LimitSentRecipients -RecipientRateLimit 50
**Note** Again, change the name to what you like, and adjust the limit.
To combine both the max messages per minute and number of recipients limits, run:
New-ThrottlingPolicy -Name LimitNumberofMessages -RecipientRateLimit 50 -MessageRateLimit 10
To assign users to the Policie(s), run:
Set-Mailbox -Identity "mailbox name" -ThrottlingPolicy LimitSentMessages
-or-
Set-Mailbox -Identity "mailbox name" -ThrottlingPolicy LimitSentRecipients
-or-
Set-Mailbox -Identity "mailbox name" -ThrottlingPolicy LimitNumberofMessages
**Note** Any messages sent over the threshold, will be stay in the Outbox or Drafts, until the time limit has passed.
Now those spammers won't kill the Exchange :)
Stacey,
ReplyDeleteI was thinking of using the MessageRateLimit parameter myself, but this MS article...
https://docs.microsoft.com/en-us/powershell/module/exchange/server-health-and-performance/new-throttlingpolicy?view=exchange-ps
says that...
"The MessageRateLimit parameter specifies the number of messages per minute that can be submitted to transport by POP3 or IMAP4 clients that use SMTP."
Surely MS knows that using POP or IMAP is a rarity nowadays. Is this a mistake?