Fastmail Suite
Use the bundled scripts (stdlib-only) to interact with Fastmail safely.
Quick start
Set credentials/tokens:
# JMAP token (Mail + Contacts scopes)
export FASTMAIL_TOKEN='…'
# CalDAV app password (calendar)
export FASTMAIL_CALDAV_USER='you@yourdomain'
export FASTMAIL_CALDAV_PASS='app-password'
# Optional: redact output (default is 1)
export FASTMAIL_REDACT=1
Verify setup:
python3 skills/fastmail-suite/scripts/suite.py status
Suite CLI (v0.2)
Status / onboarding checks
python3 skills/fastmail-suite/scripts/suite.py status
Expected style:
Mail (JMAP): OK / MISSING TOKEN / AUTH FAILED
Calendar (CalDAV): OK / MISSING APP PASSWORD / AUTH FAILED
Contacts (JMAP): OK / MISSING TOKEN / AUTH FAILED
Inbox triage
python3 skills/fastmail-suite/scripts/suite.py triage today
python3 skills/fastmail-suite/scripts/suite.py triage last-7d
Triage summarizes:
- top senders,
- action-needed subject patterns (
invoice, bill, payment, due, confirm, action required, reminder, ...),
- highlights for
friends.tas.edu.au and bill/payment-like items.
Search
python3 skills/fastmail-suite/scripts/suite.py search "from:billing@ subject:invoice last:7d"
python3 skills/fastmail-suite/scripts/suite.py search "has:attachment before:2026-02-01 tax"
python3 skills/fastmail-suite/scripts/suite.py search "after:2026-02-01 reminder"
Supported query tokens:
from:foo
subject:bar
has:attachment
last:7d (and other Nd forms)
before:YYYY-MM-DD
after:YYYY-MM-DD
- Bare words → subject/body text search
Thread summary
python3 skills/fastmail-suite/scripts/suite.py thread <email-id>
python3 skills/fastmail-suite/scripts/suite.py thread <thread-id>
python3 skills/fastmail-suite/scripts/suite.py thread "school invoice"
Shows concise thread summary:
- participants,
- rough timeline,
- latest 1–2 messages with short plain-text summary.
Other existing scripts
Email (JMAP)
python3 skills/fastmail-suite/scripts/fastmail.py mail inbox --limit 20
python3 skills/fastmail-suite/scripts/fastmail.py mail search "invoice" --limit 10
python3 skills/fastmail-suite/scripts/fastmail.py mail read <email-id>
Contacts (JMAP)
python3 skills/fastmail-suite/scripts/fastmail.py contacts list --limit 20
python3 skills/fastmail-suite/scripts/fastmail.py contacts search "alice" --limit 5
python3 skills/fastmail-suite/scripts/fastmail.py contacts get <contact-id>
Calendar (CalDAV)
python3 skills/fastmail-suite/scripts/fastmail.py calendar calendars
python3 skills/fastmail-suite/scripts/fastmail.py calendar upcoming --days 7
Security & Credentials (important)
Fastmail Suite works with real Fastmail credentials, so the design is intentionally conservative.
Required
FASTMAIL_TOKEN — Fastmail JMAP API token (Mail + Contacts scopes). Best practice is to use a read-only token for normal usage.
Optional but supported
FASTMAIL_TOKEN_SEND — separate JMAP token with Email Submission scope for sending mail. Only used if you explicitly enable writes.
FASTMAIL_CALDAV_USER / FASTMAIL_CALDAV_PASS — Fastmail app password for calendar (CalDAV).
FASTMAIL_REDACT — controls redaction of output (default 1 = redacted).
FASTMAIL_ENABLE_WRITES — when set to 1, enables write operations (send/move/update). Omit or set to 0 to keep read-only.
Safety model
Redaction is ON by default
Output is redacted unless you pass --raw where supported. FASTMAIL_REDACT=1 is the default.
Writes are OFF by default
The skill will not send/move/update anything unless FASTMAIL_ENABLE_WRITES=1 and you have provided appropriate tokens (for example FASTMAIL_TOKEN_SEND for sending mail).
Separation of roles
You can keep a strict separation:
- Email reading:
FASTMAIL_TOKEN
- Email sending:
FASTMAIL_TOKEN_SEND (optional, only when writes are enabled)
- Calendar:
FASTMAIL_CALDAV_USER + FASTMAIL_CALDAV_PASS (Fastmail app password)
Read-only mode is fully supported
You can run the entire suite (status, triage, search, thread, contacts, calendar read) with a read-only JMAP token + calendar app password, without ever enabling writes.
Changelog
v0.1.1
- Contacts commands (
list, search, get) tested against real Fastmail accounts.
suite.py status now probes Contacts via JMAP and reports Contacts (JMAP) health.
v0.2
- Added
scripts/suite.py with onboarding status checks for JMAP + CalDAV.
- Added mail workflows:
triage today
triage last-7d
search <query> with token parser (from:, subject:, has:attachment, last:, before:, after:)
thread <id-or-snippet> conversation summary
- Added wrapper passthrough in
scripts/fastmail.py for suite ....
- Added quick-start and usage examples for status/triage/search/thread.
1---
2name: fastmail-suite
3description: Secure, safe-by-default Fastmail integration (email, contacts, calendar) via JMAP + CalDAV. Use when you want to verify Fastmail setup, triage/search email, inspect threads, read/search contacts, view upcoming events, or (only when explicitly enabled) send email and create/reschedule/cancel calendar events. Designed for least-privilege tokens, redacted output by default, and explicit write enable switches.
4env:
5 FASTMAIL_TOKEN:
6 required: true
7 description: "Fastmail JMAP API token (Mail + Contacts scopes). Read-only is recommended by default."
8 FASTMAIL_TOKEN_SEND:
9 required: false
10 description: "Optional Fastmail JMAP token with Email Submission scope for sending mail. Only needed when writes are explicitly enabled."
11 FASTMAIL_CALDAV_USER:
12 required: false
13 description: "Username/email for Fastmail CalDAV (calendar app password). Required for calendar features."
14 FASTMAIL_CALDAV_PASS:
15 required: false
16 description: "Fastmail CalDAV app password used for calendar access."
17 FASTMAIL_REDACT:
18 required: false
19 description: "Controls redaction of output (default 1 = redacted)."
20 FASTMAIL_ENABLE_WRITES:
21 required: false
22 description: "When set to 1, enables write operations (send/move/update). Omit or 0 to keep read-only."
23metadata:
24 source: https://skillmd.com/skills/modbender/fastmail-suite
25 openclaw:
26 emoji: 📧
27---
28
29# Fastmail Suite
30
31Use the bundled scripts (stdlib-only) to interact with Fastmail **safely**.
32
33## Quick start
34
35Set credentials/tokens:
36
37```bash
38# JMAP token (Mail + Contacts scopes)
39export FASTMAIL_TOKEN='…'
40
41# CalDAV app password (calendar)
42export FASTMAIL_CALDAV_USER='you@yourdomain'
43export FASTMAIL_CALDAV_PASS='app-password'
44
45# Optional: redact output (default is 1)
46export FASTMAIL_REDACT=1
47```
48
49Verify setup:
50
51```bash
52python3 skills/fastmail-suite/scripts/suite.py status
53```
54
55## Suite CLI (v0.2)
56
57### Status / onboarding checks
58
59```bash
60python3 skills/fastmail-suite/scripts/suite.py status
61```
62
63Expected style:
64- `Mail (JMAP): OK` / `MISSING TOKEN` / `AUTH FAILED`
65- `Calendar (CalDAV): OK` / `MISSING APP PASSWORD` / `AUTH FAILED`
66- `Contacts (JMAP): OK` / `MISSING TOKEN` / `AUTH FAILED`
67
68### Inbox triage
69
70```bash
71python3 skills/fastmail-suite/scripts/suite.py triage today
72python3 skills/fastmail-suite/scripts/suite.py triage last-7d
73```
74
75Triage summarizes:
76- top senders,
77- action-needed subject patterns (`invoice`, `bill`, `payment`, `due`, `confirm`, `action required`, `reminder`, ...),
78- highlights for `friends.tas.edu.au` and bill/payment-like items.
79
80### Search
81
82```bash
83python3 skills/fastmail-suite/scripts/suite.py search "from:billing@ subject:invoice last:7d"
84python3 skills/fastmail-suite/scripts/suite.py search "has:attachment before:2026-02-01 tax"
85python3 skills/fastmail-suite/scripts/suite.py search "after:2026-02-01 reminder"
86```
87
88Supported query tokens:
89- `from:foo`
90- `subject:bar`
91- `has:attachment`
92- `last:7d` (and other `Nd` forms)
93- `before:YYYY-MM-DD`
94- `after:YYYY-MM-DD`
95- Bare words → subject/body text search
96
97### Thread summary
98
99```bash
100python3 skills/fastmail-suite/scripts/suite.py thread <email-id>
101python3 skills/fastmail-suite/scripts/suite.py thread <thread-id>
102python3 skills/fastmail-suite/scripts/suite.py thread "school invoice"
103```
104
105Shows concise thread summary:
106- participants,
107- rough timeline,
108- latest 1–2 messages with short plain-text summary.
109
110## Other existing scripts
111
112### Email (JMAP)
113
114```bash
115python3 skills/fastmail-suite/scripts/fastmail.py mail inbox --limit 20
116python3 skills/fastmail-suite/scripts/fastmail.py mail search "invoice" --limit 10
117python3 skills/fastmail-suite/scripts/fastmail.py mail read <email-id>
118```
119
120### Contacts (JMAP)
121
122```bash
123python3 skills/fastmail-suite/scripts/fastmail.py contacts list --limit 20
124python3 skills/fastmail-suite/scripts/fastmail.py contacts search "alice" --limit 5
125python3 skills/fastmail-suite/scripts/fastmail.py contacts get <contact-id>
126```
127
128### Calendar (CalDAV)
129
130```bash
131python3 skills/fastmail-suite/scripts/fastmail.py calendar calendars
132python3 skills/fastmail-suite/scripts/fastmail.py calendar upcoming --days 7
133```
134
135## Security & Credentials (important)
136
137Fastmail Suite works with real Fastmail credentials, so the design is intentionally conservative.
138
139### Required
140- `FASTMAIL_TOKEN` — Fastmail JMAP API token (Mail + Contacts scopes). Best practice is to use a **read-only** token for normal usage.
141
142### Optional but supported
143- `FASTMAIL_TOKEN_SEND` — separate JMAP token with Email Submission scope for **sending mail**. Only used if you explicitly enable writes.
144- `FASTMAIL_CALDAV_USER` / `FASTMAIL_CALDAV_PASS` — Fastmail app password for **calendar** (CalDAV).
145- `FASTMAIL_REDACT` — controls redaction of output (default `1` = redacted).
146- `FASTMAIL_ENABLE_WRITES` — when set to `1`, enables write operations (send/move/update). Omit or set to `0` to keep read-only.
147
148### Safety model
149- **Redaction is ON by default**
150 Output is redacted unless you pass `--raw` where supported. `FASTMAIL_REDACT=1` is the default.
151
152- **Writes are OFF by default**
153 The skill will not send/move/update anything unless `FASTMAIL_ENABLE_WRITES=1` *and* you have provided appropriate tokens (for example `FASTMAIL_TOKEN_SEND` for sending mail).
154
155- **Separation of roles**
156 You can keep a strict separation:
157 - **Email reading:** `FASTMAIL_TOKEN`
158 - **Email sending:** `FASTMAIL_TOKEN_SEND` (optional, only when writes are enabled)
159 - **Calendar:** `FASTMAIL_CALDAV_USER` + `FASTMAIL_CALDAV_PASS` (Fastmail app password)
160
161- **Read-only mode is fully supported**
162 You can run the entire suite (status, triage, search, thread, contacts, calendar read) with a **read-only JMAP token + calendar app password**, without ever enabling writes.
163
164## Changelog
165
166### v0.1.1
167- Contacts commands (`list`, `search`, `get`) tested against real Fastmail accounts.
168- `suite.py status` now probes Contacts via JMAP and reports `Contacts (JMAP)` health.
169
170### v0.2
171- Added `scripts/suite.py` with onboarding `status` checks for JMAP + CalDAV.
172- Added mail workflows:
173 - `triage today`
174 - `triage last-7d`
175 - `search <query>` with token parser (`from:`, `subject:`, `has:attachment`, `last:`, `before:`, `after:`)
176 - `thread <id-or-snippet>` conversation summary
177- Added wrapper passthrough in `scripts/fastmail.py` for `suite ...`.
178- Added quick-start and usage examples for status/triage/search/thread.