Script to Remove Attachments in Exchange Mailbox

KDawg44 KDawg44 at gmail.com
Thu Oct 11 09:44:25 EDT 2007


Hi,

I am frustrated with my users who send large files around the office
instead of using the network shares.

For instance, this is one of many emails I have sent around:

"If you take the this kit it looks like J sent it to D, D sent it to
you, then you sent it to me.  The problem with that is just that now
there are copies of this file:


On J's drive or Comm drive
J's sent items
D's inbox
D's sent items
Your inbox
Your sent items
My inbox
The comm. Drive once I save it there to be used.

Which means that there are 8 copies of the same file 4MB taking up
space, or a 4MB file turned into a 32MB file."

My users just aren't getting it!  And then they complain when they get
quota messages!  (and some people, when they are Important People, you
cannot argue with).

So, what I would like, is to write a script that parses the exchange
mailbox, and removes all attachments over a certain size (say 500K)
that are attached to messages that are more than 2 weeks old, or that
are in sent items.  I would like to write to a log file all the
changes that are made then email that log file to the mailbox that was
just trimmed.

I will also like to have a verbose mode that allows the user when the
script is run to ok each removal.

I am trying to decide if I should do this in Python or VBScript.  Any
suggestions?

Thanks.




More information about the Python-list mailing list