Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Thu, 31 Jan 2008 16:44:30 -0400,    group: microsoft.public.exchange.development        back       


Exchange 2007 eventing   
This was posted in microsoft.public.windows.powershell:

Subject: "Change MessageClass on Incoming e-mails in a Shared Mailbox"

Text:"We have a shared mailbox that recives normal IPM.Note mail - We 
would like to change that. We are running Exchange 2007 SP1.
Understand that PowerShell is the way to go for this - Where can I find
examples on how to build and install this kind of scripts."

I tried doing some digging, and am curious...  Are there any online 
references to Exchange 2007 "eventing"?

This is likely an API, but I can't seem to come up with any search 
results...

Marco
date: Thu, 31 Jan 2008 16:44:30 -0400   author:   Marco Shaw [MVP]

Re: Exchange 2007 eventing   
Powershell wont really help with this one you'll need to use one of the 
Exchange API's to do this there are a few options

1. You could write a Transport Agent and change the message while its in the 
transport Pipeline the message class is a bit of a special property but you 
can change it using the TNEF writer see 
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1381211&SiteID=17 . 
Using the TNEF writer isn't the easiest thing in the world but this is the 
method that i would recommend using.

2. You could write a Notification application using Exchange Web Services 
basically you subscribe to the new mail notifications in the Folder and then 
your application connects back to the Mailbox and can change the item in 
question. The problem you have here is that notifications are Asynchronous 
so you will receive the notification after the mail has arrived. Your 
notification app is just another client in this instance so there's no 
guarantee that it will get to the message first before any of the other 
clients you have connecting to the mailbox.

3. You could write a Exoledb Event Sink. Exchange Store Events sinks have 
been deemphasised in 2007 (so probably wont be their in the next version) 
but they are still fully functional. eg you can create a onsyncsave event 
sink and register it on the inbox of the mailbox in question and it can be 
used to change the message class.

All the information you need is in the Exchange SDK which you can grab from 
http://msdn.microsoft.com/exchange

Cheers
Glen



"Marco Shaw [MVP]"  wrote in message 
news:uMRSVoEZIHA.5612@TK2MSFTNGP06.phx.gbl...
> This was posted in microsoft.public.windows.powershell:
>
> Subject: "Change MessageClass on Incoming e-mails in a Shared Mailbox"
>
> Text:"We have a shared mailbox that recives normal IPM.Note mail - We 
> would like to change that. We are running Exchange 2007 SP1.
> Understand that PowerShell is the way to go for this - Where can I find
> examples on how to build and install this kind of scripts."
>
> I tried doing some digging, and am curious...  Are there any online 
> references to Exchange 2007 "eventing"?
>
> This is likely an API, but I can't seem to come up with any search 
> results...
>
> Marco
date: Fri, 1 Feb 2008 15:12:19 +1100   author:   Glen Scales [MVP]

Re: Exchange 2007 eventing   
Glen Scales [MVP] wrote:
> Powershell wont really help with this one you'll need to use one of the 
> Exchange API's to do this there are a few options

Thanks for the detailed reponse.  However I did notice a PowerShell 
cmdlet that *might* help.

I'm not familiar enough with Exchange...  The cmdlet 
new-managedcontentsettings has a messageclass parameter:

"-MessageClass <String>
     The MessageClass parameter specifies the message type to which any 
expi ration and journaling configuration settings within these content 
settings apply.
     The parameter value can be a well-known message type such as 
Calendar I tems or a specific message class such as IPM.NOTE.SMIME. 
Well-known message types are as follows:
     * All Mailbox Content
     * Calendar Items
     * Contacts
     * Documents
     * Faxes
     * Journal items
     * Meeting Requests, Responses, and Cancellations
     * Notes
     * Posts
     * RSS Items
     * Tasks
     * Voicemail
     Specific settings supersede general settings. For example, Voice 
Mail supersedes All Mailbox Content."

I wasn't able to figure out exactly how to use it.  Primarily, how to 
have it reference a public folder.

I'll keep searching in my spare time...

Marco
date: Fri, 01 Feb 2008 16:12:46 -0400   author:   Marco Shaw [MVP]

Re: Exchange 2007 eventing   
No that wont help this just controls journaling and expiration on Managed 
folders this wont affect the actually content. At the end of the day you 
have mail coming into an inbox there is no configuration you can change that 
will change the message class. You have the force the change via one of the 
Exchange API's or just have the source that sends the mail set it in the 
first place.

 One last option I've just thought of and probably the easiest to implement 
