Skip to content

import-mbox: support multiple labels (repeated --label or comma-separated) #189

@endolith

Description

@endolith

The docs say --label is "Label to apply to all imported messages" but don’t say whether multiple labels are supported. They aren’t: only a single --label is accepted.

Request: Support multiple labels per import, e.g.:

  • Repeated flag: --label inbox --label archive --label "Local Folders"
  • Or comma-separated: --label inbox,archive,backup
  • Or both (common in CLI tools using Cobra’s StringSliceVar)

Use case: importing several mbox sources (e.g. IMAP folder, POP backup, “Local folders”) and tagging each with one or more labels (e.g. original folder name) so they can be filtered and distinguished after import, while still deduplicating by message content.

Note: If multiple labels are supported, duplicate labels (e.g. --label a --label a or --label a,a) should be deduplicated so they don’t cause a primary key violation on message_labels.

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