Skip to content

IMAP: support --after/--before date filtering #195

@wesm

Description

@wesm

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://[email protected]: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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions