none
Create a folder and move mail + sub-folders in Exchange 2003 email mailbox (not public Folder) RRS feed

  • Question

  • I am looking for a event sink way to go through a Exchange 2003 info store and create a folder in EVERY mailbox, then move ALL email from "Inbox" + any sub-folders within the inbox (sub folders outside the inbox of mailbox do not need to be touched) to this newly created top level mailbox folder. Not taking it out to PST or to Public folder, just want to create a folder top level of mailbox, then go to inbox and move all email including the sub-folders within the "inbox" to this newly created folder.
    Until later .... Brett
    Wednesday, June 8, 2011 2:04 PM

Answers

All replies

  • Hi,

    just to clarify things:

    An Eventsink is a piece of code that gets executed when an item is changed in a folder.

    It seems like you are looking for a solution to iterate through all mailboxes and move existing messages to a subfolder once.

    Which of the above do you want to achieve?

    Kind regards,
    Henning Krause

    "Poomba1" wrote in message news:c002a08f-2f37-4cae-bc51-25a0df566d0d@communitybridge.codeplex.com...

    I am looking for a event sink way to go through a Exchange 2003 info store and create a folder in EVERY mailbox, then move ALL email from "Inbox" + any sub-folders within the inbox (sub folders outside the inbox of mailbox do not need to be touched) to this newly created top level mailbox folder. Not taking it out to PST or to Public folder, just want to create a folder top level of mailbox, then go to inbox and move all email including the sub-folders within the "inbox" to this newly created folder.


    Until later .... Brett

    Tuesday, June 28, 2011 1:14 PM
  •  Yes, the latter to move all mail once, out from inbox into newly created folders a tthe root of the mailbox. It sounds like custom codinfg will be required if we pursue this.
    Until later .... Brett
    Tuesday, June 28, 2011 2:33 PM
  • Hi Brett,

    yes, you'll need quite some coding to accomplish this using Exchange 2003.

    1. Iterate through the mailboxes (http://www.infinitec.de/post/2006/04/13/Iterating-through-all-mailboxes-in-an-Exchange-20002003-organization.aspx).
    2. Enumerate all messages using a WebDAV Search request (http://msdn.microsoft.com/en-us/library/aa143053(v=EXCHG.65).aspx)
    3. Extract the ids of all mails (the DAV:href property)
    4. Create a new folder under the inbox folder using MKCOL (http://msdn.microsoft.com/en-us/library/aa142923(v=EXCHG.65).aspx)
    5. Issue BMOVE commands to move the items to the new folder (http://msdn.microsoft.com/en-us/library/aa142722(v=EXCHG.65).aspx)

    Kind regards,
    Henning

    "Poomba1" wrote in message news:8849c7fc-2528-4782-ac09-59b576d28dc0@communitybridge.codeplex.com...

    Yes, the latter to move all mail once, out from inbox into newly created folders a tthe root of the mailbox. It sounds like custom codinfg will be required if we pursue this.


    Until later .... Brett

    • Marked as answer by Poomba1 Tuesday, June 28, 2011 9:52 PM
    Tuesday, June 28, 2011 9:09 PM
  • Ok, thank you for the detailed follow up.
    Until later .... Brett
    Tuesday, June 28, 2011 9:52 PM