Skip to content

3.0.5

Latest

Choose a tag to compare

@superelay superelay released this 13 Jul 16:49

πŸš€ SuperMTA v3.0.5 β€” Socket-Level Traffic Tracking, Scheduling Fixes & Cluster Guide

We are pleased to announce the release of SuperMTA v3.0.5. This release focuses on upgrading traffic calculation accuracy to raw socket-level tracking, fixing critical REST API issues, stabilizing inbound PTR validations, and delivering complete clustering configuration guidelines.


🌟 Key Highlights

⚑ Socket-Level Network Traffic Calculation

We shifted traffic data tracking from application-level estimations to direct socket-level network read/write counts:

  • Raw Socket Wrappers: Added wrappers intercepting send, recv, SSL_read, SSL_write, and dprintf globally to count exact bytes sent and received.
  • No Double Counting: Cleaned up duplicated legacy estimation counters across the mail engine logic (smtp_engine.c, inbound.c, delivery.c, dummysmtp.c).
  • Visual Telemetry: Restored precise, real-time volume chart updates on the Management Console.

πŸ“… URL-Decoding Fix in Schedules API

  • Fixed a bug where URL-encoded schedule names (e.g. Daily%20Delivery%20Report) failed database queries on DELETE operations due to missing URL-decoding. The management backend now decodes request paths before matching SQLite schedule IDs.

πŸ›‘οΈ Reverse DNS (iprev) Loopback Bypass

  • Resolved an edge-case bug where local/loopback client connections triggered external PTR lookup timeouts. Added robust loopback checking inside is_local_ip() to bypass iprev processing for local relay sources.

πŸ“‹ Configuration Directives Audit

The following configuration parameters are now fully documented with use cases and syntax examples in both docs/CONFIGURATION_DIRECTIVES_REFERENCE.md and web/docs.html:

Directive Scope Default Description & Use Case
inbound-mode Global thread Engine type: epoll (non-blocking event-driven) or thread (classic pool).
inbound-workers Global 0 (Auto) Thread pool size for the asynchronous epoll workers.
http-access Global None REST/Web Console IP access control list (roles: admin, user).
implicit-tls Listener no Forces immediate SSL/TLS handshake upon connection (Port 465 submission).
use-inbound-proxy Listener no Parses HAProxy PROXY Protocol v1/v2 headers to extract client IPs behind gateways.
check-iprev-inbound Inbound no Toggles client Reverse DNS PTR lookup checks.
smtp-max-auth-failure-rate Inbound None SMTP AUTH brute-force rate limiter threshold (e.g., 5/m).

πŸ–§ Cluster Sizing & Topology Guide

To deploy SuperMTA in a Distributed Cluster Setup (DCS) with 4 or 5 nodes, follow these topology best practices:

1. Quorum & Replication Factor (cluster.replicas)

Always use odd replication numbers to facilitate clean majority quorums and eliminate split-brain scenarios:

  • Quorum Equation: $\text{Quorum} = \lfloor \frac{\text{replicas}}{2} \rfloor + 1$
  • 4-Node Cluster: Set cluster.replicas 3 (Quorum is 2 nodes, tolerates 1 node failure). Setting replicas to 4 increases write traffic and storage without increasing fault tolerance (both fail if 2 nodes are down).
  • 5-Node Cluster: Set cluster.replicas 3 (for lower write latencies) or cluster.replicas 5 (for higher survivability, tolerating 2 node failures).

2. Contact Seed Nodes (cluster.seed)

  • Seed lists must be identical across all node configurations.
  • 4-Node Cluster: Configure 2 static seeds (e.g. Node 1 and Node 2).
  • 5-Node Cluster: Configure 3 static seeds (e.g. Node 1, Node 2, and Node 3).

3. IP Bindings (cluster.listen)

  • cluster.listen is node-specific. Each node must bind to its own unique IP interface (e.g., 10.0.0.1:9100 on Node 1, 10.0.0.2:9100 on Node 2). Copy-pasting the same listen IP on other nodes will cause bind errors (EADDRINUSE) at startup. Use 0.0.0.0:9100 to bind to all local interfaces safely.

πŸ“¦ Installation & Upgrades

Build from Source

# 1. Grab dependencies
sudo apt-get install -y build-essential libssl-dev libjansson-dev libcurl4-openssl-dev libsqlite3-dev libkrb5-dev

### Install Debian Package (.deb)

sudo dpkg -i smta_3.0.5_amd64.deb
sudo systemctl daemon-reload
sudo systemctl restart smta

πŸ› οΈ Verification

Run the built-in diagnostic tool to verify the syntax integrity of your active configuration:

smta-cli test config