Troubleshooting Exchange Server with MFCMapi.exe

There are several scenarios in which you may have to use the Mfcmapi.exe utility to view and work with messages in the SMTP TempTables in Exchange Server . These scenarios include the following:

  • Messages that are stuck in the TempTable block some or all SMTP traffic.
  • Messages are delivered multiple times. This scenario may occur when the information store is restarted or when the computer is restarted.
  • No users can browse the Internet after the SMTP service is started. This scenario may occur when a large outgoing message that is sent to several recipients becomes stuck in the SMTP queue.
  • You see slow mail flow in Exchange. Messages that are awaiting directory lookup seem to be backing up. No information is logged in the Application event log about any problem with the SMTP transport.
  • The administrator receives unusual non-delivery reports (NDRs). For example, the administrator receives an NDR that is similar to the following:

    From: System Administrator
    To: User Subject:?
    Undeliverable: Your message did not reach some or all of the intended recipients. The following recipient(s) could not be reached: user@domain.com on 6/26/2001 12:00 PM The e-mail system was unable to deliver the message, but did not report a specific reason. Check the address and try again. If it still fails, contact your system administrator. <servername.domain.com # 5.0.0>

    If you increase diagnostics logging for MSExchangeTransport in Exchange System Manager, the following event may be logged in the Application event log:

    Event 4004
    Source MsExchangeTransport
    Categorization Failed. The error message is “.

    Note The option to increase diagnostic logging for MSExchangeTransport appears in the properties of the Servernameobject in Exchange System Manager.
    If you use the Regtrace utility to capture a trace of procedure calls, the following error may be captured:

    EcGetProps failed with not found error for smtptemptbldata3

  • Mail cannot be received or sent, and Event 7011 is recorded in the System log for each Microsoft Internet Information Services (IIS) service. These services include RESvc, NntpSvc, IMAP4Svc, IISADMIN, W3SVC, and SMTPSVC.

    Event Type: Error
    Event Source: Service Control Manager
    Event Category: None
    Event ID: 7011
    Description: Timeout (30000 milliseconds) waiting for a transaction response from the …(Name of the IIS Service)

To use the Mfcmapi.exe utility to view and work with messages in the SMTP TempTables in Exchange Server , use one of the following methods.
. Note There is one TempTable for each SMTP virtual server. For example, TempTable#1 corresponds to SMTP virtual server 1, and TempTable#2 corresponds to SMTP virtual server 2. In the following methods, change the TempTables according to the Exchange Server configuration.
When you delete an SMTP virtual server, the TempTable that is associated with the SMTP virtual server is not deleted. Additionally, the contents of the associated TempTable are not deleted. If you add and then remove an SMTP virtual server, you must manually delete the TempTable that is associated with the SMTP virtual server.
Warning If you use the Mfcmapi.exe utility incorrectly, serious problems may occur that may require that you reinstall Microsoft Exchange Server. Serious problems may also occur that require that you restore Microsoft Exchange Server. Microsoft cannot guarantee that problems that result from using the Mfcmapi.exe utility incorrectly can be resolved. Use the Mfcmapi.exe utility at your own risk.

Method 1: Use the Mfcmapi.exe utility to clear the SMTP TempTables in Exchange  Server

Warning If you delete the SMTP TempTables, all incoming and outgoing messages are cleared from the TempTables at the same time.
Note For information about how to try to recover a message, see Method 2.

  1. Stop the SMTP service, and then double-click Mfcmapi.exe.
  2. Click OK to close the About Mfcmapi dialog box.
  3. Click Session, and then click Logon and Display Stores.
  4. Log on by using an Administrator account. If the MAPI profile is unavailable, create one.
  5. Click MDB, and then click Get Mailbox Table.
  6. Confirm the server name, and then click OK.
  7. Double-click the object SMTP (ServernameGUID) mailbox.
    Note In this step, Servername represents the name of the Exchange Server. GUID represents the GUID.
  8. Expand Root Container, and then click TempTable#n.
    Note n represents the number that corresponds to the TempTable.
  9. Right-click the TempTable#n object, and then click Delete Folder.
  10. Click to select the Hard Deletion check box, and then click OK.
  11. Confirm that the TempTable folder has been deleted. To do this, follow these steps:
    1. On the Hierarchy Table menu, click Refresh View.
    2. Expand Root Container. Verify that the TempTable#n folder does not appear.
  12. Quit the Mfcmapi.exe utility.
  13. Start the SMTP service. When you start this service, a new TempTable is created.
