- September 2022
Efficient SMTP session management — reusing connections and pipelining commands — determines how much throughput a given IP pool can actually deliver. This note covers both mechanisms and their operational configuration.
Two SMTP protocol features determine the throughput efficiency of any commercial sending MTA: session reuse (delivering multiple messages within the same SMTP session rather than opening a new session for each message) and command pipelining (sending multiple SMTP commands without waiting for individual responses). Both are standard SMTP features that PowerMTA implements natively. When correctly configured, they allow the MTA to deliver significantly more messages per unit time through fewer network operations. When misconfigured or applied to incompatible destinations, they generate session errors that reduce throughput and produce confusing accounting log entries.
Session Reuse: Multiple Messages Per Connection
Without session reuse, each message requires a complete SMTP session: TCP connection establishment, TLS handshake, EHLO exchange, MAIL FROM, RCPT TO, DATA transmission, 250 acknowledgement, QUIT, and TCP teardown. For a 50ms round-trip time connection, this overhead adds 400-600ms per message — limiting throughput to approximately 100-150 messages per connection per minute regardless of network bandwidth.
With session reuse (enabled by max-msg-per-connection > 1 in PowerMTA), the connection stays open after the first message and subsequent messages skip the TCP/TLS/EHLO overhead, going directly to MAIL FROM for each additional message. The session overhead (400-600ms) is amortised over all messages delivered in the session — at 100 messages per session, the per-message overhead drops from 400-600ms to 4-6ms. This 100x reduction in session establishment overhead is the primary mechanism by which session reuse improves throughput.
The practical max-msg-per-connection setting for each ISP should be calibrated at 70-80% of the ISP's observed per-session limit, as documented in the connection reuse note. For Gmail at High reputation: 150-200 messages per session. For Yahoo: 80-120. For Microsoft: 40-80. For EU ISPs (GMX, T-Online): 20-40. These values represent the range that maximises session efficiency without hitting the ISP's per-session message limit that would cause a mid-session connection close.
SMTP Pipelining: Batched Commands
SMTP pipelining (RFC 2920) allows the sending MTA to transmit multiple commands without waiting for individual responses. In a non-pipelined SMTP session, the sequence is synchronous: MAIL FROM → wait → RCPT TO → wait → DATA → wait → (body) → wait → 250. Each wait adds 50-150ms of round-trip latency. With pipelining, MAIL FROM, RCPT TO, and DATA are sent as a batch without waiting for individual responses, reducing the round-trip count from 4 to 2 per message.
PowerMTA enables pipelining automatically when the receiving server advertises PIPELINING capability in its EHLO response. No configuration is required to enable pipelining for destinations that support it — PowerMTA detects and uses it automatically. The configuration concern is ensuring that pipelining is not applied to destinations that do not correctly implement it, which causes 503 "Bad sequence of commands" errors. Per-destination pipelining exceptions can be configured in the domain block using the no-pipelining directive for destinations with known pipelining issues.
The interaction between session reuse and pipelining is additive: session reuse eliminates the TCP/TLS/EHLO overhead across messages; pipelining reduces the per-message command round-trips within each session. Together, they allow a single SMTP connection to deliver substantially more messages per minute than either feature alone provides. A well-tuned configuration combining session reuse (100-200 messages per session) and pipelining (2 round-trips per message instead of 4) produces throughput that approaches the network bandwidth limit rather than the round-trip latency limit.
Figure 1 — Throughput Improvement: Session Reuse + Pipelining Combined
Operational Configuration and Monitoring
The PowerMTA configuration for optimised session reuse and pipelining in each major ISP domain block: max-msg-per-connection set to the ISP-specific calibrated value; max-smtp-out set to the concurrent connection count appropriate for the current reputation tier; pipelining enabled by default (no configuration needed — PowerMTA enables it when the receiving server supports it).
Monitoring for session efficiency in the accounting log: calculate the average messages delivered per SMTP session for each major ISP destination. A low messages-per-session average (below 20% of the max-msg-per-connection setting) indicates that sessions are being terminated early — either by the ISP's per-session limit (requiring max-msg-per-connection reduction) or by throttle responses that close sessions after fewer messages than the configured limit. The session efficiency metric, tracked weekly, reveals when ISP behaviour changes require recalibration of the domain block settings.
Session reuse and pipelining are the two SMTP protocol features that most directly determine the throughput efficiency of the sending infrastructure. Configured correctly, they work silently to deliver more messages per unit time without requiring more connections or more IPs. Monitored correctly, they reveal when ISP changes or reputation tier shifts have reduced session efficiency and require recalibration. The quarterly domain block review is the operational mechanism that keeps both features calibrated to produce maximum throughput efficiency within the current ISP rate limits and reputation-tier constraints. Configure them correctly; monitor their efficiency; recalibrate when efficiency declines; and the infrastructure will deliver at the full capacity its IP pool and reputation level support.
Infrastructure Assessment
Our PowerMTA configuration includes per-ISP session reuse calibration and automatic pipelining for all destinations that support it, with quarterly efficiency monitoring to maintain optimal throughput as reputation tiers and ISP rate limits evolve. Request assessment →