mailmd connect imap #
Connect an IMAP mailbox
Usage #
mailmd connect imapExamples #
mailmd connect imap --email you@fastmail.com
mailmd connect imap --account work --host imap.example.com --username you@example.com
printf '%s\n' "$PASSWORD" | mailmd connect imap --email you@example.com --host imap.example.com --password-stdin
mailmd connect imap --account work --include Junk
mailmd connect imap --account work --out ~/Documents/mail
mailmd connect imap --account workFlags #
--accountName for this account, also used as its archive folder (default: from the provider or address)--ca-filePEM file with the certificate of your server's own certificate authority. mailmd trusts it in addition to the system's certificates and saves it with the account--emailYour email address. mailmd fills in the server settings of known providers--excludeLeave out this folder and its subfolders. mailmd saves it with the account (repeat for more)--folderSync only this folder and its subfolders, like INBOX or 'Work/*', instead of the default folders. mailmd saves it with the account (repeat for more)--hostIMAP server, like imap.example.com--includeAlso sync this folder, like Junk, and keep the default folders. mailmd saves it with the account (repeat for more)--keep-rawAlso save each original message as an .eml file next to its Markdown file--outFolder that holds the account folders (default: ~/mail). An account named work gets ~/mail/work. A new folder doesn't move the mail that is already archived--password-stdinRead the password from the first line of standard input--portIMAP port (default: 993, or 143 with --tls starttls)--prefer-textUse the plain text part of a message instead of converting its HTML part--sinceFetch only mail received on or after this day, like 2025-01-31, or within an age like 30d, 12m or 2y--tlsHow to encrypt the connection: implicit or starttls--usernameLogin name (default: the email address)
Output #
Shows text you can read in your terminal.
Use --json to get JSON for scripts and other programs.
Preview changes #
This command changes things. Add --dry-run to see what it would change; nothing changes then.
Related commands #
- sync
- list accounts