This article will examine mail queues in Exchange 2007. We will start with a number of specific differences between the Exchange 2003 and Exchange 2007 architectures and discuss the Exchange 2007 event using a row database. wait. It will then be a new look at the Queue Viewer queue viewer in Exchange 2007 and what it can actually do. Finally, there will be a queue viewer built on PowerShell with some other useful ways.

Message Queue - Introduction

Exchange always integrates in it a mail viewer, even from early versions like Exchange 5.x, maybe even 4.x. However, this feature is always changed through each version to be more suitable for administrators, as in the case of switching from Exchange 2003 to Exchange 2007. In Exchange 2007, the way the queue works changes. basically. The method in which each SMTP virtual server has a separate queue directory on an NTFS partition in Exchange 2003 is transferred to the standard Extensible Storage Engine (ESE) database to accommodate queue information in Exchange 2007. Part. The above of the user interface (UI) completely changed. The UI in Exchange 2007 is based on the new Microsoft Management Console (MMC) v3 snap-in. To know the difference between the two interfaces, you can see the illustration below.

Message queues in Exchange 2007 Picture 1
Figure 1 : Area of ​​Exchange 2003 Queue queues

In Exchange 2003, the user interface is easier to use. One downside is that Exchange 2003 can only monitor one server's queue at a time.

Message queues in Exchange 2007 Picture 2
Figure 2 : Viewing queues in Exchange 2003

In Figure 2, you can easily see the queue type and its status. In the example you can see that there are a number of mails waiting to be sent, most likely as 'non-distribution reports' (NDR) from spam.

With Exchange 2007, the queue is viewed in a new tool called 'Queue Viewer' that you can find next to other utilities in the new Toolbox area, as shown in Figure 3.

Message queues in Exchange 2007 Picture 3
Figure 3 : New Toolbox area in Exchange 2007

When you open Queue Viewer, you can see that it was built on an MMC snap-in v3 as shown in Figure 4:

Message queues in Exchange 2007 Picture 4
Figure 4 : User interface of Queue Viewer

The biggest benefit of this interface is that you can create your own MMCs, using the standalone viewer to monitor multiple Exchange 2007 servers at the same time:

Message queues in Exchange 2007 Picture 5
Figure 5 : Add an MMC snap-in to Queue Viewer

Looking at the changes in the user interface, it is probably time to move on to the queue theory base in Exchange 2007. However, before you are interested in this, you need to pay attention to some. Other important information. Not all Exchange 2007 servers have queues! This is a big difference with Exchange 2003, because in Exchange 2003 all servers in the mail transport process have an SMTP queue. In Exchange 2007 only Hub Transport and Edge Transport servers are available.

Queue theory

So where is the database included? As mentioned in the above summary, all queue operations now appear in a new ESE database. The main database file is called mail.que and by default you can find it at:
C: Program FilesMicrosoftExchange ServerTransportRolesdataQueue

Message queues in Exchange 2007 Picture 6
Figure 6 : Directory containing the queue database file

Other files are in the areas described below:

  1. Trn.chk - File check points.
  2. Trn.log - Current transaction log file.
  3. Trntmp.log - The next backup transaction log file, created advanced.
  4. Trnnnn.log - Other transaction log files created when the Trn.log value reaches the maximum size.
  5. Trnres00001.jrs - Reserve log file.
  6. Trnres00002.jrs - Second reserve log file.
  7. Temp.edb - Temp Database (Temp Database) is used to verify database schema at startup.

You may wonder what role the log files in this case play. In fact, they are configured to write circles with transaction log files that will be deleted after being launched.

Before moving on to another concept, we should talk a bit about converting queue databases. An important reason for doing this is enforcement. The other less well-known reason is the disk storage queue (Queue DB) and the log files must contain from 4GB of free space. Otherwise the server will re-apply the compression state and start the mail flow slowly.

When converting databases, the usual rule is to break down transaction logs and DB files. You must edit the EdgeTransport.exe.config file, which is set by default in the area below and then close, restart the msexchangetransport service.
C: Program FilesMicrosoftExchange ServerBinEdgeTransport.exe.config

The most interesting issue when editing the config file is the parent folder with the correct privileges to be set up as below. That is the type of directory to be created:

  1. Network Service: Full Control (Network service: full control).
  2. System: Full Control.
  3. Administrators: Full Control (Administrator).

The relevant lines are shown below. To move the database, you should edit the line containing 'QueueDatabasePath' and to move the log files, you should edit the line containing 'QueueDatabaseLoggingPath'. You can see as shown in Figure 7, move the database and log files to H:

