XFOR: How to Clean MTS-IN/OUT Using Gwclient and Profinst Utilities (192540)



The information in this article applies to:

  • Microsoft Exchange Server 4.0
  • Microsoft Exchange Server 5.0
  • Microsoft Exchange Server 5.5

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

  1. Obtain the two utilities you will need to repair the Internet Mail Service.
  2. Log on to the Exchange Server computer as the Exchange Server administrator (with Permissions Admin Role and rights).
  3. Create a folder on your hard disk for each utility. For these instructions, we have named them Profinst, and Gwclient, respectively.
  4. Copy the utility .zip file into its corresponding folder, and unzip it to this same folder.
  5. At a command prompt, locate the folder that contains the Profinst.exe utility.
  6. 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.
  7. At the command prompt, locate the folder that has the Gwclient utility.
  8. Start the Setup.exe program, and install the utility, and then accept the defaults.
  9. After the Setup process is complete, start the Gwclient utility.
  10. On the File menu, click Logon.
  11. Pick the profile that you just created, the IMC-Profile.
  12. Some folder icons and the name, Internet Mail Service (servername), are displayed.
  13. Double-click the folder to see its subfolders (such as Bad, MTS-IN, MTS-OUT, and so on).
  14. Double-click each folder in turn to see its contents.
  15. 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.
  16. 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.)
  17. Create two subfolders under the Log folder, called In and Out, respectively.
  18. 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.
  19. Delete the files in the Imcdata\In folder (you just moved these) and in the Imcdata\Out folder (you just moved these too).
  20. Delete the Queue.dat file in the Imcdata folder.
  21. Restart the Internet Mail Service.

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.

Modification Type:MinorLast Reviewed:4/28/2005
Keywords:kbprb KB192540