Previous | Contents | Index |
Search for messages containing a specific phrase.
SEARCH search-string
Qualifiers Defaults /BINARY_PARTS /NOBINARY_PARTS /BEFORE=date None /CC_SUBSTRING=text None /FROM_SUBSTRING=text None /FOLDERS=(folder-name[,...]) None /INTERPRETED /NOINTERPRETED /MARKED None /REPLIED None /SINCE=date None /SUBJECT_SUBSTRING=text None /TEXT_PARTS /TEXT_PARTS /TRIM_HEADER /TRIM_HEADER /TO_SUBSTRING=text None
search-string
Parameter specifying the phrase (i.e., a string of text) to search for.
The SEARCH command searches messages looking for the specified string. By default, only the currently selected messages are searched. However, if the /FOLDERS qualifier is specified, then messages from the specified folders will be selected.
If the SEARCH command finds a message containing the specified search string, then that message will be displayed. To continue the search simply enter the SEARCH command without specifying the search string parameter. If you specify that parameter, then the search will be started all over again.
Note that by default, the messages to be searched are read out of your mail folder with no special interpretation ascribed to the raw text so obtained. This means that if the message contains, for instance, encoded data, then that data will be searched in its encoded form. If you specify the /INTERPRETED qualifier, then each message will first be interpreted as an RFC 822/RFC 1521 (MIME) message and then searched. Doing this, however, will noticeably slow down the searching process.
/BINARY_PARTS
/NOBINARY_PARTS (default)
By default, binary parts of interpreted messages are not searched. Specify /BINARY_PARTS to specify that any binary data also be searched. In general, binary parts are message parts of content types other than text or message. Not all application subtypes may be treated as binary data; e.g., application/postscript. This qualifier has no effect unless the /INTERPRETED qualifier is also specified./BEFORE[=date]
Select messages dated before the specified date. All the messages received before the current day are selected if no date is specified. This qualifier has no effect unless the /FOLDERS qualifier is also specified./CC_SUBSTRING=text
Select messages containing text in the VMS MAIL Cc: header line of the message. This qualifier has no effect unless the /FOLDERS qualifier is also specified./FROM_SUBSTRING=text
Select messages containing text in the VMS MAIL From: header line of the message. This qualifier has no effect unless the /FOLDERS qualifier is also specified./FOLDERS=(folder-name,[...])
Search messages from each of the specified folders./INTERPRETED
/NOINTERPRETED (default)
By default, no special interpretation is ascribed to the raw text of each message; the raw text is blindly searched for the search string. If you wish to first interpret each message as an RFC 822/RFC 1521 (MIME) message and then search the interpreted message, specify /INTERPRETED. Interpreting message data is sometimes necessary as the data may be encoded and require decoding to be meaningful./MARKED
/NOMARKED
Select messages that have been marked, /MARKED, or are not marked, /NOMARKED. This qualifier has no effect unless the /FOLDERS qualifier is also specified./REPLIED
/NOREPLIED
Select messages that have been replied to, /REPLIED, or have not been replied to, /NOREPLIED. This qualifier has no effect unless the /FOLDERS qualifier is also specified./SINCE[=date]
Select messages dated since the specified date. All the messages received on the current day are selected if no date is specified. This qualifier has no effect unless the /FOLDERS qualifier is also specified./SUBJECT_SUBSTRING=text
Select messages containing text in the VMS MAIL Subject: header line of the message. This qualifier has no effect unless the /FOLDERS qualifier is also specified./TEXT_PARTS (default)
/NOTEXT_PARTS
By default, only message headers and text parts of interpreted messages are searched. When /NOTEXT_PARTS is specified, then text parts will not be searched. In such a case, be sure to specify /BINARY_PARTS or else no part of the messages will be searched. In general, text parts include any message body part of content type text, message, and some application subtypes such as application/postscript. This qualifier has no effect unless the /INTERPRETED qualifier is also specified./TO_SUBSTRING=text
Select messages containing text in the VMS MAIL To: header line of the message. This qualifier has no effect unless the /FOLDERS qualifier is also specified./TRIM_HEADER (default)
/NOTRIM_HEADER
When an interpreted message is searched, only its trimmed message header is searched. If you wish to search the full header of each message, specify /INTERPRETED/NOTRIM_HEADER. This qualifier has no effect unless the /INTERPRETED qualifier is also specified.
#1 |
---|
EMAIL> SELECT JOKES %EMAIL-I-SELECTED, 42 messages selected EMAIL> SEARCH DOG Message MAIL 21 24-FEB-2012 12:19:25.69 Date: Wed, 24 Feb 2012 12:19:25 PDT From: "John Doe" <JDOE@EXAMPLE.COM> Subject: funny jokes To: JPUBLIC@EXAMPLE.COM Q: What do you get when you cross an agnostic, dyslexic, and insomniac? A: Someone who lies awake at night wondering if there really is a Dog. EMAIL> SEARCH %EMAIL-E-NOTFOUND, no messages containing 'DOG' found EMAIL> |
In this example the JOKES folder is selected and then searched for the string "DOG". Message 21 is found to contain this string and thus displayed. A second SEARCH command, without the search string parameter, is specified so as to continue the search. No further messages containing DOG are found.
#2 |
---|
EMAIL> SEARCH/FOLDERS=(WORK_JAN,WORK_FEB) WHISTLE %EMAIL-I-SEARCHING, 81 messages selected from folder WORK_JAN %EMAIL-I-SEARCHING, 73 messages selected from folder WORK_FEB %EMAIL-E-NOTFOUND, no messages containing 'WHISTLE' found EMAIL> |
In this example, the folders WORK_JAN and WORK_FEB are searched for the string "WHISTLE"; the string is not found in any messages in either folder.
Previous | Next | Contents | Index |