Method 2: Use the Mfcmapi.exe utility to delete individual stuck or corrupted messages in Exchange Server
  1. Stop the SMTP Service.
  2. Double-click Mfcmapi.exe.
  3. Click OK to close the About Mfcmapi dialog box.
  4. Click Session, and then click Logon and Display Stores.
  5. Log on by using an Administrator account. If the MAPI profile is unavailable, create one.
  6. Click MDB, and then click Get Mailbox Table.
  7. Confirm the server name, and then click OK.
  8. Double-click the object SMTP (ServernameGUID) mailbox.
    Note In this step, Servername represents the name of the Exchange Server. GUID represents the GUID.
  9. Expand Root Container, and then expand the TempTable#n folder.
  10. Right-click each subfolder that is labeled #0 through #19, and then select Open Contents Table to examine stuck or corrupted messages. To irretrievably delete messages, follow these steps:
    1. Right-click the message, and then click Delete Message.
    2. Click Permanent delete passing DELETE_HARD_DELETE (unrecoverable), and then click OK.

    You can delete multiple messages at the same time. To do this, press the CTRL key or the SHIFT key, click individual messages or a range of messages, and then follow steps a and b.

Note Each TempTable contains 20 subfolder that are labeled #0 through #19. All message content is located in the subfolders. You can inspect and manipulate messages on a subfolder basis.

Method 3: Use the Mfcmapi.exe utility to save messages so that you can examine them later
  1. Stop the SMTP Service.
  2. Double-click Mfcmapi.exe.
  3. Click OK to close the About Mfcmapi dialog box.
  4. Click Session, and then click Logon and Display Stores.
  5. Log on by using an Administrator account. If the MAPI profile is unavailable, create one.
  6. Click MDB, and then click Get Mailbox Table.
  7. Confirm the server name, and then click OK.
  8. Double-click the SMTP (ServernameGUID) mailbox.
    Note In this step, Servername represents the name of the Exchange Server. GUID represents the GUID.
  9. Expand Root Container.
  10. Right-click the MTS-OUT subfolder, click Create Subfolder, and then name the new folder “Recovery.”
  11. Expand TempTable#n.
  12. Select subfolders #0 through #19.
  13. Right-click the range of folders that you selected, and then click Copy.
  14. Right-click the Recovery folder, and then click Paste.
  15. Click to select the Paste folder contents only check box, and then click OK.
  16. Click to select the Move Messages check box, and then click OK.
  17. Confirm that the table from which you moved folders is empty. Examine the PR_CONTENT_COUNT row and the PR_CONTENT_UNREAD row.
  18. Repeat steps 12 through 15 for all the folders that appear under the appropriate TempTable.
  19. Right-click the TempTable in which you have been working, and then click Delete Folder.
  20. In the Delete Selected Folder dialog box, click to select the Hard Deletion check box, and then click OK.
  21. Confirm that the TempTable folder has been deleted. To do this, follow these steps:
    1. On the Hierarchy Table menu, click Refresh View.
    2. Expand Root Container. Verify that the TempTable folder does not appear.
  22. Restart the SMTP service. This rebuilds the TempTable object.
  23. Follow steps 12 through 15 to move the message from the Recovery folder to the subfolder under the appropriate TempTable folder.

Note For Exchange Server, you must grant the administrator’s mailbox Send As and Receive As rights on the mailbox store. Otherwise, you cannot access the SMTP mailbox from the administrator’s mailbox profile.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s