| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A folder may be defined based on the notmuch query `*`, which matches
all messages. This query is a special case (see notmuch-search-terms(7))
and cannot be combined with other queries. When adding to a `*` query,
such as when searching, simply replace `*` with the more specific query
rather than combining the two.
Changelog-fixed: Notmuch folders defined by the query `*` handle
search, filter, and unread counts correctly.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When go-maildir parses a folder and finds an error, it will still return
the valid keys it has found along with the error. Instead of returning
an empty list of UIDs log an error and proceed with the valid uids found
by go-maildir. When opening a folder with invalid files, show an error
message to the user.
References: https://todo.sr.ht/~rjarry/aerc/215
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support the draft flag wherever flags are used. Automatically set it
when postponing a message, and allow recalling a message without the -f
flag if it has the draft flag set, regardless of what folder it's in.
Notmuch doesn't seem to pick up on the draft flag when indexing even
though the flag is set on the maildir file. Explicitly set all tags
corresponding to set flags when appending a message in notmuch.
Changelog-added: Support the `draft` flag.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Mimic other backends that have centralized mappings. Doing so makes
adding support for the draft flag simpler in a subsequent commit.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Rewrite the imap idler to make it more fault tolerant and prevent hangs
(and possibly short writes).
Fixes: https://todo.sr.ht/~rjarry/aerc/208
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For some reason, a JMAP server may send message details with empty
blobId values. This is invalid but it should not cause a crash.
Error: runtime error: slice bounds out of range [-2:]
goroutine 16 [running]:
git.sr.ht/~rjarry/aerc/worker/jmap/cache.(*JMAPCache).blobPath()
git.sr.ht/~rjarry/aerc/worker/jmap/cache/blob.go:43 +0x95
git.sr.ht/~rjarry/aerc/worker/jmap/cache.(*JMAPCache).GetBlob()
git.sr.ht/~rjarry/aerc/worker/jmap/cache/blob.go:11 +0x18
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).handleFetchMessageBodyPart()
git.sr.ht/~rjarry/aerc/worker/jmap/fetch.go:116 +0x26f
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).handleMessage()
git.sr.ht/~rjarry/aerc/worker/jmap/worker.go:142 +0x25f
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).Run()
git.sr.ht/~rjarry/aerc/worker/jmap/worker.go:177 +0x105
git.sr.ht/~rjarry/aerc/app.NewAccountView.func3()
git.sr.ht/~rjarry/aerc/app/account.go:105 +0x57
created by git.sr.ht/~rjarry/aerc/app.NewAccountView in goroutine 1
git.sr.ht/~rjarry/aerc/app/account.go:98 +0x468
Ignore a blobId when it is an empty string.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tristan Partin <tristan@partin.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider a thread with a root message and three child messages, each of
which has a single child message, like so:
root
child 1
grandchild 1a
child 2
grandchild 2a
child 3
grandchild 3a
With the previous implementation, if child 2 (or child 3) is not shown
by the current query, then grandchild 2a (or grandchild 3a) will not be
shown either. Ensure that this bug does not occur; that is, ensure that
children of non-queried non-first-child messages are shown in threads.
A more complex implementation is possible that maintains only a single
loop over the messages, but thinking about it made my head hurt. Use a
second (at times redundant) loop instead for simplicity's sake.
Changelog-fixed: Don't lose child messages of non-queried parents in
notmuch threads
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the maildir and notmuch backends, add the full path of the message
as Filename to templates. In case of a notmuch message having multiple
files associated with it, it returns a random path. Also add Filenames
to templates, which is a list of all associated message paths. This is
relevant for the notmuch backend, where a single messages is shown, if
there are multiple copies of it.
Changelog-added: Add filepath to messages in templates as .Filename(s)
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if there are mails aerc can not properly handle, listing the
mailbox is aborted. This is especially bothersome if the message one is
looking for would be parseable without issue.
Show an error if parsing of a message fails, but handle all other
messages as normal. This leads to those messages showing up as still
loading.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove dynamic folders in the notmuch backends with the :rmdir command.
Dynamic folders can be created by the :cf command but they cannot be
removed again unless you restart aerc or use it in combination with a
maildir-store.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Add recipients fields (from, to, cc) to the header for filtering and
searching for the maildir and mbox backends.
Fixes: commit 8464b373 ("search: use a common api for all workers")
Reported-by: Vitaly Ovchinnikov <v@ovch.ru>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Vitaly Ovchinnikov <v@ovch.ru>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When encountering a statement such as:
go functionName()
The identifier is not a local symbol but should be looked up in the
current package. Do not consider that all these statements will refer to
local variables.
The only way to do this is to run a second analyzer that depends on the
first one. Store all unresolved methods and functions into
a indirectCalls struct. Reuse that result in the second analyzer to
resolve the function declarations and check their bodies for the
defer log.PanicHandler() statement.
Fix one newly reported issues.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
| |
Add a toggle option (-t) to :fold/:unfold commands to allow for
switching the folding status of a thread.
Changelog-Added: Toggle folding with `:fold -t`.
Signed-Off-By: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Jason Cox <me@jasoncarloscox.com>
|
|
|
|
|
|
|
| |
Extend the :fold/:unfold behaviour to allow for multiple folding levels.
Signed-Off-By: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a SearchCriteria structure. Update the FetchDirectoryContents,
FetchDirectoryThreaded and SearchDirectory worker messages to include
this SearchCriteria structure instead of a []string slice.
Parse the search arguments in a single place into a SearchCriteria
structure and use it to search/filter via the message store.
Update all workers to use that new API. Clarify the man page indicating
that notmuch supports searching with aerc's syntax and also with notmuch
specific syntax.
getopt is no longer needed, remove it from go.mod.
NB: to support more complex search filters in JMAP, we need to use an
email.Filter interface. Since GOB does not support encoding/decoding
interfaces, store the raw SearchCriteria and []SortCriterion values in
the cached FolderContents. Translate them to JMAP API objects when
sending an email.Query request to the server.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid importing code from worker/lib into lib. It should only be the
other way around. Move the message parsing code used by maildir,
notmuch, mbox and the eml viewer into a lib/rfc822 package.
Adapt imports accordingly.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Notmuch threads can silently drop sibling messages during threading when
a thread has multiple "top level messages" (IE a thread where the root
is missing). Modify makeThread to return a slice of all encountered
siblings and add these as individual threads.
Note that the current implementation does not link these threads
together with a dummy parent node. This should be done in the future
when rendering of these types of threads is implemented
Fixes: https://todo.sr.ht/~rjarry/aerc/188
Reported-by: inwit <inwit@sindominio.net>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add new `flagged` criteria to `:sort` command (and apparently to the
`sort` config option). Good for moving important stuff up.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a UI config value to enable showing of "thread-context", similar
to `notmuch show --entire-thread=true`. Add an associated style called
"msglist_thread_context" which can be used to style such messages.
Currently this feature is only supported by notmuch. It would be
possible for maildir to implement as well, IMAP with gmail custom
extensions, and JMAP. This patch merely implements the notmuch version
and puts the groundwork in for handling these sorts of displays.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The LimitHeaders function is used to optionally reduce memory usage of
aerc by only keeping certain headers in memory for the message list. The
function properly deletes header keys and values from the underlying
object, however the underlying data structure has a map and a slice -
which do not get resized after deletion: resulting in no actual memory
savings.
Create a new header and add only the headers we want to it. Return this
value and use in the MessageInfo struct.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the logging of stdout/stderr of mail checking process in maildir
worker if it returns an error.
The user still sees just the exit status, but log gets a more detailed
information for further analysis.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
| |
For proper thread ordering, notmuch needs to use a SORT_NEWEST_FIRST
sort order in it's query, and then we reverse the thread order. Also
give a maximum guess for size of slice we'll be returning.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Refactor SetFlag to be more readable by handling the special case of
SeenFlag in a cleaner way. If we invert the operation ('enable') instead
of invert the oldState, we can use the same logic for any tag.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Track the notmuch database state. When a state change is detected, query
if any changes affect the current query then send updates accordingly.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
When using the notmuch backend, any modifications of labels changes the
UI to an unthreaded state. Don't send a fresh DirectoryContents, and
instead instruct the UI to fetch a new message list based on current
threading/sorting/filtering criteria.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Check for a canceled context when opening a directory with notmuch. The
OpenDirectory message carries a context tied to the directory lister -
checking for the context error can prevent us from opening a directory
that has already been deselected (even after the dirlist-delay period)
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mbox worker uses the only reference to the datacounter object (see
previous commit where it was removed from 'postpone'). The counter
object in mbox is counting the size of the mbox message. Use io.Discard
and the result from the io.Copy call to set this size. This saves us
from writing to memory, since io.Discard will not store any of the
written bytes. It also removes the dependency on datacounter.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
The thread.go file hasn't been used for a long time. Remove it.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Replace the notmuch library used with our internal bindings.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
github.com/mitchellh/go-homedir has not received any update since 2019.
The last release of github.com/kyoh86/xdg was in 2020 and it has been
marked as deprecated by its author.
Replace these with internal functions.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The gob encoder requires registration of types used during encoding.
There are several types defined in the Session object that don't
directly or indirectly get registered with gob. As a result, the session
object never actually gets cached, requiring an authentication step
which is often unnecessary.
Use json encoding for this object to provide a simpler serialization
path.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
| |
Add the "maildir-account-path" account configuration option to select
the account relative to the "maildir-store" to have traditional
maildir one tab per account behavior with notmuch.
Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
| |
No functional change. This will allow reuse in other parts of aerc.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support the IMAP Gmail extension (X-GM-EXT-1) to fetch all messages for
a given thread. This allows client-side threading to display a full
message thread. Obviously, it requires a Gmail account to work.
The extension is only used when requested in accounts.conf with:
"use-gmail-ext = true" (default: false)
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tristan Partin <tristan@partin.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes, aerc lists completely random messages when opening a mailbox.
It only happens when cache-headers=true.
According to RFC 3501:
> The combination of mailbox name, UIDVALIDITY, and UID must refer to
> a single immutable message on that server forever.
It turns out that several mailboxes may have the same UIDVALIDITY value
and may contain messages that have the same UID. When that happens, aerc
assumes that the headers for these messages are already cached and
returns them whereas they are for messages from another mailbox.
Add the mailbox name into the header cache key to avoid these confusing
collisions.
Fixes: 7aa71d334b27 ("imap: add option to cache headers")
Link: https://datatracker.ietf.org/doc/html/rfc3501#section-2.3.1.1
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the following error when opening another aerc instance with the same
jmap account:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x9a1ffd]
git.sr.ht/~rjarry/aerc/worker/jmap/cache.(*JMAPCache).get(0x99d08e?, {0xbc3c1a?, 0xc00003a160?})
git.sr.ht/~rjarry/aerc/worker/jmap/cache/cache.go:47 +0x1d
git.sr.ht/~rjarry/aerc/worker/jmap/cache.(*JMAPCache).GetSession(0xc00052a030?)
git.sr.ht/~rjarry/aerc/worker/jmap/cache/session.go:8 +0x29
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).handleConnect(0xc00055e180, 0x0?)
git.sr.ht/~rjarry/aerc/worker/jmap/connect.go:29 +0xd3
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).handleMessage(0xc000311500?, {0xcc8b00?, 0xc0001fcff0?})
git.sr.ht/~rjarry/aerc/worker/jmap/worker.go:114 +0x9f
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).Run(0xc00055e180)
git.sr.ht/~rjarry/aerc/worker/jmap/worker.go:177 +0x10c
git.sr.ht/~rjarry/aerc/widgets.NewAccountView.func3()
git.sr.ht/~rjarry/aerc/widgets/account.go:110 +0x65
created by git.sr.ht/~rjarry/aerc/widgets.NewAccountView
git.sr.ht/~rjarry/aerc/widgets/account.go:103 +0x518
Do not return an error if the leveldb cannot be opened, log a message
and fallback on the in-memory cache.
Fixes: be0bfc1ae28b ("worker: add jmap support")
Reported-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve the folder mapping syntax so that prefixes can be removed
completely. The following line in the folder-map file
* = INBOX/*
will strip the INBOX/ prefix from all subfolders of INBOX, e.g. map
"INBOX/Project1" to "Project1".
To prevent a key collision with multiple "*" keys (the folder mapping is
stored as a map internally), a group of "*" will be condensed to one "*",
e.g.
** = INBOX/*
has the same meaning as above.
Also, adjust name translation for folder creation and add tests.
Fixes: https://todo.sr.ht/~rjarry/aerc/176
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only call UidSort with some sort criteria. If we call it without,
some imap severs report it as an error.
For example, Fastmail imap with the sort config in aerc.conf commented
out reports: "[Fastmail] unexpected error: Missing Sort criteria" and
cannot display the messages.
Fixes: https://lists.sr.ht/~rjarry/aerc-devel/%3C5955665f-4d1a-4295-86bd-d1a5eabd0d6d%40milic.suse.cz%3E
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
When archiving a message, the counts of archive folder are changed.
When use-labels=true, the archive folder is hidden and should remain so.
Do not send updates to the UI.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the folder-map functionality to the maildir backend. If the
folder-map config option is specified, the folder-map worker middleware
is used.
Unroll the worker.PostMessageInfoError function for a streamlined
WorkerInteractor interface.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add the folder-map functionality to the imap backend. If the folder-map
config option is specified, the folder-map worker middleware is used.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Combine the query-map and folder-map parsing functionality. Add tests.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Implement a folder-map middleware that will translate the folder names
between the ui and the backend according to a provided key-value map.
Fixes: https://todo.sr.ht/~rjarry/aerc/175
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a WorkerInteractor interface. Avoid exposing any public fields in
the types.Worker.
This will set the stage to implement a middleware pattern for the
workers, i.e. to map folder names between the ui and the backend.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for JMAP backends. This is on par with IMAP features with
some additions specific to JMAP:
* tagging
* sending emails
This makes use of git.sr.ht/~rockorager/go-jmap for the low level
interaction with the JMAP server. The transport is JSON over HTTPS.
For now, only oauthbearer with token is supported. If this proves
useful, we may need to file for an official three-legged oauth support
at JMAP providers.
I have tested most features and this seems to be reliable. There are
some quirks with the use-labels option. Especially when moving and
deleting messages from the "All mail" virtual folder (see aerc-jmap(5)).
Overall, the user experience is nice and there are a lot less background
updates issues than with IMAP (damn IDLE mode hanging after restoring
from sleep).
I know that not everyone has access to a JMAP provider. For those
interested, there are at least these two commercial offerings:
https://www.fastmail.com/
https://www.topicbox.com/
And, if you host your own mail, you can use a JMAP capable server:
https://stalw.art/jmap/
https://www.cyrusimap.org/imap/download/installation/http/jmap.html
Link: https://www.rfc-editor.org/rfc/rfc8620.html
Link: https://www.rfc-editor.org/rfc/rfc8621.html
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
| |
Check for cancelled contexts before and after performing headers or flag
fetches and any directory searching.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Check for a cancelled context when opening a directory, and before+after
fetching directory contents/threads. Clean up the nesting of
fetchDirectoryContents by using what we already know about server
capabilities and using a switch statement.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Implement cancellation of cancellable requests. These include listing of
directory contents, searching, and sorting.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Implement cancellation of cancellable requests. These include listing of
directory contents, searching, and sorting.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a Context field to requests which we may want to cancel when
changing directories.
Add a Cancelled meta-message to inform the UI that a request was
cancelled (as opposed to Done or Error). Delete callbacks when a request
is Cancelled.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|