Why, as a matter of fact, I have a script that does just that.  (It's in
ASP, so don't tell anyone on this list.  They might ban me.)  ;)

I will try to remember the requirements, but I'm not at work now and I
may forget something.

* Create a domain account with adequate permissions to open each mailbox
on the mail server.  Test this by logging into a computer with the
domain account and configuring Outlook to connect to different
mailboxes.  Give it a while for the changes to propogate to each and
every mailbox.  It could take an hour on a large domain.

* On EACH mail server that contains mailboxes, create a new folder under
the local web site.  Create a new IIS virtual directory for this new
folder and secure it with basic authentication.  Test this by accessing
a test page in this folder and make sure is prompts for the username and
password for the domain account.

* Place the attached ASP script in this directory.  Test this page by
calling a similar url:
http://yourmailserver.domain.com/secured/MaiboxSizeAgent.asp?username=My
UserName
Note that the username you specify in the url MUST have a mailbox on
this server.  Repeat for EACH mail server.

* Place the attached CFM file on your CF server.  This page queries the
Active Directory for the necessary mailbox information and then calls
the ASP script on the appropriate mail server.  This page also requires
a logged-in user just to provide Active Directory information for the
ASP script.  This can be fudged in the code, however.

That should pretty much do it.  Here is the gist of what these script
do:

When accessing the CF page, ColdFusion connects to Active Directory to
get mailbox information such as the name of the mailbox server.  This is
because you could have more than one mailserver in your domain and the
users may not know which server contains their mailbox.  This takes care
of that automatically.

The CF page also pulls information from Active Directory showing their
current mailbox size limits, if any.  This is handy when the users
wonder why they cannot send email because they have exceeded their
quotas.

The mail server is determined by looking through the
msExchangeHomeServerName ldap attribute.  You will need to modify these
values to suit your domain.

CF calls the ASP page and passes the username as a url param.  This is
where you specify the username/password that has permissions to access
every mailbox on the mail server.

The ASP page sets up a few variables, starts an XML string, then
performs a query of the mailbox.  For each folder, and recursively-found
sub-folders, the ASP page adds XML elements for each folder and its
associated size.  It also replaces a few characters that don't play well
with others.  Then, the total mailbox size element is added to the end
of the XML packet.

The XML is returned to the CFM page where the XML is parsed.  It is
then, basically, just looped over and displayed.  At the same time, I
also highlight some folders that are generally the ones that hog most of
the mailbox space.

That's pretty much it.  Sorry to be long-winded, but there are quite a
few details that must be just right.  Make sure to change your variables
in both scripts before testing.

I am attaching two files to this message.  If they don't go through, let
me know.

M!ke

-----Original Message-----
From: Ramiro Estrada [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 23, 2005 10:40 PM
To: CF-Talk
Subject: Getting MS Exchange Mailbox Info??

Anyone been able to get mailbox info such as the size from an Exchange
server using a CFSCRIPT or other way?
 
-R


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204260
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to