1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2025-09-16 14:32:50 +02:00
aerc/worker
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
..
handlers watchers: move filesystem monitoring stuff in lib 2023-08-04 11:32:40 +02:00
imap imap: always consider recently received unread messages as recent 2025-08-28 10:16:02 +02:00
jmap tag: allow to toggle tags 2025-03-30 22:10:58 +02:00
lib treewide: replace interface{} with any 2025-04-07 10:51:05 +02:00
maildir chore: switch to using stdlib helper functions 2025-08-04 12:47:05 +02:00
mbox chore: switch to using stdlib helper functions 2025-08-04 12:47:05 +02:00
middleware foldermap: map directory in Messages{Moved,Copied} and RemoveDirectory 2025-03-30 21:31:28 +02:00
notmuch mod: update go-maildir 2025-05-25 19:05:07 +02:00
types chore: switch to using stdlib helper functions 2025-08-04 12:47:05 +02:00
handler_notmuch.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
worker.go aerc: use single event loop 2022-10-07 10:51:53 +02:00
worker_enabled.go watchers: move filesystem monitoring stuff in lib 2023-08-04 11:32:40 +02:00