| 1 |
AERC-JMAP(5) |
| 2 |
|
| 3 |
# NAME |
| 4 |
|
| 5 |
aerc-jmap - JMAP configuration for *aerc*(1) |
| 6 |
|
| 7 |
# SYNOPSIS |
| 8 |
|
| 9 |
aerc implements the JMAP protocol as specified by RFCs 8620 and 8621. |
| 10 |
|
| 11 |
# CONFIGURATION |
| 12 |
|
| 13 |
Basic JMAP configuration may be done interactively with the *:new-account* |
| 14 |
command. |
| 15 |
|
| 16 |
In _accounts.conf_ (see *aerc-accounts*(5)), the following JMAP-specific options |
| 17 |
are available: |
| 18 |
|
| 19 |
*source* = _<scheme>_://[_<username>_][_:<password>@_]_<hostname>_[_:<port>_]/_<path>_ |
| 20 |
Remember that all fields must be URL encoded. The _@_ symbol, when URL |
| 21 |
encoded, is _%40_. |
| 22 |
|
| 23 |
_<hostname>_[_:<port>_]/_<path>_ is the HTTPS JMAP session resource as |
| 24 |
specified in RFC 8620 section 2 without the leading _https://_ scheme. |
| 25 |
|
| 26 |
Possible values of _<scheme>_ are: |
| 27 |
|
| 28 |
_jmap_ |
| 29 |
JMAP over HTTPS using Basic authentication. |
| 30 |
|
| 31 |
_jmap+oauthbearer_ |
| 32 |
JMAP over HTTPS using OAUTHBEARER authentication |
| 33 |
|
| 34 |
The username is ignored and may be left empty. If specifying the |
| 35 |
password, make sure to prefix it with _:_ to make it explicit |
| 36 |
that the username is empty. Or set the username to any random |
| 37 |
value. E.g.: |
| 38 |
|
| 39 |
``` |
| 40 |
source = jmap+oauthbearer://:[email protected]/jmap/session |
| 41 |
source = jmap+oauthbearer://me:[email protected]/jmap/session |
| 42 |
``` |
| 43 |
|
| 44 |
Your source credentials must have the _urn:ietf:params:jmap:mail_ |
| 45 |
capability. |
| 46 |
|
| 47 |
*source-cred-cmd* = _<command>_ |
| 48 |
Specifies the command to run to get the password for the JMAP account. |
| 49 |
This command will be run using _sh -c command_. If a password is |
| 50 |
specified in the *source* option, the password will take precedence over |
| 51 |
this command. |
| 52 |
|
| 53 |
Example: |
| 54 |
source-cred-cmd = pass hostname/username |
| 55 |
|
| 56 |
*outgoing* = _jmap://_ |
| 57 |
The JMAP connection can also be used to send emails. No need to repeat |
| 58 |
the URL nor any credentials. Just the URL scheme will be enough. |
| 59 |
|
| 60 |
Your source credentials must have the _urn:ietf:params:jmap:submission_ |
| 61 |
capability. |
| 62 |
|
| 63 |
*cache-state* = _true_|_false_ |
| 64 |
Cache all email state (mailboxes, email headers, mailbox contents, email |
| 65 |
flags, etc.) on disk in a levelDB database located in folder |
| 66 |
_~/.cache/aerc/<account>/state_. |
| 67 |
|
| 68 |
The cached data should remain small, in the order of a few megabytes, |
| 69 |
even for very large email stores. Aerc will make its best to purge |
| 70 |
deleted/outdated information. It is safe to delete that folder when aerc |
| 71 |
is not running and it will be recreated from scratch on next startup. |
| 72 |
|
| 73 |
Default: _false_ |
| 74 |
|
| 75 |
*cache-blobs* = _true_|_false_ |
| 76 |
Cache all downloaded email bodies and attachments on disk as individual |
| 77 |
files in _~/.cache/aerc/<account>/blobs/<xx>/<blob_id>_ (where _<xx>_ is |
| 78 |
a subfolder named after the last two characters of _<blob_id>_). |
| 79 |
|
| 80 |
Aerc will not purge the cached blobs automatically. Even when their |
| 81 |
related emails are destroyed permanently from the server. If required, |
| 82 |
you may want to run some periodic cleanup based on file creation date in |
| 83 |
a crontab, e.g.: |
| 84 |
|
| 85 |
@daily find ~/.cache/aerc/foo/blobs -type f -mtime +30 -delete |
| 86 |
|
| 87 |
Default: _false_ |
| 88 |
|
| 89 |
*use-labels* = _true_|_false_ |
| 90 |
If set to _true_, mailboxes with the _archive_ role (usually _Archive_) |
| 91 |
will be hidden from the directory list and replaced by an *all-mail* |
| 92 |
virtual folder. The name of that folder can be configured via the |
| 93 |
*all-mail* setting. |
| 94 |
|
| 95 |
*:archive* _flat_ may still be used to effectively "tag" messages with the |
| 96 |
hidden _Archive_ mailbox so that they appear in the *all-mail* virtual |
| 97 |
folder. When the *all-mail* virtual folder is selected, *:archive* _flat_ |
| 98 |
should not be used and will have no effect. The messages will be grayed |
| 99 |
out but will never be refreshed until aerc is restarted. |
| 100 |
|
| 101 |
Also, this enables support for the *:modify-labels* (alias *:tag*) |
| 102 |
command. |
| 103 |
|
| 104 |
Default: _false_ |
| 105 |
|
| 106 |
*all-mail* = _<name>_ |
| 107 |
Name of the virtual folder that replaces the role=_archive_ mailbox when |
| 108 |
*use-labels* = _true_. |
| 109 |
|
| 110 |
Default: _All mail_ |
| 111 |
|
| 112 |
*server-ping* = _<duration>_ |
| 113 |
Interval the server should ping the client at when monitoring for email |
| 114 |
changes. The server may choose to ignore this value. By default, no ping |
| 115 |
will be requested from the server. |
| 116 |
|
| 117 |
See https://pkg.go.dev/time#ParseDuration. |
| 118 |
|
| 119 |
# NOTES |
| 120 |
|
| 121 |
JMAP messages can be seen as "labels" or "tags". Every message must belong to |
| 122 |
one or more mailboxes (folders in aerc). Each mailbox has a "role" as described |
| 123 |
in _https://www.iana.org/assignments/imap-mailbox-name-attributes/_. |
| 124 |
|
| 125 |
When deleting messages that belong only to the selected mailbox, aerc will |
| 126 |
attempt to "move" these messages to a mailbox with the _trash_ role. If it |
| 127 |
cannot find such mailbox or if the selected mailbox is the _trash_ mailbox, it |
| 128 |
will effectively destroy the messages from the server. |
| 129 |
|
| 130 |
*:delete* removes messages from the selected mailbox and effectively does the |
| 131 |
same thing as *:tag -<selected_folder>*. |
| 132 |
|
| 133 |
*:cp <foo>* is an alias for *:tag <foo>* or *:tag +<foo>*. |
| 134 |
|
| 135 |
*:mv <foo>* is a compound of *:delete* and *:cp* and can be seen as an alias of |
| 136 |
*:tag -<selected_folder> +<foo>*. |
| 137 |
|
| 138 |
*:archive* _flat_ is an alias for *:tag -<selected_folder> +<archive>*. |
| 139 |
|
| 140 |
# SEE ALSO |
| 141 |
|
| 142 |
*aerc*(1) *aerc-accounts*(5) |
| 143 |
|
| 144 |
# AUTHORS |
| 145 |
|
| 146 |
Originally created by Drew DeVault and maintained by Robin Jarry who is assisted |
| 147 |
by other open source contributors. For more information about aerc development, |
| 148 |
see _https://sr.ht/~rjarry/aerc/_. |