because it doesn't require you to code anything and its something you could 
use from a script is to use a Server side rule on the inbox in question. 
There is an option with rules to set a Mapi property you can do this with 
the rule.dll and cdo 1.2 in VBS (it wont work in powershell because of the 
way CDO 1.2 threads) or you could use RDO from Redemption which will work 
fine from Powershell. Its look like Dmitry has already got a sample there to 
do what you want have a look at 
http://www.dimastr.com/redemption/rdo/rdorule.htm (this sample in the tag 
property)

Cheers
Glen



"Marco Shaw [MVP]"  wrote in message 
news:OkSLQ7QZIHA.4332@TK2MSFTNGP04.phx.gbl...
> Glen Scales [MVP] wrote:
>> Powershell wont really help with this one you'll need to use one of the 
>> Exchange API's to do this there are a few options
>
> Thanks for the detailed reponse.  However I did notice a PowerShell cmdlet 
> that *might* help.
>
> I'm not familiar enough with Exchange...  The cmdlet 
> new-managedcontentsettings has a messageclass parameter:
>
> "-MessageClass <String>
>     The MessageClass parameter specifies the message type to which any 
> expi ration and journaling configuration settings within these content 
> settings apply.
>     The parameter value can be a well-known message type such as Calendar 
> I tems or a specific message class such as IPM.NOTE.SMIME. Well-known 
> message types are as follows:
>     * All Mailbox Content
>     * Calendar Items
>     * Contacts
>     * Documents
>     * Faxes
>     * Journal items
>     * Meeting Requests, Responses, and Cancellations
>     * Notes
>     * Posts
>     * RSS Items
>     * Tasks
>     * Voicemail
>     Specific settings supersede general settings. For example, Voice Mail 
> supersedes All Mailbox Content."
>
> I wasn't able to figure out exactly how to use it.  Primarily, how to have 
> it reference a public folder.
>
> I'll keep searching in my spare time...
>
> Marco
date: Sat, 2 Feb 2008 10:32:07 +1100   author:   Glen Scales [MVP]

Re: Exchange 2007 eventing   
> There is an option with rules to set a Mapi property you can do this with 
> the rule.dll and cdo 1.2 in VBS (it wont work in powershell because of the 
> way CDO 1.2 threads) or you could use RDO from Redemption which will work 

Any references to this "CDO 1.2 threading issue"?  It have to do with 
the ApartmentState?

Marco
date: Fri, 01 Feb 2008 22:27:50 -0400   author:   Marco Shaw [MVP]

Re: Exchange 2007 eventing   
I dont remember the full details but just try using it and you'll find out, 
CDO 1.2 has never been supported in .NET 
http://support.microsoft.com/kb/813349 if you want to use CDO its a much 
better idea to use VBS. Your basically only using the script to create the 
rules anyway.

Cheers
Glen
"Marco Shaw [MVP]"  wrote in message 
news:OYjJ2MUZIHA.4172@TK2MSFTNGP02.phx.gbl...
>
>> There is an option with rules to set a Mapi property you can do this with 
>> the rule.dll and cdo 1.2 in VBS (it wont work in powershell because of 
>> the way CDO 1.2 threads) or you could use RDO from Redemption which will 
>> work
>
> Any references to this "CDO 1.2 threading issue"?  It have to do with the 
> ApartmentState?
>
> Marco
date: Sun, 3 Feb 2008 21:02:35 +1100   author:   Glen Scales [MVP]

Re: Exchange 2007 eventing   
See http://ivasoft.com/cmclass2007.shtml

Regards,
Victor Ivanidze

"Marco Shaw [MVP]"  wrote in message 
news:uMRSVoEZIHA.5612@TK2MSFTNGP06.phx.gbl...
> This was posted in microsoft.public.windows.powershell:
>
> Subject: "Change MessageClass on Incoming e-mails in a Shared Mailbox"
>
> Text:"We have a shared mailbox that recives normal IPM.Note mail - We 
> would like to change that. We are running Exchange 2007 SP1.
> Understand that PowerShell is the way to go for this - Where can I find
> examples on how to build and install this kind of scripts."
>
> I tried doing some digging, and am curious...  Are there any online 
> references to Exchange 2007 "eventing"?
>
> This is likely an API, but I can't seem to come up with any search 
> results...
>
> Marco
date: Tue, 22 Apr 2008 13:47:31 +0400   author:   Victor Ivanidze se

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us