Skulk Email
Read and send email via DreamHost. Optionally read a shared Gmail inbox.
Key feature: Sending works from VPS providers that block SMTP (DigitalOcean, etc.) by routing through DreamHost's Roundcube webmail over HTTPS. No third parties. No relay services.
Requirements
- - python3 — IMAP operations
- curl — Roundcube webmail sending
- jq — credential file parsing
- DreamHost mailbox — email address + password
- Credential file — stored locally at
~/.config/skulk-email/credentials.json (never transmitted beyond DreamHost servers)
Security
- - Credentials are read from a local JSON file with strict permissions (700 dir, 600 file)
- Passwords are only sent over TLS: IMAP SSL (port 993) and HTTPS (port 443)
- No credentials are logged, cached, or sent to any third party
- Cookie files used for Roundcube sessions are per-process and cleaned up on exit
Setup
1. DreamHost mailbox
You need a DreamHost-hosted email address and its password.
2. Store credentials
CODEBLOCK0
Create ~/.config/skulk-email/credentials.json:
CODEBLOCK1
Gmail fields are optional — leave empty if you don't need shared Gmail access.
CODEBLOCK2
3. Test
CODEBLOCK3
Commands
CODEBLOCK4
How it works
- - Reading: Direct IMAP to
imap.dreamhost.com:993 (SSL) and optionally INLINECODE3 - Sending: Authenticates to DreamHost Roundcube webmail via HTTPS, composes and sends through the web interface
- Dependencies:
python3, curl, jq (standard on most systems) - No SMTP ports required. Works behind any firewall that allows HTTPS.
Why not just use SMTP?
Many VPS providers (DigitalOcean, some AWS configs) permanently block outbound SMTP ports 25, 465, and 587 to prevent spam. DreamHost's Roundcube webmail operates over HTTPS (port 443), which is never blocked. This skill automates the webmail login and send flow — same as composing email in a browser, just scripted.
Notes
- - First email from a new address may land in spam. Ask recipients to mark "not spam."
- Be reasonable with send volume — this is webmail automation, not a bulk sender.
- Credentials stay local in
~/.config/skulk-email/ — never commit them. - Script paths are relative to this skill directory.
Credits
Built by the Skulk 🦊 — The Human Pattern Lab
Skulk Email
通过DreamHost读取和发送电子邮件。可选读取共享的Gmail收件箱。
核心功能: 通过HTTPS路由至DreamHost的Roundcube网页邮箱实现发送,适用于封锁SMTP的VPS提供商(如DigitalOcean等)。无需第三方,无需中继服务。
系统要求
- - python3 — IMAP操作
- curl — Roundcube网页邮箱发送
- jq — 凭证文件解析
- DreamHost邮箱 — 邮箱地址+密码
- 凭证文件 — 本地存储于~/.config/skulk-email/credentials.json(绝不传输至DreamHost服务器之外)
安全性
- - 凭证从本地JSON文件读取,具有严格权限(目录700,文件600)
- 密码仅通过TLS传输:IMAP SSL(端口993)和HTTPS(端口443)
- 不记录、缓存或向任何第三方发送凭证
- 用于Roundcube会话的Cookie文件按进程创建,退出时自动清理
设置
1. DreamHost邮箱
您需要一个DreamHost托管的邮箱地址及其密码。
2. 存储凭证
bash
mkdir -p ~/.config/skulk-email && chmod 700 ~/.config/skulk-email
创建~/.config/skulk-email/credentials.json:
json
{
skulk_email: you@yourdomain.com,
skulk_password: your-dreamhost-mailbox-password,
gmail_email: ,
gmailapppassword:
}
Gmail字段为可选——如果不需要共享Gmail访问权限,请留空。
bash
chmod 600 ~/.config/skulk-email/credentials.json
3. 测试
bash
bash scripts/skulk-email.sh test
命令
bash
测试连接
bash scripts/skulk-email.sh test
读取收件箱
bash scripts/skulk-email.sh inbox [limit]
检查未读数量
bash scripts/skulk-email.sh count
列出未读消息
bash scripts/skulk-email.sh unread [limit]
按ID读取特定消息
bash scripts/skulk-email.sh read
发送电子邮件
bash scripts/skulk-email.sh send
搜索消息
bash scripts/skulk-email.sh search [limit]
读取共享Gmail收件箱(如果已配置)
bash scripts/skulk-email.sh gmail-inbox [limit]
bash scripts/skulk-email.sh gmail-unread [limit]
bash scripts/skulk-email.sh gmail-count
bash scripts/skulk-email.sh gmail-read
工作原理
- - 读取: 直接IMAP连接至imap.dreamhost.com:993(SSL),可选连接至imap.gmail.com:993
- 发送: 通过HTTPS认证至DreamHost Roundcube网页邮箱,通过网页界面撰写并发送
- 依赖项: python3、curl、jq(大多数系统标配)
- 无需SMTP端口。 在允许HTTPS的任何防火墙后均可工作。
为何不直接使用SMTP?
许多VPS提供商(DigitalOcean、部分AWS配置)会永久封锁出站SMTP端口25、465和587以防止垃圾邮件。DreamHost的Roundcube网页邮箱通过HTTPS(端口443)运行,该端口永远不会被封锁。本技能自动化了网页邮箱登录和发送流程——与在浏览器中撰写电子邮件相同,只是通过脚本实现。
注意事项
- - 新地址发送的第一封邮件可能进入垃圾邮件箱。请让收件人标记为非垃圾邮件。
- 发送量需合理——这是网页邮箱自动化,而非批量发送工具。
- 凭证保留在本地~/.config/skulk-email/目录中——切勿提交。
- 脚本路径相对于本技能目录。
致谢
由Skulk 🦊构建 — The Human Pattern Lab