Synopsis

perch mail list [OPTIONS]

Description

List mailboxes on the selected IMAP server. The default output is a table; –json writes one JSON object per line.

Aliases: ls.

Notes

  • –subscribed requires server support for LIST-EXTENDED.

Options

OptionDescription
--username, -u <value>account username (env PERCH_IMAP_USER)
--password <value>account password (prefer PERCH_IMAP_PASSWORD or –password-file)
--password-file <value>read the account password from a file
--password-stdinread the account password from stdin
--timeout <value>connection timeout (default: 30s)
--config <value>configuration file (default: ~/.config/perch/perch.yaml)
--jsonwrite one JSON object per mailbox
--subscribedonly list subscribed mailboxes
--server, -s <value>IMAP server (imaps://host, imap://host, or host[:port]); defaults from –config
--plaintextconnect to IMAP without TLS (use only on trusted networks)
--starttlsrequire STARTTLS for IMAP
--insecureskip IMAP TLS certificate verification
--ca-file <value>PEM CA bundle used to verify the IMAP server certificate
--help, -hshow help

Examples

perch mail list --server 127.0.0.1:1143 --plaintext --username you@example.com

perch mail list --server imaps://mail.example.com --username you@example.com --json

Environment

VariablePurpose
PERCH_IMAP_USERdefault account username
PERCH_IMAP_PASSWORDaccount password

See also