General-Purpose Mail Package
|Official GNU Software|
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:
Selects current message. It is equivalent to empty message list.
Selects all messages in the mailbox.
Selects first non-deleted message.
Selects last non-deleted message.
In its complex form, the message list is a comma or whitespace-separated list of message specifiers. A message specifier is one of
This specifier addresses the message with the given ordinal number in the mailbox.
Message range is specified as two message numbers separated by a dash. It selects all messages with the number lying within that range.
An Attribute specifier is a colon followed by a single letter. The Attribute specifier addresses all messages in the mailbox that have the given attribute. These are the valid attribute specifiers:
Selects all deleted messages.
Selects all recent messages, i.e. the messages that have not been neither read not seen so far.
Selects all messages that have been seen.
Selects all messages that have been read.
Selects all messages that have not been read.
Selects all tagged messages.
Selects all untagged messages.
The header match is a string in the form:
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:’.
The message body match is a string in the form:
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:
This document was generated on October 27, 2018 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.