Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2006-09-17

This topic provides an overview of queues in Microsoft Exchange Server 2007 and the queue management tasks that administrators can perform. You can manage queues and messages that are located in the queues by using the Queue Viewer graphical user interface and by using commands in the Exchange Management Shell.

Overview

A queue is a temporary holding location for messages that are waiting to enter the next stage of processing. Each queue represents a logical set of messages that a transport server processes in a specific order.

The Exchange Management Shell and the Exchange Queue Viewer support two types of interaction with queues. You can use these interfaces to view the status and contents of queues and detailed message properties. You can also use these interfaces to perform actions that modify queues or the messages in the queues.

Exchange 2007 uses an Extensible Storage Engine (ESE) database for queue storage. Formerly known as JET, ESE is a method that defines a low-level API to the underlying database structures in Exchange Server. For more information about how to manage the queuing database, see Managing the Queue Database. This topic includes information about how to change the default location of the queuing database.

Exchange 2007 uses Simple Mail Transfer Protocol (SMTP) technology to transport messages to and from the Internet, and between Active Directory directory service sites. SMTP is a member of the TCP/IP suite of protocols that governs the exchange of e-mail between message transfer agents. The Hub Transport server uses Exchange remote procedure call (RPC) to communicate with a Mailbox server for MAPI message delivery.

Messages that come from and go out to the Internet are queued at the computer that has the Edge Transport server role installed. Messages in transport in the Exchange 2007 organization are queued at the computer that has the Hub Transport server role installed.

Types of Queues

The routing of a message determines the type of queue in which a message is stored. The following types of queues are used in Exchange 2007:

  • Submission queue   A persistent queue that is used by the categorizer to gather all messages that have to be resolved, routed, and processed by Transport agents. The categorizer is a component of Exchange transport that processes all inbound messages and determines what to do with the messages based on information about the intended recipients. In Exchange 2007, the Edge Transport server uses the categorizer to route the message to the appropriate destination. The Hub Transport server uses the categorizer to expand distribution lists and to identify alternative recipients and forwarding addresses. After the categorizer retrieves full information about recipients, it uses that information to apply policies, route the message, and perform content conversion.

    All messages that are received by a transport server enter processing in the Submission queue. Messages are submitted through SMTP-receive, the Pickup directory, or the store driver. The categorizer retrieves messages from this queue and, among other things, determines the location of the recipient and the route to that location. After categorization, the message is moved to a delivery queue or to the unreachable queue. Each Exchange 2007 transport server has only one Submission queue. Messages that are in the Submission queue cannot be in other queues at the same time.

  • Mailbox delivery queue   The mailbox delivery queues hold messages that are being delivered to a mailbox server by using encrypted Exchange RPC. Mailbox delivery queues exist on Hub Transport servers only. The mailbox delivery queue holds messages that are being delivered to mailbox recipients whose mailbox data is stored on a Mailbox server that is located in the same site as the Hub Transport server. More than one mailbox delivery queue can exist on a Hub Transport server. The next hop for a mailbox delivery queue is the distinguished name of the mailbox store.

  • Remote delivery queue   Remote delivery queues hold messages that are being delivered to a remote server by using SMTP. Remote delivery queues can exist on both Hub Transport servers and Edge Transport servers, and more than one remote delivery queue can exist on each server. Each remote delivery queue contains messages that are being routed to recipients that have the same delivery destination. On an Edge Transport server, these destinations are external SMTP domains or SMTP connectors. On a Hub Transport server, these destinations are outside the Active Directory site in which the Hub Transport server is located. Remote delivery queues are dynamically created when they are required and are automatically deleted from the server when they no longer hold messages and the configurable expiration time has passed. By default, the queue is deleted three minutes after the last message has left the queue. The next hop for a remote delivery queue is an SMTP domain name, a smart host name or IP address, or an Active Directory site name.

  • Poison message queue   The poison message queue is a special queue that is used to isolate messages that are detected to be potentially harmful to the Exchange 2007 system after a server failure. Messages that contain errors that are potentially fatal to the Exchange Server system are delivered to the poison message queue. This queue is typically empty, and if no poison messages exist, the queue does not appear in the queue viewing interfaces. The poison message queue is always in a ready state. By default, all messages in this queue are suspended. The messages can be deleted if they are considered to be harmful to the system. If the event that caused the message to enter the poison message queue is determined to be unrelated to the message, delivery of the message can be resumed. When delivery is resumed, the message enters the Submission queue.

  • Unreachable queue   Each transport server can have only one Unreachable queue. The Unreachable queue contains messages that cannot be routed to their destinations. Typically, an unreachable destination is caused by configuration changes that have modified the routing path for delivery. Regardless of destination, all messages that have unreachable recipients reside in this queue.

