General-Purpose Mail Package
|Official GNU Software|
readmsg— Extract Messages from a Folder
readmsg utility extracts messages from a mailbox
according to the criteria specified in the command line. These
readmsg 1 3 0
extracts three messages from the folder: the first, the third, and the last.
readmsg staff meeting
extracts the message which contains the words ‘staff meeting’.
Note that it will not match a message containing ‘Staff Meeting’
– the matching is case sensitive by default. This can changed using
the -i (--ignorecase) option. Two more options are
provided to control the matching algorithm: the -g
(--glob) option instructs
readmsg to treat
arguments as shell globbing patterns and the -r
(--regex) option instructs it to treat them as POSIX extended
regular expressions. Needless to say, when using any of the two latter
options, you should pay attention to escape the matching pattern to
prevent it from being interpreted by the shell. E.g.:
readmsg --regex 'staff.*meeting'
Unless requested otherwise, only the first message that matches the pattern is printed.
At least one command line argument or one informational option must be
readmsg invocation. Informational options are:
--help (-?), --usage, and
This document was generated on August 5, 2021 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.