Microsoft KB Archive/192540

= XFOR: How to Clean MTS-IN/OUT Using Gwclient and Profinst Utilities =

Article ID: 192540

Article Last Modified on 10/28/2006

-

APPLIES TO


 * Microsoft Exchange Server 4.0 Standard Edition
 * Microsoft Exchange Server 5.0 Standard Edition
 * Microsoft Exchange Server 5.5 Standard Edition

-



This article was previously published under Q192540



SYMPTOMS
When you start the Microsoft Exchange Internet Mail Service, the Exchange Internet Mail Service may stop responding, and you may receive the following error messages:

Event ID: 4018

Type: Error

Source: MSExchangeIMC

Description: Unable to start the Internet Mail Connector service because MAPI could not be initialized.

Event ID: 4116

Type: Error

Source: MSExchangeIMC

Description: An error was returned from the messaging software the Internet Mail Service uses to process messages on the Microsoft Exchange Server. It is possible that the piece of mail being processed at the time will not be delivered. The message that was being processed has been moved to the "BAD" folder.

You may also receive event IDs 4018 and 4116 in the Application Event Log.

This behavior is usually the cause of bad messages that you need to remove, in the Internet Mail Service folders that reside in the information store, Priv.edb. Also, a copy of the bad message may still be on the hard drive in the C:\Exchsrvr\Imcdata\In folder. The bad message is ready to be processed again when the service is started.



CAUSE
This behavior can occur because occasionally bad messages need to be removed from the Internet Mail Service folders that are located in the information store.



RESOLUTION
Contact Microsoft Product Support for instructions and the utilities to repair the Internet Mail Service.

Use the Gwclient utility to access the Internet Mail Service mailbox, and the Profinst utility to create a Logon profile to the Internet Mail Service mailbox.

Setup and Implementation Instructions
 Obtain the two utilities you will need to repair the Internet Mail Service. Log on to the Exchange Server computer as the Exchange Server administrator (with Permissions Admin Role and rights). Create a folder on your hard disk for each utility. For these instructions, we have named them Profinst, and Gwclient, respectively. Copy the utility .zip file into its corresponding folder, and unzip it to this same folder. At a command prompt, locate the folder that contains the Profinst.exe utility. At a command prompt, type the following:

Profinst /service=MSExchangeIMC /Name=IMC-Profile /Type=Gateway

This creates a profile for you to log on to the Exchange Server Internet Mail Service mailbox.</li> At the command prompt, locate the folder that has the Gwclient utility.</li> Start the Setup.exe program, and install the utility, and then accept the defaults.</li> After the Setup process is complete, start the Gwclient utility.</li> On the File menu, click Logon.</li> Pick the profile that you just created, the IMC-Profile.</li> Some folder icons and the name, Internet Mail Service (servername), are displayed.</li> Double-click the folder to see its subfolders (such as Bad, MTS-IN, MTS-OUT, and so on).</li> Double-click each folder in turn to see its contents.</li> Use the Gwclient utility to move any messages that are in these folders to a .pst file for later inspection. Moving the messages purges any bad messages that have interrupted the Internet Mail Service from starting. These messages can be moved back at another time if you want to replay the message (by using the Gwclient).

IMPORTANT: Do not move messages into the root folder of a .pst file; if you do, they are lost and cannot be recovered.

You must create a sub-folder in the .pst file and move the messages to that sub-folder. At this point, make sure that all of the bad messages that interrupted the Internet Mail Service from starting are purged.</li> Open Explorer, and select the Imcdata folder, generally located in the C:\Exchsrvr\Imcdata folder. (If you have run the Exchange Optimizer, the folder may be located in the same path on another hard drive.)</li> Create two subfolders under the Log folder, called In and Out, respectively.</li> Copy any files that are in the Imcdata\In folder to the Imcdata\Log\In folder. And copy any files that are in the Imcdata\Out folder to the Imcdata\Log\Out folder.</li> Delete the files in the Imcdata\In folder (you just moved these) and in the Imcdata\Out folder (you just moved these too).</li> Delete the Queue.dat file in the Imcdata folder.</li> Restart the Internet Mail Service.</li></ol>

<div class="moreinformation_section">

MORE INFORMATION
The messages that you saved from the In and Out folders can be replayed, but one of them may be a bad message. To replay them, stop the Internet Mail Service, move them a few at a time to the Imcdata\In (or Out) folder, delete the Queue.dat file, and then start the service. The messages are processed normally unless one of the messages is bad. If one of the messages is bad, it stops the service, and you must repeat this process.

Keywords: kbprb KB192540

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.