Skip to content

jmapcli 1.7.3

Choose a tag to compare

@jasonhollis jasonhollis released this 10 Nov 01:44

jmapcli 1.7.3

brew install boogie-digital/boogie/jmapcli
brew upgrade boogie-digital/boogie/jmapcli

Sign-in fix for Keychain items created by another program, and sync deltas. Built against JMAPClient main 3bc5674 (the merge of unit/keychain-owner-replace: Keychain GREEN 17389bb + 154c485, sync GREEN f4a5b05).

Fixed

  • Sign-in no longer fails with unexpectedStatus(-25244) when a Keychain item for the account was created by another program. macOS refuses to change such an item ("Invalid attempt to change the owner of this item"). jmapcli now deletes it and saves the new one when macOS allows the delete; otherwise sign-in fails with a message naming the item and, when deleting it by hand can help, the command to remove it. If the delete succeeds but saving the new item then fails, the message says the previous item was removed. Only that refusal leads to a replace: when macOS refuses the save for another reason (for example a locked keychain or a denied access prompt), sign-in fails with a message and no item is deleted.
  • Other items for the account. Sign-in keeps one kind of credential per account and removes the others, writing the new one first. With --oauth, a jmap-password or jmap-token item that macOS will not delete because another program owns it is left in place and the sign-in is saved; the OAuth credential is the one used (any other refusal fails the sign-in with a message naming the item). With --password or --token, a jmap-oauth item that macOS will not delete (or, with --password, a jmap-token item) would be used instead of the new credential, so sign-in fails with a message naming that item; the new secret has been written and the old item still works until it is removed.
  • Keychain errors name the service, the account and the reason, for example Keychain refused to save the jmap-oauth item for you@example.com (status -25244: Invalid attempt to change the owner of this item). If it persists: security delete-generic-password -s jmap-oauth -a 'you@example.com'. The security line is shown only when deleting the item by hand can help. No secret is ever printed.
  • sync does deltas again. 1.7.2 printed <Type>: Full re-sync required (state expired) on every run. One saved-state file served every account, so state from one account was sent to another server (Stalwart account ids such as s repeat across servers), and a refused delta was never recovered from. Sync state is now kept per account, keyed by the server's JMAP API URL and the account id, in ~/.config/jmapcli/sync-state/. A type whose saved state the server cannot use, or that has none (for example calendars added later), is re-seeded once and reported as <Type>: no usable saved state for this account; re-seeded (changes since the last sync were not listed); the next run lists changes. The old ~/.config/jmapcli/sync_state.json cannot be tied to an account, so it is no longer read and is left as it is; run jmapcli sync --initialize once per account. MCP mail.sync uses the same per-account state. JMAPClient GREEN f4a5b05 (RED 179c18f).
  • --version reports 1.7.3 (core <sha>).

Signed binary: jmapcli-1.7.3.tar.gz, sha256 d522cc06b1ca1cb565394a4f967389c09bdb1a3260d8435e1e39032a688ec55f.