Context
The IMAP sync added in #193 warns and ignores the --after/--before flags for IMAP sources. Gmail sync supports these via search query syntax (after: / before:), but IMAP has no equivalent pass-through.
Proposal
Use IMAP SEARCH SINCE <date> and SEARCH BEFORE <date> criteria when --after / --before flags are provided. These operate on INTERNALDATE (date-only, no time component), which matches Gmail's behavior.
This would allow targeted date-range syncs for large IMAP mailboxes:
msgvault sync-full imaps://user@imap.mail.yahoo.com:993 --after 2024-01-01 --before 2024-12-31
Current behavior
Warning: --query/--before/--after are not supported for IMAP sources and will be ignored.
References
Context
The IMAP sync added in #193 warns and ignores the
--after/--beforeflags for IMAP sources. Gmail sync supports these via search query syntax (after:/before:), but IMAP has no equivalent pass-through.Proposal
Use IMAP
SEARCH SINCE <date>andSEARCH BEFORE <date>criteria when--after/--beforeflags are provided. These operate onINTERNALDATE(date-only, no time component), which matches Gmail's behavior.This would allow targeted date-range syncs for large IMAP mailboxes:
Current behavior
References