]> Sergey Matveev's repositories - public-inbox.git/commit
lei <q|up>: set \Recent on non-empty mbox and Maildir
authorEric Wong <e@80x24.org>
Sun, 23 May 2021 08:01:16 +0000 (08:01 +0000)
committerEric Wong <e@80x24.org>
Sun, 23 May 2021 19:35:08 +0000 (19:35 +0000)
commit2d4ac1c886908bb1d79592913a2a2037a1a024e7
treef7ff06a9bad613145a8e98995fc82a13aa9e0d61
parent4dea62be127c79cafcbda6ded7988fd8db3439f0
lei <q|up>: set \Recent on non-empty mbox and Maildir

Despite JMAP not supporting the equivalent of the IMAP \Recent
flag, it is useful for "lei q --augment", and "lei up" users to
be able to distinguish new results from old-but-unread messages
in an mbox or Maildir.

For mbox family messages, we'll drop the "O" status flag when
appending to mboxes, and we'll write to the "new" subdirectory
of Maildirs.

Behavior when writing to initially empty Maildirs and mboxes
remains unchanged since there's no need to distinguish between
new and old results in the initial case.  Having users wait
for a rename(2) storm or complete mbox rewrite hurts UX.

With IMAP mailboxes, \Recent is already enforced by the IMAP
server and IMAP clients have no way of changing it(*)

(*) mutt uses the "Old" IMAP flag which isn't part of RFC 3501,
    other MUAs may do similar things.
lib/PublicInbox/LeiDedupe.pm
lib/PublicInbox/LeiSavedSearch.pm
lib/PublicInbox/LeiToMail.pm
lib/PublicInbox/LeiXSearch.pm
t/lei-q-kw.t
t/lei-q-save.t
t/lei_to_mail.t