Platform SDK: Exchange Server |
Messages entering the gateway are transferred from the Microsoft Exchange Server to the gateway’s MTS-OUT folder in the server’s information store. The server limits the maximum number of unread messages in all the gateway’s MTS-OUT folders in the following way:
The information store transfers messages from an message transfer queue in the MTA to the information store for a gateway only when that gateway is logged on. To prevent messages from being stranded in the receive folder of an unresponsive gateway, a timer event is associated with each message that is transferred from the MTA to the information store. If this timer event is triggered, the information store returns a nondelivery report to the originator with the reason-code set to MAPI_REASON_TRANSFER_IMPOSSIBLE and the diagnostic-code set to MAPI_DIAG_MAXIMUM_TIME_EXPIRED. It then removes the message from the folder.
A gateway cancels the timer event on a message by invoking the IMessage::SetReadFlag function on the message object. It does this by moving the message out of the receive folder or by copying the message. Before the timer is canceled, the message can be deleted by the information store at any time to invalidate the message object.
The information store uses the Time-Out-Period field in the gateway object to set the timer on each message transferred from the message transfer queue to the information store. When a nondelivery report is generated by a time-out, these properties are not returned:
A gateway may not add additional attachments to an MTE until after the timer has been canceled. This enables the information store to identify the original message content if a nondelivery report needs to be generated because of message time-out.