![]() |
|
|
| Become a Columnist Microsoft Exchange Site Microsoft Support SiteMSDN Exchange Site | ||
|
|
Combined Content filter and Mailbox Crawl Script Download Script This script combines ideas from my previous 2 articles content filter and scanning script and mailbox crawl script. To create a content scanning script for attachment types that can crawl through a entire mailbox store or certain mailboxes and provide reporting on or removal of certain attachment types. How it works For full details on both scripts please see my previous articles – Let take a look at the changes that have been made to both scripts in order to combine them and get them to work as required. The front end of the code is just a conglomeration of the two scripts and deals with setting up the necessary ADO connections and monitor mailbox. Note you need to make changes to the monitor mailbox here. (set it to your own mailbox and change the backoffice storage value to that of your domain) The major change is in the second select statement where additional parameters have been added so only messages that have attachments are selected. strView = "SELECT ""DAV:displayname"",""DAV:href""" The rest of the code basically is the same as the cscan.vbs script and makes a copy of any messages found in the mailbox being scanned to the monitor mailbox. Running this script To execute this script you can use a batch file or just execute it from the command line with the mailbox alias as the parameter eg mcraw1.vbs mailboxalias Extending this script Other modifications that can be made to this script include creating an extended log file detailing what is stored in your mailbox store eg attachment type, size , from-where. You could also add code that deletes certain types of attachments from the information store. For example this script could be handy if the information store had been infected by a virus to help in the removal of infected attachments.
|
Disclaimer: Your use of the information contained in these pages is at your sole risk. All information on these pages is provided "as is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Stephen Bryant or Pro Exchange. OutlookExchange.Com, Stephen Bryant and Pro Exchange shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.
Copyright Stephen Bryant 2008