1

I would like Exchange 2013 to send out quota alerts to admins, as well as individual users, so that we are aware of the situation.

I found this guide for Exchange 2010, but nothing for 2013. https://ibenna.wordpress.com/2012/08/07/configuring-mailbox-quota-messages-to-messaging-administrators/

Anyone know how to accomplish this for Exchange 2013?

Thanks

ltwally
  • 315
  • 2
  • 7
  • 23

2 Answers2

1

Figured it out. I added a new rule under ECP > Mail Flow > Rules.

Apply this rule if... The subject or body includes ... "your mailbox is"

Do the following ... Bcc the message to ...

ltwally
  • 315
  • 2
  • 7
  • 23
0

To be alerted of the condition that a user cannot send mail.

Create a trigger for event id 1078. Get it to run a cmd file

CMD
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -psconsolefile "E:\Program Files\Microsoft\Exchange Server\v15\bin\exshell.psc1" -file "E:\QuotaBreach.ps1"

QuotaBreach.ps1 Script

###################################################
# Check for existence of output file and delete it.
###################################################
$checkfile = Test-Path "E:\QuotaBreach.htm" 

If ($checkfile -like "True")

{
   Remove-Item "E:\QuotaBreach.htm"
}

##################################################
# Pull data out of Event and process cmdlet
##################################################

$address = Get-Eventlog -Logname "Application" -Source "MSExchangeIS" | where {$_.eventID -eq 1078} | select -first 1 | select @{n='SID';e={$_.ReplacementStrings[0]}} 

foreach ($sid in $address)
 {
      $mailbox = (get-mailbox $address.sid | select displayname)
      Get-MailboxfolderStatistics -Identity $sid.sid -FolderScope All -includeoldestandnewestitems  | select FolderPath,@{N="FolderSize (MB)";E={$_.FolderSize.ToMB()}},oldestitemreceiveddate,Newestitemreceiveddate,ItemsInFolder,ItemsInFolderAndSubFolders | convertto-html | out-file E:\QuotaBreach.htm -append
 }

 #################################################
 # Compile email and send
 #################################################

 $body = get-content E:\QuotaBreach.htm | Out-String
$recipients = "my.name@company.co.uk", "someone.else@company.co.uk"

 send-mailmessage -from "post.master@company.co.uk" -to $recipients -subject "$($mailbox.displayname) - Mailbox Breach"  -BodyAsHtml -body $body  -priority High -smtpServer "mail.company.co.uk"

 #################################################
Jenny D
  • 27,780
  • 21
  • 75
  • 114