Cortel is a high-performance, easy-to-deploy temporary email service built with Rust, Leptos, and Axum. It's designed to be fully customizable, allowing you to host your own "temp-mail" style service in minutes.
- Blazing Fast: Built with Rust for maximum performance and low memory footprint.
- Easy Branding: Change colors, names, and SEO metadata via environment variables.
- Responsive UI: Modern interface that works on mobile and desktop.
- Private & Secure: In-memory storage (no database required) with automatic cleanup of old messages.
- Attachment Support: Receive and download email attachments.
- Recovery Links: Bookmark or share access to an inbox.
- Rust (latest stable)
- A domain name (or several)
- Port 25 (SMTP) and 3000 (HTTP) open on your firewall
Copy the example environment file:
cp .env.example .envEdit .env and set your domains and branding:
CORTEL_SITE_NAME=MyService
CORTEL_DOMAINS=mail.example.com,temp.example.net
CORTEL_BRAND_COLOR=#6366f1For each domain in CORTEL_DOMAINS, you need to set up an MX Record pointing to your server's IP address.
- Type:
MX, Host:@, Value:your-server-ip.com, Priority:10
# Build the WASM client + Tailwind
powershell -ExecutionPolicy Bypass -File build.ps1
# Build the server
cargo build --release -p cortel-server
# Run the server (Axum + SMTP)
./target/release/cortel-serverrustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli
# Tailwind (Linux x64)
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64
chmod +x tailwindcss-linux-x64
# Build the WASM client
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' \
cargo build --release --lib --target wasm32-unknown-unknown -p cortel-web --no-default-features --features hydrate
# Generate JS bindings
mkdir -p target/site/pkg
wasm-bindgen --target web --no-typescript --out-dir target/site/pkg --out-name cortel-web target/wasm32-unknown-unknown/release/cortel_web.wasm
# Compile Tailwind CSS
./tailwindcss-linux-x64 -i cortel-web/style/main.css -o target/site/pkg/cortel-web.css --bundle --minify
# Build the server
cargo build --release -p cortel-server
# Run the server (Axum + SMTP)
./target/release/cortel-serverYou can also run Cortel using Docker:
docker build -t cortel .
docker run -p 3000:3000 -p 25:25 --env-file .env cortelCortel is built with modularity in mind.
- Logo/Icon: The mail icon is an SVG hardcoded in
cortel-web/src/components/home.rsandinbox.rs. Search for<svgto find and replace it with your own. - Frontend: Check
cortel-web/src/componentsto modify the UI. - Styles: We use Tailwind CSS. Modify
cortel-web/style/main.css. - Backend: SMTP logic is in
cortel-server/src/smtp.rs.
MIT License - feel free to use it for your own projects!