Cybersecurity Updates & Tools

Stalwart Mail Server for Secure and Scalable Email

Stalwart Mail Server is an open-source email server built with Rust, designed to provide secure, scalable, and high-performance email infrastructure. It supports modern email protocols, including JMAP, IMAP4, POP3, SMTP, and ManageSieve, making it suitable for deployments ranging from small organizations to large, multi-tenant environments.

Stalwart combines email delivery, authentication, spam filtering, storage management, monitoring, and web-based administration in one platform. Its focus on memory safety, distributed architecture, and flexible storage options makes it an option for organizations seeking greater control over their email infrastructure.

Key Features of Stalwart Mail Server

1. Support for Modern Email Protocols

Stalwart supports several protocols for accessing mailboxes, sending messages, and managing email rules.

  • JMAP: Supports modern email access, Sieve scripts, WebSockets, blob management, and quota extensions.
  • IMAP4: Provides IMAP4rev1 and IMAP4rev2 support, along with multiple protocol extensions.
  • POP3: Includes extensions, TLS support through STLS, and SASL authentication.
  • ManageSieve: Allows users and administrators to manage server-side email filtering scripts.
  • SMTP: Handles inbound and outbound email delivery, routing, queue management, and message processing.

2. SMTP Security and Email Authentication

Stalwart includes features designed to improve email authenticity and protect message transport. These controls help administrators reduce spoofing, improve delivery security, and manage suspicious traffic.

  • DKIM, SPF, and DMARC: Support email authentication and domain-level anti-spoofing policies.
  • ARC: Helps preserve authentication results when messages pass through forwarding intermediaries.
  • DANE and MTA-STS: Provide mechanisms for strengthening SMTP transport security.
  • TLS reporting: Supports reporting mechanisms that help administrators identify transport security failures.
  • Filtering and throttling: Apply configurable rules, Sieve scripts, MTA hooks, and milter integrations.
  • Queue management: Supports delivery priorities, routing rules, quotas, and delayed delivery.

3. Built-in Spam and Phishing Protection

Stalwart includes a range of filtering and reputation mechanisms to help identify unwanted or potentially dangerous messages.

  • Rule-based spam detection and statistical classification with automatic training capabilities.
  • Optional LLM-driven message analysis and spam filtering.
  • DNS-based blocklist checks for IP addresses, domains, and hashes.
  • Pyzor integration for collaborative, digest-based spam detection.
  • Phishing detection techniques targeting sender spoofing and homographic URLs.
  • Sender reputation analysis using IP addresses, autonomous system numbers, domains, and email addresses.
  • Greylisting to temporarily defer messages from unfamiliar senders.
  • Spam traps for identifying and analyzing unwanted email traffic.
  • Trusted-reply tracking to help distinguish legitimate email conversations from unsolicited messages.

These features can help reduce spam and phishing exposure, although their effectiveness depends on configuration, threat intelligence, and ongoing maintenance.

4. Flexible Storage and Email Management

Stalwart supports multiple storage backends, giving administrators flexibility when designing email infrastructure. Supported options include RocksDB, FoundationDB, PostgreSQL, MySQL, SQLite, S3-compatible storage, Azure, Redis, and Elasticsearch, subject to the capabilities of the selected backend and current release.

  • Full-text email search in multiple languages.
  • Email aliases, mailing lists, catch-all addresses, and subaddressing.
  • Automatic account configuration and discovery through autoconfig and autodiscover.
  • Multi-tenancy with domain and tenant isolation.
  • Per-user and per-tenant storage quotas.
  • Sieve scripting with support for registered extensions.

Administrators can select storage components according to their capacity, performance, availability, and operational requirements.

5. Security, Authentication, and Access Control

Security controls help protect accounts, stored messages, and administrative operations. Stalwart is written in Rust, which provides memory-safety benefits, although secure deployment still requires correct configuration and timely updates.

  • Encryption at rest using S/MIME or OpenPGP-related capabilities, depending on the selected workflow.
  • Automatic TLS certificate provisioning through ACME challenges, including HTTP-01, DNS-01, and TLS-ALPN-01.
  • Rate limiting and automated blocking of abusive or suspicious IP addresses.
  • OpenID Connect and OAuth 2.0 authentication and authorization flows.
  • LDAP, OIDC, SQL, and built-in authentication backends.
  • Time-based one-time password two-factor authentication and application passwords.
  • Role-based permissions and access control lists (ACLs).

Review the official documentation to confirm the precise encryption, authentication, and backend capabilities available in your chosen version.

6. Distributed Architecture and Scalability

Stalwart is designed to support deployments that need to grow beyond a single mail server. Its distributed architecture includes capabilities intended to improve availability and reduce dependence on centralized coordination.

  • Fault-tolerance and high-availability features for supported distributed deployments.
  • Automatic node discovery and coordinator-free architecture.
  • Failure detection designed to handle node failures and network disruptions.
  • Kubernetes support for container orchestration and scaling.
  • Read replicas, sharded blob storage, and in-memory data stores for supported configurations.

Actual availability and performance depend on deployment topology, storage configuration, network conditions, and operational testing.

7. Monitoring and Web-Based Administration

Stalwart provides monitoring and management capabilities to help administrators operate email services and investigate issues.

  • Observability: Logging and tracing integrations for OpenTelemetry, journald, log files, and console output.
  • Metrics: OpenTelemetry and Prometheus integration for monitoring server behavior.
  • Automation: Webhooks and configurable email or webhook alerts.
  • Administration dashboard: Manage accounts, domains, groups, mailing lists, and server configuration.
  • SMTP queues: Inspect and manage queued messages and supported reporting workflows.
  • Report visualization: Review DMARC, TLS reporting, and Abuse Reporting Format (ARF) reports.
  • Log viewer: Search and filter logs to investigate delivery failures and suspicious activity.
  • Self-service tools: Support password resets and encryption-key management workflows.

Who Should Use Stalwart Mail Server?

Stalwart may suit organizations, hosting providers, developers, and administrators who need a self-hosted email platform with modern protocols, configurable security controls, and flexible infrastructure options. Before deploying it in production, evaluate its resource requirements, backup and recovery procedures, mail deliverability, certificate renewal, monitoring, and update process.

For related security administration topics, explore our guide to UFW firewall configuration to learn about controlling network access on Linux systems.

For installation instructions, release details, and the latest feature documentation, visit the official Stalwart Mail Server GitHub repository.