Solaris Common Desktop Environment: User's Guide

Searching for Mail Messages Within a Mailbox

You can search for mail messages within a mailbox according to the search criteria that you define. Basic search criteria fields in the Basic window of the Search dialog box include: the addressees (To), the sender (From), the subject (Subject), the carbon copy recipients (Cc), and the message text, including the headers (Entire Message).

By creating a search script in the Advanced window of the Search dialog box with keywords and arguments, you can define more sophisticated search criteria for finding messages.

The tables that follow show the keywords you can use in search scripts, grouped under the following categories:


Note -

Those keywords you can type manually but are not available through the menus in the Advanced window of the Search dialog box are marked with an asterisk (*).


Table 8-1 Headers Search Keywords

Keyword 

Explanation 

TO

 

FROM

 

SUBJECT

 

CC

 

TEXT

A keyword that pertains to the entire message, including headers and attachments 

BCC

 

HEADER*

A keyword to use according to the syntax: header HeaderName HeaderValue, such as header x-sun-charset us-ascii

BODY*

A keyword that applies to the message text and the text attachments, but not the headers 

Table 8-2 lists and describes the Dates keywords.


Note -

The date format is dd-mmm-yyyy (for example, 02-Apr-1996).


Table 8-2 Dates Search Keywords

Keyword 

Explanation 

BEFORE

 

SINCE

 

ON

 

DURING

 

SENTSINCE*

 

SENTBEFORE*

 

SENTON*

 

TODAY

An argument for the keywords that are associated with dates, such as before

YESTERDAY

Same as above 

LASTWEEK

Same as above 

THISMONTH

Same as above 

LASTMONTH

Same as above 

JANUARY..DECEMBER

 

SUNDAY..SATURDAY

 

Table 8-3 lists and describes the States keywords.

Table 8-3 States Search Keywords

Keyword 

Explanation 

READ

 

UNREAD

 

NEW*

 

OLD*

 

DELETED*

A keyword for messages that you have deleted, but not permanently 

UNDELETED*

 

RECENT*

 

FLAGGED*

 

ANSWERED*

 

UNANSWERED*

 

KEYWORD*

 

UNKEYWORD*

 

DRAFT*

 

UNDRAFT*

 

ALL*

A keyword that denotes all the messages in the mailbox 

LARGER*

A keyword that requires two arguments, such as smaller 300, the numeric denoting bytes

SMALLER*

Same as above 

Table 8-4 lists and describes the search operators.

Table 8-4 Search Operators

Operator 

Explanation 

AND

 

OR

 

~ (not)

A symbol that represents the logical

not
operator. Place it in front of the search keyword, for example: ~ text "good morning"

(

A symbol that denotes the beginning of an expression 

)

A symbol that denotes the end of an expression 

Search scripts are not case sensitive.

Here are some examples:

To search for messages that were sent from john in April with either "urgent" or "important" in the subject line:

from john and (subject urgent or subject important) and during april

To search for messages that were sent from bill with no carbon copy to tigerteam and not yet read:

from bill and ~(cc tigerteam) and unread

To search for messages that were addressed to bill or sent with a carbon copy to bill, with "monthly report" in the message, including the headers and attachments:

(to bill or cc bill) and text "monthly report"

To Find a Mail Message Within a Mailbox

  1. Choose Search from the Message menu.

    The Search dialog box is displayed.

    Figure 8-3 Mailer Search dialog box

    Graphic

  2. Type the text you want to search for in the appropriate field.

    You can search for a match on one or more of the To, From, Subject, or Cc fields. If you type the criteria in multiple fields, Mailer searches for messages that match all of the criteria.

    Within each field, Mailer considers the input as one criterion even if there are multiple strings separated by spaces or commas. For example, if you type wood smith in the To field, Mailer looks for a message that is addressed to wood smith, not wood or smith.

    The fields are not case-sensitive.

  3. Click Search Down or Search Up to find the next or previous matching message in your mailbox. To find all the matches, click Select All.


    Note -

    To remove all the text in the fields in the Search dialog box, click Clear.


To Create Advanced Search Scripts

  1. Choose Advanced from the Search Type menu.

    The Advanced Search dialog box is displayed.

    Graphic
  2. Type your script in the text area.

    Choose keywords from the menus to help you create the script.

    The keywords are not case sensitive.