Technical Documentation

Vexm Platform Architecture & Setup

Learn how Vexm orchestrates domain ownership verification, Amazon SES inbound receipt rules, private MinIO object storage, and catch-all routing without exposing AWS infrastructure.

1. System Architecture

Vexm operates on an asynchronous event-driven pipeline. When an email is sent to any address on a verified custom domain (e.g. support@yourdomain.com), the SMTP session connects to Amazon SES.

Inbound Flow Lifecycle:
  1. Inbound SMTP message arrives at regional Amazon SES endpoint.
  2. SES receipt rule evaluates active domain and writes raw RFC822 EML to private storage.
  3. SNS webhook or queue worker triggers Vexm ingestion pipeline.
  4. Laravel worker extracts MIME parts, parses headers, decodes attachments, and sanitizes HTML.
  5. Metadata is indexed into PostgreSQL with strict tenant ownership scoping.
  6. Message appears in real-time in the web dashboard.

2. Required DNS Records

To route mail to Vexm, you configure exactly two DNS records in your domain registrar (such as Cloudflare, Route53, Namecheap, or GoDaddy):

Record 1: TXT (Ownership Verification)Required
TypeTXT
Host / Name_inbound-challenge.yourdomain.com
Valueinbox-verify-random-token-here

Used to cryptographically prove that you own or manage the domain before routing is activated.

Record 2: MX (Mail Routing)Required
TypeMX
Host / Name@ (or root)
Priority10
Target / Valueinbound-smtp.us-east-1.amazonaws.com

Instructs global MTAs (Gmail, Outlook, Yahoo) to deliver emails addressed to your domain to the SES inbound cluster.

3. Security & Isolation Architecture

Security is implemented as a fundamental core principle across the application:

Strict Tenant Isolation

Database records are strictly filtered by authenticated user ID. Insecure direct object reference (IDOR) attacks are blocked via authorization policies.

HTML Sanitization

All incoming HTML is stripped of scripts, external redirects, frames, and event handlers to prevent XSS and malicious phishing attacks.

4. REST API Overview

All dashboard functionality is powered by the versioned REST API at /api/v1.

# Authentication
POST /api/v1/auth/register
POST /api/v1/auth/login
GET /api/v1/auth/me
# Custom Domains
GET /api/v1/domains
POST /api/v1/domains
POST /api/v1/domains/:id/verify
# Inbound Inbox
GET /api/v1/inbox?folder=inbox&q=search
GET /api/v1/inbox/:id
GET /api/v1/attachments/:id/download