Message queues in Exchange 2007 Picture 7
Figure 7 : Editing the EdgeTransport.exe.config file

Looking at the database now, you can understand what it contains. There are several different types of queues:

Submission queue: is used by a classifier to collect all messages that must be processed, find the way or processed by the transport agent.

Poison Message queue: The malicious mail queue is a special kind of queue, which is used to isolate messages identified as potentially harmful to the Exchange 2007 system after a server error.

Remote delivery queue ( Remote Delivery ): Remote distribution queues hold distributed messages to a remote server using SMTP.

• Queue distribution mailbox ( Mailbox Delivery ): The distribution queue of the mailbox holds messages distributed to the mailbox server through encrypted RPC Exchange.

Unreachable Destination : Each transport server can only have one Unreachable queue. Unreachable queues contain messages that cannot find their way to their destination.

Use the queue

Now you can see, the MMC v3 snap-in is used for queue viewers with a very simple user interface. By default, the viewer opens and displays queues for the transport server you are logged into. To connect to another server, use the Connect to Server option in the right pane:

Message queues in Exchange 2007 Picture 8
Figure 8 : Displaying Connect to Server

The main queue viewer window opens with two vertical frames on the top, which by default displays all queues and all messages. When you open a queue by double-clicking on it, another frame appears, showing only messages in that queue:

Message queues in Exchange 2007 Picture 9
Figure 9 : Frames displayed in Queue Viewer

To manage the queue, all you have to do is mark the object you want to work with and see the activity pane on the right side of the window as shown in Figure 9.

An important new point in the Exchange 2007 queue viewer is the mail filtering function. It will be very useful in many cases like when you are attacked by spam. As an administrator, you can use the "Bulk Action" component, apply an activity to all messages with the same parameters described in the filter to remove spam, yes or no. have NDR.

Message queues in Exchange 2007 Picture 10
Figure 10 : The user interface of the filter in the message frame

Message queues in Exchange 2007 Picture 11
Figure 11 : Some other filtering options

Some other functions you can perform in the queue viewer:

Suspend queue ( Suspend queue ): Temporarily prevents the distribution of mail currently in the queue.

Resume queue : When a connection to the next hop for the queue fails, a reconnected timer is set. The connection will be redone immediately as soon as possible.

Suspend message : Temporarily prevents a single mail delivery.

Resume message : Opposition to suspension letter.

Remove message ( Remove message ): Prevent long-term delivery of a message.

Export message : Copy a message to the file path you describe. Messages are not deleted from the queue, but a copy of them is recorded in the file area. Before exporting a message, you must suspend the message in the queue.

Queues and PowerShell

Although the entire Exchange Management Console is based on PowerShell, there is one really more striking point is the error message. I encountered this when I opened the queue viewer and stopped the msexchangetransport service. You can see in Figure 12 the PowerShell command errors on the output part of the Queue Viewer interface.

Message queues in Exchange 2007 Picture 12
Figure 12 : PowerShell command error

Thus, PowerShell can be used to manipulate queues. Tested, I used the PowerShell command below to display all commands with Queue named:

get-command * queue *

Message queues in Exchange 2007 Picture 13
Figure 13 : get-command * queue *

Then, try the same command again with commands related to 'message':

Message queues in Exchange 2007 Picture 14
Figure 14: get-command * message *

Armed with a basic knowledge of possible commands, I started running a simple get-queue command.

Message queues in Exchange 2007 Picture 15
Figure 15: get-queue

Then, switch to the queue that contains less than 100 messages. In this example, three queues are displayed with 0 messages. All queue types (except submissions) are removed quickly after the messages inside them are delivered. The submission queue is persistent so it is always displayed, waiting for the mail to arrive to classify.

Message queues in Exchange 2007 Picture 16
Figure 16: get-queue with a filter

As you can see, simplicity in PowerShell commands makes manipulating queues through scripts much easier than using VBScript. The examples above are very simple, but they can be applied to much more complicated cases. For example, you can run the following command to remove messages from the queue from an unwanted company with a SCL rate higher than 5:

Remove-Message -Filter {FromAddress -like "* spammer.com *" -and SCL -gt 5} -withNDR $ false

Conclude

Hopefully this article will give you a better insight into how new mail queues work in Exchange 2007. For more information on internal operations, you should consult the Exchange 2007 help file. You can download it here.

3.6 ★ | 27 Vote | 👨 16325 Views

Above is an article about: "Message queues in Exchange 2007". Hope this article is useful to you. Don't forget to rate the article, like and share this article with your friends and relatives. Good luck!

« PREV POST
NEXT POST »