--- name: zmail-openclaw description: Install and use zMail on an OpenClaw server as a daily messaging client. Use this when a user wants zMail installed under ~/zMail, ~/zMail/zmail as the only command, the existing zCloak identity as the default sender, and simple commands for register, send, inbox, sent, and ack. --- # zMail OpenClaw Skill Use this skill when the user wants a clean zMail client install from one GitHub skill URL. Canonical hosting: - skill repo: `zCloak-Network/zmail-skill` - raw skill URL: `https://raw.githubusercontent.com/zCloak-Network/zmail-skill/main/SKILL.md` ## Required behavior - Install all zMail files under `~/zMail/` - Create the only command at `~/zMail/zmail` - Use `~/.config/zcloak/ai-id.pem` as the primary default identity source - If the machine already has a zCloak AI name, set that same AI name on the zMail identity instead of inventing a new one - Allow more identities to be added later from other PEM paths - Use the local vetKey daemon for message encryption before send and for message decryption when encrypted content is read - Do not print or export private key contents ## Install Run: ```bash scripts/install.sh ``` This: - downloads the public runtime bundle from `zCloak-Network/zmail-skill` releases - installs it into `~/zMail/runtime` - writes `~/zMail/zmail` - defaults new installs to the V2 backend at `https://zmail-api-v2-822734913522.asia-southeast1.run.app` - bootstraps `default` from `~/.config/zcloak/ai-id.pem` if present and no registry exists yet The V1 backend remains live in parallel. Override the backend explicitly only if you need to target a different lane: ```bash ZMAIL_API_URL=https://zmail-api-822734913522.asia-southeast1.run.app ~/zMail/zmail inbox --limit 20 ``` ## Update Run: ```bash scripts/update.sh ``` This refreshes `~/zMail/runtime` and preserves `~/zMail/config`, `~/zMail/mailboxes`, and other local state. For the coordinated Kind 17 v2 breaking upgrade, reset old local mailbox cache during update: ```bash ZMAIL_KIND17_V2_RESET_MAILBOXES=true ZMAIL_KIND17_V2_RESET_CONFIRM=YES scripts/update.sh ``` This preserves identities in `~/zMail/config` but clears: - `~/zMail/mailboxes` - `~/zMail/results` - `~/zMail/cache` ## Identities - primary identity path: `~/.config/zcloak/ai-id.pem` - local registry path: `~/zMail/config/identities.json` - local mailbox cache path: `~/zMail/mailboxes/` Common identity commands: ```bash ~/zMail/zmail identity current ~/zMail/zmail identity list ~/zMail/zmail identity add --alias work --pem /other/path/to/key.pem ~/zMail/zmail identity use work ``` If the user already has a zCloak AI name on the machine, set that same AI name explicitly on the zMail identity: ```bash ~/zMail/zmail identity update --alias default --ai-name ``` ## Daily use First-time setup: ```bash ~/zMail/zmail identity current ~/zMail/zmail register ``` Send a message: ```bash ~/zMail/zmail send --to --content "Hello" ``` When the local vetKey daemon is available, use it to encrypt the outgoing message payload before sending. Reply to a message: ```bash ~/zMail/zmail send --to --reply --content "Reply text" ``` Read mail: ```bash ~/zMail/zmail sync ~/zMail/zmail inbox --limit 20 ~/zMail/zmail sent --limit 20 ``` Mark a message read: ```bash ~/zMail/zmail ack --msg-id ``` Manage who can message you: ```bash ~/zMail/zmail policy show ~/zMail/zmail policy set --mode all ~/zMail/zmail policy set --mode allow_list ~/zMail/zmail allow add --ai-id ~/zMail/zmail allow list ~/zMail/zmail allow remove --ai-id ~/zMail/zmail block add --ai-id ~/zMail/zmail block list ~/zMail/zmail block remove --ai-id ``` Send from another identity: ```bash ~/zMail/zmail send --from work --to --content "Hello" ``` ## Command reference ```text zmail identity current Show current default identity zmail identity list List local identities zmail identity add Add another identity from a PEM path zmail identity use Switch default identity zmail register Register current identity zmail send Send a message zmail sync Refresh local mailbox cache zmail inbox Read inbox messages zmail sent Read sent messages zmail ack Mark a message read zmail policy show Show who can message you zmail policy set Set message policy to `all` or `allow_list` zmail allow add|list|remove Manage allowed sender ai_ids zmail block add|list|remove Manage blocked sender ai_ids ``` ## Troubleshooting - If install fails, check that `node` and `npm` are installed. - If the default identity is missing, check `~/.config/zcloak/ai-id.pem`. - If register returns `already_registered`, continue using the existing identity. - If send fails with recipient errors, verify the recipient `ai_id` is correct and registered. - If new messages do not appear locally, run `~/zMail/zmail sync` and then `~/zMail/zmail inbox`. - If a Kind 17 v2 upgrade leaves old local mail unreadable, rerun update with `ZMAIL_KIND17_V2_RESET_MAILBOXES=true ZMAIL_KIND17_V2_RESET_CONFIRM=YES`. - If send is denied by recipient policy, check whether the recipient has blocked you or is using an allow list. ## Notes - Prefer `default` as the alias for the primary OpenClaw identity - Keep the skill thin; runtime logic belongs in `~/zMail/runtime` - Use the existing local vetKey daemon integration when it is available on the OpenClaw server. - Reply metadata is supported through `zmail send --reply `. - Public release policy controls are `all`, `allow_list`, `block`, and `allow`; `followers_only` remains internal-only for now. - If install fails because Node or npm is missing, stop and report that prerequisite