Skip to content

IMAP: support password via environment variable for CI/Docker #197

@wesm

Description

@wesm

Context

The add-imap command added in #193 only accepts passwords via interactive term.ReadPassword() prompt. This blocks headless/automated use cases like Docker containers and CI pipelines.

Proposal

Support an environment variable (e.g. MSGVAULT_IMAP_PASSWORD) as a fallback when stdin is not a terminal. Print a security warning when the env var path is used, recommending the interactive prompt for human users.

# Docker / CI usage
MSGVAULT_IMAP_PASSWORD="app-password-here" msgvault add-imap --host imap.mail.yahoo.com --username [email protected]

The password should never be accepted via CLI flag (visible in shell history and ps output).

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