| #

## Optimizing Search Criteria

When performing mailbox searches, attempt to narrow the search scope by defining the following search criteria.

- Search in message subject, body, or attachment:
  - For Exchange Server 2010, administrators can use AQS to search for text that only resides in specific message parts. The following examples display some simple AQS search strings:
    - Example 1: To search for messages containing the word “test” in the message subject, type `subject:test`.
    - Example 2: To search for messages containing the attachment “test.xslx”, type `attachment:test.xslx`.
    For details on AQS, see http://msdn.microsoft.com/en-us/library/bb266512.aspx.
  - For Exchange Server 2013/2016, administrators can use KQL to search for text that only resides in specific message parts. The following examples display some simple KQL search strings:
    - Example 1: To search for messages containing the word “test” in the message subject, type `Subject:test`.
    - Example 2: To search for messages containing the attachment “test.xslx”, type `attachment:'test.xslx'`.
    For details on KQL, see http://msdn.microsoft.com/en-us/library/ee558911.aspx.
- Search for users in specific mailbox servers:
  ScanMail does not provide a direct way to search specific mailbox servers. Administrators can, however, create a distribution group that contains all users on a specific mailbox server and then perform a search on that distribution group.