When a message is received by transport, a transport mail item is created and saved to the database. A unique identifier is assigned to the transport mail item when it enters the database. If a message, or transport mail item, is being routed to more than one recipient, the item can have more than one destination. Each destination represents a separate routing solution for the transport mail item, and each routing solution causes a routed mail item to be created.

The routed mail item is a reference to the transport mail item and is the unit of operation for queuing actions. If a transport mail item has more than one routing solution, more than one routed mail item references the same transport mail item. A message that is being sent to recipients in two different domains appears as two distinct messages in the delivery queues, even if only one transport mail item is in the database.

Queue Management

When you experience a mail flow problem or an influx of spam, you can perform intrusive operations that modify the status of queues and messages that are located in queues. You can perform an action on a single object, or you can perform a bulk action on more than one selected object. Use the Queue Viewer graphical user interface and commands in the Exchange Management Shell in Exchange 2007 to retrieve information about messages and delivery queues. After you retrieve this information, you can select the queues and messages that you want to manage.

You use the Queue Viewer or commands in the Exchange Management Shell to create filter criteria to identify the queues and messages that you want to manage. The filter criteria are based on the following attributes:

  • Queue state

  • Queue properties

  • Message state

  • Message properties

For more information about how to filter queues, see Filtering Queues. For more information about how to filter messages, see Filtering Messages.

Queue Management Tasks

You use the Queue Viewer or commands in the Exchange Management Shell to view information about queues and messages. You can also use these tools to perform the following intrusive actions:

  • Suspend queue   This action temporarily prevents delivery of messages that are currently in the queue. The queue continues to accept new messages, but no messages leave the queue. For more information, see How to Suspend Queues.

  • Resume queue   This action reverses the effect of the suspend queue action and enables delivery of queued messages to resume. For more information, see How to Resume Queues.

  • Retry queue   When a connection to the next hop for a queue fails, a retry timer is set. The retry timer schedules subsequent connection tries. The retry queue action overrides the next scheduled connection attempt and tries to connect to the next hop immediately. If no connection is made, the next retry time is reset. For more information, see How to Retry Queues.

    You can also use the Retry-Queue cmdlet together with the Resubmit parameter to cause the messages in the queue to be resubmitted to the Submission queue and to go back through the categorization process. You can manually resubmit messages that have the following status:

    • Mailbox delivery queues or remote delivery queues that have the status of Retry. The messages in the queues must not be in the Suspended state.

    • Messages in the Unreachable queue that are not in the Suspended state.

    • Messages in the poison message queue.

    For more information, see How to Resubmit Messages in Queues.

  • Suspend message   This action temporarily prevents delivery of a message. You can use the suspend message action to prevent delivery of a message to all the recipients in a specific queue or to all recipients in all queues. For more information, see How to Suspend Messages.

  • Resume message   This action reverses the effect of the suspend message action and enables delivery of queued messages to resume. You can use the resume message action to resume delivery of a message to all the recipients in a specific queue or to all recipients in all queues. You can also use this action to resubmit messages in the poison message queue. For more information, see How to Resume Messages.

  • Remove message   This action permanently prevents delivery of a message. You can use the remove message action to prevent delivery of a message to any recipients in a specified queue or to all recipients in all queues. You can also configure the remove message action to send a non-delivery report (NDR) to the sender when the message is removed. For more information, see How to Remove Messages from Queues.

  • Export message   This action copies a message to the file path that you specify. The messages are not deleted from the queue, but a copy of the message is saved to a file location. This enables administrators or officials in an organization to later examine the messages. Before you export a message, you must suspend the message in the queue so that typical delivery does not continue during the export process. The export format is compatible with e-mail applications such as Microsoft Office Outlook. Save the message in .eml format to make sure that the operating system associates the file with an e-mail application. For more information, see How to Export Messages from Queues.

For More Information