mailmd sync #

Copy new mail into the archive

Usage #

mailmd sync [account...]

Examples #

mailmd sync
mailmd sync work
mailmd sync work --since 12m --exclude Newsletters
mailmd sync work --folder Junk --dry-run
mailmd sync --dry-run
mailmd sync --quiet

Flags #

  • --exclude Leave out this folder and its subfolders in this run. It isn't saved (repeat for more)
  • --folder Sync only this folder and its subfolders in this run, like INBOX or Junk. It isn't saved (repeat for more)
  • --keep-raw Also save each original message as an .eml file next to its Markdown file
  • --max-message-bytes Save only the headers of a message larger than this many bytes
  • --out Folder that holds the account folders, for this run instead of the saved --out
  • --prefer-text Use the plain text part of a message instead of converting its HTML part
  • --since Fetch only mail received on or after this day, like 2025-01-31, or within an age like 30d, 12m or 2y

Output #

Shows text you can read in your terminal.

Use --json to get JSON for scripts and other programs.

Use --plain to get text without color or formatting.

Use --jq to filter the JSON output with a jq expression.

Use --template to format the output with a Go template.

Preview changes #

This command changes things. Add --dry-run to see what it would change; nothing changes then.

  • status
  • list folders
  • connect