The SMTP virtual server intermittently crashes after you register a low priority event sink in Exchange 2000 Server (836549)



The information in this article applies to:

  • Microsoft Exchange 2000 Server

SYMPTOMS

When you register an event sink that implements the ISmtpInCommandSink interface and that handles the server responses and the message content that follows, the SMTP virtual server may intermittently crash when Microsoft Exchange 2000 Server is under a heavy load.

In this scenario, your event sink is configured to handle the following server responses and message content:
  • Server responses:

    ISmtpInCommandContext::QueryResponse
    ISmtpInCommandContext::QueryNativeResponse

  • Message content:

    IMailMsgProperties::ReadContent
    IMailMsgProperties::WriteContent

When you troubleshoot this issue, an access violation occurs when you use the IMailMsgProperties interface. In this scenario, this access violation typically occurs when you use the WriteContent method.

CAUSE

This issue may occur if the event sink is registered at the end of data ( _EOD) SMTP command with a priority that is lower than the default priority. For example, this issue may occur if you register the event sink at a priority of 30,000. If you register the event sink at a priority that is higher than the default priority, this issue does not occur.

WORKAROUND

To work around this issue, raise the priority of the event sink to a level that is higher than the priority of the EOD handler. The EOD handler is the last step of the message transport flow. After the EOD handler event, the message is queued for delivery and no longer exists in the SMTP system. If you assign a priority to the event sink that is lower than the EOD handler, messages might be removed before that event sink completes its operations. In this scenario, if the message is delivered or handled before the event sink completes its operations, the event sink will be accessing a delete mailmsg object. To make sure that your event sink fires before the message is submitted to queueing, you must assign the event sink a higher priority than the default priority.

Modification Type:MajorLast Reviewed:3/11/2004
Keywords:kbprb KB836549 kbAudDeveloper kbAudITPRO