List, filter and sort envelopes
$ himalaya envelope list [OPTIONS] [QUERY]...
Lists envelopes included in the given folder (defaults to INBOX
), and filter/sort them according to the given query. 5 properties are displayed:
id
: the identifier of the envelopeflags
: the flags associated to the envelopesubject
: the subject from the message headersfrom
: the first sender from the message headersto
: the first recipient from the message headersdate
: the date from the message headers
Query
The query allows you to filter and/or sort envelopes. It can be composed of a filter query, a sort query or both at the same time.
See the ABNF grammar for more detailed information (advanced).
Filter query
A filter query is composed of operators and conditions.
There is 3 operators:
not <condition>
: filter envelopes that do not match the condition<condition> and <condition>
: filter envelopes that match both conditions<condition> or <condition>
: filter envelopes that match one of the conditions
And there is 8 conditions:
date <yyyy-mm-dd>
: filter envelopes that match the given datebefore <yyyy-mm-dd>
: filter envelopes with date strictly before the given oneafter <yyyy-mm-dd>
: filter envelopes with date stricly after the given onefrom <pattern>
: filter envelopes with senders matching the given patternto <pattern>
: filter envelopes with recipients matching the given patternsubject <pattern>
: filter envelopes with subject matching the given patternbody <pattern>
: filter envelopes with text bodies matching the given patternflag <flag>
: filter envelopes matching the given flag
Sort query
A sort query starts by order by
, and is composed of kinds and orders.
There is 4 kinds:
date [order]
: sort envelopes by datefrom [order]
: sort envelopes by senderto [order]
: sort envelopes by recipientsubject [order]
: sort envelopes by subject
Note: the order can be omitted. If so, the ascending order is used by default.
And there is 2 orders:
<kind> asc
: sort envelopes by the given kind in ascending order<kind> desc
: sort envelopes by the given kind in descending order
Options
-f|--folder
The folder name.
Defaults to INBOX
.
-p|--page
The page number.
The page number starts from 1 (which is the default). Giving a page number to big will result in a out of bound error.
-s|--page-size
The page size.
Determine the amount of envelopes a page should contain.
Note: a page size at 0
means no pagination.
-w|--max-width
The maximum width the table should not exceed.
This argument will force the table not to exceed the given width in pixels. Columns may shrink with ellipsis in order to fit the width.
--disable-cache
Disable any sort of cache.
The action depends on commands it apply on. For example, when listing envelopes using the IMAP backend, this flag will ensure that envelopes are fetched from the IMAP server rather than the synchronized local Maildir.
-a|--account
Override the default account.
An account name corresponds to an entry in the table at the root level of your TOML configuration file.
Settings
envelope.list.backend
Override the backend used for listing envelopes.
# valid backends: maildir, imap, notmuch
envelope.list.backend = "imap"
envelope.list.page-size
Define the size of a page when listing envelopes.
A page size of 0 disables the pagination and shows all available envelopes.
envelope.list.page-size = 10
envelope.list.datetime-fmt
Customize the format for displaying envelopes date.
See chrono::format::strftime
for supported formats. Defaults to "%F %R%:z"
(eg: 2023-05-04 07:49-07:00
).
envelope.list.datetime-fmt = "%d-%m-%Y, %R"
envelope.list.datetime-local-tz
Transform envelopes date timezone into the user’s local one.
For example, if the user’s local timezone is UTC, the envelope date 2023-06-15T09:00:00+02:00
becomes 2023-06-15T07:00:00-00:00
.
envelope.list.datetime-local-tz = true
Examples
$ himalaya envelope list --disable-cache --account posteo Archives.FOSS
ID │FLAGS │SUBJECT │FROM │DATE
937 │ │~soywod/pimalaya#161: TOML parse error: m… │~Phil Crockett │2023-12-22 15:12+00:00
938 │ │Re: [dantecatalfamo/himalaya-emacs] Prepa… │Dante Catalfamo │2023-12-20 23:21-08:00
939 │ │Re: Short question │michiel@nlnet.nl │2023-12-20 17:39+01:00
940 │ │Update and important request: EC evaluati… │Michiel Leenaars │2023-12-20 12:44+00:00
941 │ │Re: Short question │michiel@nlnet.nl │2023-12-20 12:23+01:00
942 │ │Short question │michiel@nlnet.nl │2023-12-20 09:40+01:00
943 │ │Request for payment for 2023-04-034: Pima… │dashboard@nlnet.nl │2023-12-18 13:20+00:00
944 │ │Re: [TornaxO7/rfc2047-decoder] InvalidByt… │TornaxO7 │2023-12-17 05:55-08:00
945 │ │Re: [TornaxO7/rfc2047-decoder] InvalidByt… │TornaxO7 │2023-12-17 05:55-08:00
946 │ │Please confirm the RfP for 2023-04-034: P… │dashboard@nlnet.nl │2023-12-14 23:24+00:00
$ himalaya envelope list from michiel or from nlnet order by date desc
ID │FLAGS │SUBJECT │FROM │DATE
939 │ │Re: Short question │michiel@nlnet.nl │2023-12-20 17:39+01:00
940 │ │Update and important request: EC evaluati… │Michiel Leenaars │2023-12-20 12:44+00:00
941 │ │Re: Short question │michiel@nlnet.nl │2023-12-20 12:23+01:00
942 │ │Short question │michiel@nlnet.nl │2023-12-20 09:40+01:00
943 │ │Request for payment for 2023-04-034: Pima… │dashboard@nlnet.nl │2023-12-18 13:20+00:00
946 │ │Please confirm the RfP for 2023-04-034: P… │dashboard@nlnet.nl │2023-12-14 23:24+00:00