Registration Scanner
Scans one or more email accounts for registration-related emails and returns a deduplicated, date-sorted list of every service the user has ever signed up for.
Supported Providers
| Provider | Access Method |
|---|
| Gmail | Gmail tool / MCP connector |
| iCloud Mail |
IMAP – imap.mail.me.com:993 |
| Outlook / Hotmail / Live | IMAP – outlook.office365.com:993 |
| Yahoo Mail | IMAP – imap.mail.yahoo.com:993 |
| AOL Mail | IMAP – imap.aol.com:993 |
| GMX | IMAP – imap.gmx.net:993 |
| Web.de | IMAP – imap.web.de:993 |
| T-Online | IMAP – secureimap.t-online.de:993 |
| Fastmail | IMAP – imap.fastmail.com:993 |
| Proton Mail | IMAP Bridge – 127.0.0.1:1143 (Bridge required) |
Full provider details and IMAP setup guides → {baseDir}/references/providers.md
Step 1 – Identify Accounts
Ask the user which email accounts to scan before doing anything else:
"Which email accounts should I scan? (e.g. Gmail, iCloud, Outlook, Yahoo, AOL, GMX, Web.de, T-Online, Fastmail, Proton – or all of them?)"
Wait for the answer. Do not proceed until the user has confirmed.
Step 2 – Collect Credentials
Gmail
Use the Gmail tool or Gmail MCP connector if already configured.
If not configured, tell the user:
"Please connect your Gmail account first via openclaw configure or by enabling the Gmail MCP connector."
IMAP Providers (iCloud, Outlook, Yahoo, AOL, GMX, Web.de, T-Online, Fastmail)
Explain to the user:
"For [provider] I need your email address and an app-specific password (not your regular login password). You can generate one in your account's security settings. I will use it only for this session and never store it in plain text."
Refer to provider-specific instructions for generating app passwords → INLINECODE2
Proton Mail
Proton Mail requires the
Proton Mail Bridge to be running locally.
"For Proton Mail, please make sure the Proton Mail Bridge is running. I will connect to it locally at 127.0.0.1:1143."
Step 3 – Run the Scan
Gmail
Use the Gmail tool to search with these queries in sequence. Collect all matching message IDs.
Search queries across all languages → INLINECODE3
IMAP Accounts
Use the Python script at
{baseDir}/scripts/imap_scan.py to connect and search:
CODEBLOCK0
The script runs all search query batches automatically and returns a JSON list of matches.
Run this for each IMAP account separately, saving results to different temp files.
Step 4 – Parse and Deduplicate Results
For every matched email:
- 1. Extract:
From, Date, INLINECODE7 - Derive the service name from the sender domain or subject line
Example:
noreply@spotify.com →
Spotify,
hello@notion.so →
Notion
- 3. Deduplicate by service: keep only the oldest entry per service (= original registration)
- Skip: transactional emails (password resets, receipts), pure newsletters with no registration context, internal/personal senders
Step 5 – Output
Present the final list sorted newest first. Use this format:
CODEBLOCK1
If multiple accounts were scanned, merge all results into one unified list sorted by date.
After showing the list, ask:
"Should I save this as a file? Or filter by a specific service or date range?"
Error Handling
- - IMAP auth failure: Ask the user to re-check their app password. Refer to
{baseDir}/references/providers.md for setup steps. - IMAP not enabled: iCloud, Yahoo, Outlook may require IMAP to be turned on in account settings. Provider guide → INLINECODE13
- Proton Bridge not running: Instruct the user to start the Proton Mail Bridge app first.
- Rate limiting: Pause 1–2 seconds between search batches to avoid being throttled.
- Large mailbox: Inform the user of progress. Large inboxes (100k+ emails) may take several minutes.
Privacy & Security Rules
- - Never display passwords, app keys, or credentials in output or logs.
- Use OpenClaw's Secret Store for credentials whenever possible.
- Delete temp files (
/tmp/registration_scan_*.json) after the session ends. - Do not send any email content to external services.
注册扫描器
扫描一个或多个邮箱账户中的注册相关邮件,并返回用户曾注册过的所有服务的去重、按日期排序的列表。
支持的邮箱提供商
| 提供商 | 访问方式 |
|---|
| Gmail | Gmail工具 / MCP连接器 |
| iCloud Mail |
IMAP – imap.mail.me.com:993 |
| Outlook / Hotmail / Live | IMAP – outlook.office365.com:993 |
| Yahoo Mail | IMAP – imap.mail.yahoo.com:993 |
| AOL Mail | IMAP – imap.aol.com:993 |
| GMX | IMAP – imap.gmx.net:993 |
| Web.de | IMAP – imap.web.de:993 |
| T-Online | IMAP – secureimap.t-online.de:993 |
| Fastmail | IMAP – imap.fastmail.com:993 |
| Proton Mail | IMAP桥接 – 127.0.0.1:1143(需运行桥接程序) |
完整的提供商详情和IMAP设置指南 → {baseDir}/references/providers.md
步骤1 – 确认账户
在执行任何操作前,先询问用户要扫描哪些邮箱账户:
我应该扫描哪些邮箱账户?(例如:Gmail、iCloud、Outlook、Yahoo、AOL、GMX、Web.de、T-Online、Fastmail、Proton – 或者全部扫描?)
等待用户回答。在用户确认之前不要继续。
步骤2 – 收集凭证
Gmail
如果已配置,使用Gmail工具或Gmail MCP连接器。
如果未配置,告知用户:
请先通过 openclaw configure 或启用Gmail MCP连接器来连接您的Gmail账户。
IMAP提供商(iCloud、Outlook、Yahoo、AOL、GMX、Web.de、T-Online、Fastmail)
向用户说明:
对于[提供商],我需要您的邮箱地址和一个应用专用密码(不是您的常规登录密码)。您可以在账户的安全设置中生成一个。我仅会在本次会话中使用它,绝不会以明文形式存储。
关于生成应用密码的提供商特定说明 → {baseDir}/references/providers.md
Proton Mail
Proton Mail需要在本地运行
Proton Mail桥接程序。
对于Proton Mail,请确保Proton Mail桥接程序正在运行。我将在本地通过127.0.0.1:1143连接。
步骤3 – 执行扫描
Gmail
使用Gmail工具按顺序执行以下搜索查询。收集所有匹配的邮件ID。
所有语言的搜索查询 → {baseDir}/references/search-queries.md
IMAP账户
使用位于 {baseDir}/scripts/imap_scan.py 的Python脚本进行连接和搜索:
bash
python3 {baseDir}/scripts/imap_scan.py \
--host imap.mail.me.com \
--port 993 \
--user user@icloud.com \
--password app-specific-password \
--output /tmp/registrationscanresults.json
该脚本会自动运行所有搜索查询批次,并返回匹配结果的JSON列表。
为每个IMAP账户分别运行此脚本,将结果保存到不同的临时文件中。
步骤4 – 解析和去重结果
对于每封匹配的邮件:
- 1. 提取:发件人、日期、主题
- 从发件人域名或主题行中推导出服务名称
示例:noreply@spotify.com → Spotify,hello@notion.so → Notion
- 3. 按服务去重:每个服务仅保留最早的条目(即原始注册邮件)
- 跳过:事务性邮件(密码重置、收据)、无注册背景的纯新闻通讯、内部/个人发件人
步骤5 – 输出
按最新在前的顺序呈现最终列表。使用以下格式:
📋 已注册服务 – [账户名称]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
发现:XX个服务 | 时间范围:YYYY – YYYY
YYYY-MM-DD 服务名称
发件人:sender@domain.com
YYYY-MM-DD 服务名称
发件人:sender@domain.com
...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
如果扫描了多个账户,将所有结果合并为一个按日期排序的统一列表。
显示列表后,询问:
是否要将此保存为文件?或者按特定服务或日期范围进行筛选?
错误处理
- - IMAP认证失败:请用户重新检查其应用密码。设置步骤请参考 {baseDir}/references/providers.md。
- IMAP未启用:iCloud、Yahoo、Outlook可能需要在账户设置中开启IMAP。提供商指南 → {baseDir}/references/providers.md
- Proton桥接未运行:指示用户先启动Proton Mail桥接程序。
- 速率限制:在搜索批次之间暂停1-2秒,以避免被限制。
- 大容量邮箱:告知用户进度。大容量收件箱(10万+封邮件)可能需要几分钟时间。
隐私与安全规则
- - 绝不在输出或日志中显示密码、应用密钥或凭证。
- 尽可能使用OpenClaw的密钥存储来管理凭证。
- 会话结束后删除临时文件(/tmp/registrationscan*.json)。
- 不向外部服务发送任何邮件内容。