1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2025-09-18 00:32:50 +02:00
aerc/worker/imap
Simon Martin d7b097f317 imap: always consider recently received unread messages as recent
We rely on IMAP's \Recent flag to trigger the new email hook, making it
unreliable since not all providers support that flag (it's been
deprecated in RFC 9051).

This patch implements the following heuristic to force the \Recent flag
on messages, regardless of what the server says, and "fixes" this
inconsistency across providers: a message is always considered having
the \Recent flag if:
 - The IMAP header cache is enabled, and
 - The message is not in the header cache, and
 - It's not marked as read, and
 - It's been received less than `check-mail` in the past

Signed-off-by: Simon Martin <simon@nasilyan.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2025-08-28 10:16:02 +02:00
..
extensions treewide: replace interface{} with any 2025-04-07 10:51:05 +02:00
cache.go imap: add rudimentary readonly support for labels in gmail 2025-06-20 09:30:44 +02:00
checkmail.go imap: workaround o365 bug upon new email 2025-06-20 09:02:01 +02:00
configure.go imap: always consider recently received unread messages as recent 2025-08-28 10:16:02 +02:00
configure_test.go imap: add support for :modify-labels / :tag for gmail and proton 2025-08-04 12:27:27 +02:00
connect.go imap: add support for plain auth 2025-01-16 21:00:47 +01:00
create.go go vet: composite literal uses unkeyed fields 2022-03-18 13:33:16 +01:00
expungehandler.go imap: do not ignore delete notifications linked to move actions 2025-06-11 10:12:09 +02:00
fetch.go imap: always consider recently received unread messages as recent 2025-08-28 10:16:02 +02:00
flags.go imap: add support for :modify-labels / :tag for gmail and proton 2025-08-04 12:27:27 +02:00
idler.go log: move package to lib 2024-02-14 23:04:38 +01:00
imap.go imap: strip whitespace from Message-Id and In-Reply-To 2024-10-24 22:13:51 +02:00
imap_test.go imap: strip whitespace from Message-Id and In-Reply-To 2024-10-24 22:13:51 +02:00
list.go imap: add support for :modify-labels / :tag for gmail and proton 2025-08-04 12:27:27 +02:00
movecopy.go imap: do not ignore delete notifications linked to move actions 2025-06-11 10:12:09 +02:00
observer.go treewide: replace interface{} with any 2025-04-07 10:51:05 +02:00
open.go imap: partially revert two recent patches 2025-04-02 17:33:48 +02:00
remove.go go vet: composite literal uses unkeyed fields 2022-03-18 13:33:16 +01:00
search.go chore: switch to using stdlib helper functions 2025-08-04 12:47:05 +02:00
search_test.go imap: fix processing of search criteria end date 2025-03-09 00:40:30 +01:00
seqmap.go chore: switch to using stdlib helper functions 2025-08-04 12:47:05 +02:00
seqmap_test.go imap: support various provider policies for expunge calls 2025-05-12 13:18:38 +02:00
worker.go imap: always consider recently received unread messages as recent 2025-08-28 10:16:02 +02:00