Most commands take -a / --account EMAIL. If you omit it, mailkit uses:
  1. The stored default, else
  2. The only authorized account, else
  3. An error asking you to pass --account or set a default.

List

mailkit auth list
Example:
you@gmail.com  [gmail]  (default)
you@fastmail.com  [fastmail]
you@proton.me  [protonmail]
The tag in brackets is the provider. It decides which verbs work. See Providers.

Default

mailkit auth default you@gmail.com

Health check

mailkit auth doctor
mailkit auth doctor --json
mailkit auth doctor -a you@proton.me --json
JSON items look like:
{
  "account": "you@gmail.com",
  "provider": "gmail",
  "ok": true,
  "error": null
}
Exit code is non-zero if any checked account fails.
  • Gmail: refreshes the OAuth token against Google.
  • Fastmail: fetches the JMAP session.
  • Proton Mail: logs into Bridge IMAP.
Safe to run any time. It does not send mail.

Remove (local)

mailkit auth remove you@gmail.com
This deletes the Keychain items on this Mac. It does not revoke the app at Google, Fastmail, or Proton. Revoke there separately if you want that.

Multi-account

One Google Desktop client serves every Gmail account. Add more with mailkit auth add other@gmail.com. Mix providers on the same machine. Always pass -a when the default is not the mailbox you mean. Next: Providers.