Node:Specifying Messages, Next:Composing Mail, Previous:Invoking Mail, Up:mail
Many mail commands such as print and delete can be given a message list to operate upon. Wherever the message list is omitted, the command operates on the current message.
The message list in its simplest form is one of:
In its complex form, the message list is a comma or whitespace-separated list of message specifiers. A message specifier is one of
:d
:n
:o
:r
:u
:t
:T
[header:]/string/
It selects all messages that contain header field header
matching given regexp. If the variable regexp
is set,
the string is assumed to be a POSIX regexp. Otherwise, a
header is considered to match string if the latter constitutes
a substring of the former (comparison is case-insensitive).
If header: part is omitted, it is assumed to be Subject:
.
:/string/
It selects all messages whose body matches the string. The matching rules are the same as described under "Header match".
A message specifier can be followed by message part specifier, enclosed in a pair of brackets. A message part specifier controls which part of a message should be operated upon. It is meaningful only for multipart messages. A message part specifier is a comma or whitespace - separated list of part numbers or ranges. Each part number can in turn be message part specifier, thus allowing for operating upon multiply-encoded messages.
The following are the examples of valid message lists: