Phase A: mail_send + mail_inbox_list + mail_inbox_read. Replaces scripts/kayos_mail.py with a typed MCP server. Outbound guarantees Date, Message-ID (own-domain), User-Agent, MIME-Version, multipart/alternative for HTML+text, multipart/mixed for attachments, In-Reply-To + References for threading. Single account in v0.1 (default_account from config). Phase B adds multi-account + threading + search; Phase C adds mark + attachments + reply helper. Stack: rmcp 0.1 (matches aldabra), lettre 0.11 + tokio-rustls, async-imap 0.10, mail-parser 0.9. Stderr-only logging (stdout is the MCP transport). Smoke verified 2026-05-21: send -> land -> read kayos@sulkta.com round trip, DKIM-Signature + Authentication-Results pass at the rspamd relay.
77 lines
2.3 KiB
TOML
77 lines
2.3 KiB
TOML
# Cargo workspace root for mail-mcp.
|
|
#
|
|
# One crate today (mail-mcp), workspace shape so we can grow without
|
|
# rework. Same pattern as aldabra.
|
|
#
|
|
# Workspace deps pinned here; each crate references with `foo = { workspace = true }`.
|
|
[workspace]
|
|
resolver = "2"
|
|
members = ["crates/mail-mcp"]
|
|
|
|
[workspace.package]
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
repository = "http://192.168.0.5:3001/Sulkta-Coop/mail-mcp"
|
|
authors = ["Cobb <cobb@sulkta.com>", "Kayos <kayos@sulkta.com>"]
|
|
|
|
[workspace.dependencies]
|
|
tokio = { version = "1", features = ["full"] }
|
|
|
|
# MCP — same crate aldabra uses. Pinned to 0.1 series; bump together
|
|
# across repos when we move.
|
|
rmcp = { version = "0.1", features = ["server", "transport-io"] }
|
|
schemars = "0.8"
|
|
|
|
# SMTP — lettre handles RFC-5322 headers (Date, Message-ID), STARTTLS,
|
|
# multipart/alternative + multipart/mixed natively. rustls-tls so we
|
|
# don't pull openssl.
|
|
lettre = { version = "0.11", default-features = false, features = [
|
|
"tokio1-rustls-tls",
|
|
"smtp-transport",
|
|
"builder",
|
|
"hostname",
|
|
] }
|
|
|
|
# IMAP — async-imap is tokio-native and supports UID-based addressing
|
|
# (which we use throughout the API surface).
|
|
async-imap = { version = "0.10", default-features = false, features = ["runtime-tokio"] }
|
|
tokio-rustls = "0.26"
|
|
rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "ring"] }
|
|
rustls-pki-types = "1"
|
|
webpki-roots = "0.26"
|
|
|
|
# Email parsing on the read side. mail-parser is fast, no_std-friendly,
|
|
# and handles the RFC-5322 + MIME zoo without surprises.
|
|
mail-parser = "0.9"
|
|
|
|
# Config + serde
|
|
toml = "0.8"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
|
|
# UUID for Message-ID generation when lettre's auto isn't appropriate
|
|
# (we want our own domain in the Message-ID, not lettre's local-hostname
|
|
# default).
|
|
uuid = { version = "1", features = ["v4"] }
|
|
|
|
# Base64 for attachments
|
|
base64 = "0.22"
|
|
|
|
# Errors
|
|
anyhow = "1"
|
|
thiserror = "1"
|
|
|
|
# Stream adapter (.next() on async-imap fetch streams)
|
|
futures = "0.3"
|
|
|
|
# Logging — stderr only, never stdout (stdio is the MCP transport).
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# Dirs lookup for `~/.config/mail-mcp/config.toml` default path
|
|
dirs = "5"
|
|
|
|
# Shell-style env-var expansion for the `password_file` setting
|
|
# (`~/.config/...` paths). shellexpand is small + maintained.
|
|
shellexpand = "3"
|