Help and Support
 

powered byLive Search

You cannot modify MAPI messages that are trapped in an SMTP transport event sink

Article ID:273233
Last Review:October 25, 2007
Revision:6.3
This article was previously published under Q273233

SYMPTOMS

You cannot modify MAPI messages that are trapped in a Simple Mail Transfer Protocol (SMTP) transport event sink, such as one that implements the ISMTPOnArrival::OnArrival method. Any modifications made to these messages seem to be successful, and show up in the scope of the event sink, but do not persist to the actual message. Additionally, some properties, such as attachments and the message's body, may not be available.

Back to the top

CAUSE

SMTP transport event sinks for Exchange 2003 or Exchange 2000 can be used to trap all outgoing e-mail messages as they are handled by the SMTP transport layer. The cause of this problem is that Exchange converts MAPI messages to a temporary SMTP version for the event sink to handle, and then discards this temporary version after the event sink code finishes executing.

Back to the top

RESOLUTION

The key to the problem is how the message arrives at the Exchange server. A MAPI message can arrive at the Exchange server in the following ways:
A message is sent using a MAPI client, such as Outlook, from a mailbox on that server.
A message comes in through an Exchange Development Kit (EDK) gateway.
A message is routed from Exchange 5.5 in a mixed environment.
To resolve this problem, force all incoming messages to be in SMTP format. Force outbound messages through a border Exchange server or smart host by using an SMTP connector. Place the event sink on the border Exchange server or smart host. Because Exchange 2003 and Exchange 2000 servers communicate with each other through SMTP, all incoming messages to a border server or to a smart host should be in SMTP format. Therefore, the event sink should work as expected. Force the inbound messages to go through the border Exchange server or smart host where the event sink is installed. Inbound messages are received in SMTP format. For more information about how to do this, click the following article numbers to view the articles in the Microsoft Knowledge Base:
317680 (http://support.microsoft.com/kb/317680/) How to add a disclaimer to outgoing SMTP messages in Visual Basic Script
For more information about how to force outbound messages through a border Exchange server or through a smart host, click the following article number to view the article in the Microsoft Knowledge Base:
293800 (http://support.microsoft.com/kb/293800/) How to set up Windows 2000 as an SMTP relay server or smart host
For more information about how to configure the SMTP connector, click the following article number to view the article in the Microsoft Knowledge Base:
265293 (http://support.microsoft.com/kb/265293/) How to configure the SMTP connector in Exchange

Back to the top

STATUS

This behavior is by design.

Back to the top

MORE INFORMATION

Though this limitation is inherent to Exchange 2003 and Exchange 2000, it can be observed through the Windows SMTP Transport Event Sinks as well:
IMailTransportSubmission::OnTransportSubmission
IMailTransportOnPreCategorize::OnSyncMessagePreCategorize
IMailTransportOnPostCategorize::OnMessagePostCategorize

Back to the top


APPLIES TO
Microsoft Exchange Server 2003 Enterprise Edition
Microsoft Exchange Server 2003 Standard Edition
Microsoft Exchange 2000 Server Standard Edition

Back to the top

Keywords: 
kbmsg kbpending kbprb KB273233

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.