XIMS: IMAP SEARCH Command Not Finding Some Internet Header Information

This article was previously published under Q302965
This article has been archived. It is offered "as is" and will no longer be updated.
The Internet Message Access Protocol (IMAP) allows a client to search for information contained in messages. The SEARCH command has the ability to search the Internet headers of a message. However, when it is searching for some header information, the IMAP server may fail to return the messages that contain the information. Here is a sample conversation to show the problem:
CLIENT:  0001 login USER1 USER1RESPONSE: 0001 OK LOGIN completedCLIENT: 0002 SELECT INBOXRESPONSE: S: * 2 EXISTS * 1 RECENT * FLAGS (\Seen \Answered \Flagged \Deleted \Draft) * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft)] * OK [UIDVALIDITY 49] UIDVALIDITY value. 0002 OK [READ-WRITE] SELECT completed.CLIENT: 0003 uid search header content-type text/html RESPONSE: * SEARCH0003 OK SEARCH completed.					
The last response is incorrect. The correct response looks like the following:
RESPONSE: * SEARCH 10003 OK SEARCH completed					
To verify that the information exists in the message, you can use the FETCH command. The following is an example of the FETCH command that can show the data is in the message:
CLIENT: 0004 fetch 1 (body[header.fields (content-type)])RESPONSE: * 1 FETCH (BODY[HEADER.FIELDS (content-type)] {51}Content-Type: text/html;        charset="iso-8859-1")0004 OK FETCH completed.					
Notice that the string "text/html" is in the header. The FETCH command correctly retrieves the data, but the SEARCH command does not.
When IMAP asks the Internet E-mail engine (IMAIL) for the data, an incorrect flag is passed, which causes the Internet headers to be suppressed. When the search is performed, no data matches, so no message set is returned to the SEARCH command.
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.The English version of this fix should have the following file attributes or later:

Component: IMAP4

File nameVersion

NOTE: Due to file dependencies, this update requires Microsoft Exchange Server 2000 Service Pack 1.
Microsoft has confirmed that this is a problem in Microsoft Exchange 2000 Server.

Article ID: 302965 - Last Review: 10/26/2013 08:07:00 - Revision: 2.0

Microsoft Exchange 2000 Server Standard Edition

  • kbnosurvey kbarchive kbautohotfix kbhotfixserver kbbug kbexchange2000presp2fix kbfix kbqfe KB302965