Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 606
  • Last Modified:

need to send an email alert for just 1 individual mailbox

i need to send an email or alert when my journal mailbox either reaches a certian size or better still when it reaches a certain number of items in the inbox
0
dougdog
Asked:
dougdog
  • 5
  • 3
  • 2
  • +1
1 Solution
 
peeaCommented:
Are you talking about the client side running Microsoft Outlook?

If yes, the Outlook rules may help. Have a look at the following link for some hints.

http://www.wikihow.com/Manage-Email-Using-Microsoft-Outlook-Rules
0
 
dougdogAuthor Commented:
no some sort of script or something
rulea do not work for me
0
 
peeaCommented:
> some sort of script or something

You mean Exchange Server side scripting?
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
dougdogAuthor Commented:
i dont care all i need is to be kept informed when the journal mailbox reaches a certain size
or certain number of items
i dont care how it does it as long as i get some sort of alert
0
 
David LeeCommented:
Hi, dougdog.

I could accomplish this with an Outlook macro, but there's a downside.  For the macro to work, you'll have to keep a computer running with Outlook open all the time.  The macro would watch for new items being delivered to the mailbox.  Each time a new item arrived, the macro would count the number of items and/or calculate how space the mailbox is using and send you an email if it goes over the limits you set.  If you closed Outlook, then the process would stop.  If leaving a computer on with Outlook open i s a problem, then one fallback position would be to write a script that would check periodically (e.g. once an hour).  You'd schedule the script to run using Windows Scheduler.  You could pick whatever interval you want.  If that's not good, then you're left with using an event-sink.  An event-sink is a script that runs at the Exchange server.  If that's the route you need to go, then I recommend that you hire a professional developer.  A poorly written, buggy event-sink could bring the entire server down.  They are best left to someone with experience in that arena.
0
 
dougdogAuthor Commented:
The schedule script sound's good
How could I achieve this
0
 
EEhotlineCommented:
Did you set up storage quota limit for mailbox in your exchange servers? If you do, you can create a transport rule.

Try:

a.      Launch EMC

b.      Expand to “Organization Configuration”>”Hub Transport”

c.       In the middle-pane, select “Transport Rules” and create a new rule

d.      In the wizard, set the rule as below:

Apply rule to message

When the Subject field contains The words in the subject of quota message

   And copy the message to Administrator

Notes: You can also add more conditions into the rule in order to scope more strictly on the messages.
0
 
dougdogAuthor Commented:
Tried this but for some reason doesnt work.
Also this only would send out 1 alert
0
 
David LeeCommented:
dougdog,

Do you want the item count/size for the entire mailbox (e.g. inbox, calendar, tasks) or just a single folder?  If the latter, what folder?
0
 
dougdogAuthor Commented:
all i need is the inbox
0
 
David LeeCommented:
dougdog,

Here's the script.  Follow these instructions to use it.

1.  Open Notepad
2.  Copy the code and paste it into Notepad
3.  Edit the code per the comments I included in it
4.  Save the file.  Yoou can name it anything you want, but the extension must be .vbs
5.  Create a new task in Windows Task Scheduler
6.  Set the task to run this script
7.  Set the task to run at whatever interval you choose

The computer must be on for the task to run.  Outlook does not need to be open.  The script will open Outlook in the background and close it when it's done.  The task must be run under an account that has access to the mailbox you want to check.

'--> Create some constants
	'On the next line enter the name of the profile the mailbox is in
	Const PROFILE_NAME = "Outlook"
	'On the next line set the message count threshold. 
	Const MSG_COUNT_LIMIT = 500
	'On the next line set the message size threshold
	Const MSG_SIZE_LIMIT = 50000000
	'On the next line set the subject of the warning message the script will send if the mailbox is over either threshold
	Const WARNING_SUBJECT = "Mailbox Over Limit"
	'On the next line set the eamil address the warning message will go to if the mailbox is over either threshold
	Const WARNING_ADDRESS = "dougdog@company.com"
	Const SCRIPT_NAME = "Check Mailbox Size"
	Const olMailItem = 0
	Const olFormatPlain = 1
	Const olFolderInbox = 6

'--> Create some variables
	Dim olkApp, olkSes, olkFld, olkItm, olkMsg, varSiz, bolSiz, bolCnt
	
'--> Connect to Outlook
	Set olkApp = CreateObject("Outlook.Application")
	Set olkSes = olkApp.GetNamespace("MAPI")
	olkSes.Logon PROFILE_NAME
	Set olkFld = olkSes.GetDefaultFolder(olFolderInbox)
	
'--> Check the mailbox size and item count
	varSiz = 0
	For Each olkItm In olkFld.Items
		varSiz = varSiz + olkItm.Size
	Next
	bolSiz = (varSiz > MSG_SIZE_LIMIT)
	bolCnt = (olkFld.Items.Count > MSG_COUNT_LIMIT)
	If bolSiz Or bolCnt Then
		Set olkMsg = olkApp.CreateItem(olMailItem)
		With olkMsg
			.subject = WARNING_SUBJECT
			.to = WARNING_ADDRESS
			.bodyformat = olFormatPlain
			If bolSiz And bolCnt Then
				.body = "The mailbox is over both the size and count limits." & vbCrLf & vbCrLf & "Size: " & varSiz & vbCrLf & "Count: " & olkFld.Items.Count
			Else
				If bolSiz Then
					.body = "The mailbox is over the size limit." & vbCrLf & vbCrLf & "Size: " & varSiz
				Else
					If bolCnt Then
						.body "The mailbox is over the count limit." & vbCrLf & vbCrLf & "Count: " & olkFld.Items.Count
					End If
				End If
			End If
			.send
		End With
	End If
	
'--> Disconnect from Outlook
	Set olkMsg = Nothing
	Set olkItm = Nothing
	Set olkFld = nothing
	olkSes.Logoff
	Set olkSes = Nothing
	Set olkApp = Nothing

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now