360 Secure SkillHub
360 安全技能中心

Manage your tuta.com account

使用 Python 客户端调用 Tuta REST API,支持登录并复用会话、列出收件箱、读取解密邮件和向外部收件人发送邮件;不支持向其他 Tuta 用户发信或发送附件,API 版本头固定为 84。

aididmyhomework
aididmyhomework
热度 82.94
最近更新 2026-05-18 12:27:06
分类:协作依赖:代码执行 / 第三方 API / 读写文件应用场景:邮件起草 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add tutacom
Metadata
name
tuta-mail
description
Send, read, and manage emails via Tuta (formerly Tutanota) encrypted email service. Use when user asks to send emails, check inbox, read mail, or do any email operations through their Tuta account. Triggers on phrases like email, send email, check inbox, Tuta, Tutanota, mail, read email, compose email.

Tuta Mail

Interact with Tuta (Tutanota) encrypted email via the undocumented REST API at https://app.tuta.com/rest/. All content is E2E encrypted — the client handles crypto locally.

Prerequisites

Python 3 with: requests, pycryptodome, bcrypt, argon2-cffi.

Install if missing:

python3 -m pip install --break-system-packages requests pycryptodome bcrypt argon2-cffi

Credentials

Store in openclaw.json under skills.entries.tuta-mail.env:

  • TUTA_EMAIL — Tuta email address
  • TUTA_PASSWORD — account password

Usage

All commands via scripts/tuta_client.py (resolve path relative to this skill directory).

Login (always do first)

python3 scripts/tuta_client.py login \
  --email "$TUTA_EMAIL" --password "$TUTA_PASSWORD" \
  --session-file /tmp/tuta_session.json

Saves session (access token + decrypted keys) to the session file. Reuse until it expires.

List Inbox

python3 scripts/tuta_client.py inbox \
  --session-file /tmp/tuta_session.json --count 20

Returns JSON array with id, subject, sender, date, unread for each mail.

Read Email

python3 scripts/tuta_client.py read \
  --mail-id "listId/elementId" \
  --session-file /tmp/tuta_session.json

Use the id from inbox listing. Returns decrypted subject, sender, date, body.

Send Email (External Recipients)

python3 scripts/tuta_client.py send \
  --to "recipient@example.com" \
  --subject "Subject line" \
  --body "Email body text" \
  --sender-name "Display Name" \
  --session-file /tmp/tuta_session.json

Sends non-confidential email to external (non-Tuta) recipients. Creates draft then sends.

Workflow

  1. Login once per session → cache /tmp/tuta_session.json
  2. If any command returns auth error (401/403), re-login
  3. For inbox checks: login → inbox → optionally read specific mails
  4. For sending: login → send

Limitations

  • Tuta-to-Tuta emails: Sending to other Tuta users requires public key exchange (not yet implemented). Reading Tuta-to-Tuta received mail works.
  • Attachments: Not yet supported for sending.
  • API versioning: The v header is set to 84; may need updating if Tuta changes their API version.
  • Newer accounts: Argon2id key derivation is supported but less tested than bcrypt (legacy).