PowerMTA is the production MTA of choice for high-volume commercial email operations — used by major ESPs, agencies, and enterprise senders worldwide. Operating PowerMTA at production scale requires deep familiarity with its configuration architecture, operational tools, and the monitoring practices that keep a high-volume sending programme running reliably. This guide covers the operational knowledge that transforms a functioning PowerMTA installation into a production-grade delivery infrastructure.

pmta
Command-line management tool for live PowerMTA inspection and control
acct.csv
Per-event accounting log — the operational data foundation
<domain>
Domain block directive — per-ISP connection and rate configuration
Quarterly
Minimum cadence for domain block calibration review

Accounting Log Architecture and ETL Design

The PowerMTA accounting log is the operational heartbeat of every production sending programme. Every delivery event — 250 OK, 4xx deferral with SMTP response text, 5xx permanent failure, FBL complaint processing — generates a structured record in the accounting log. The log format is configurable via the acct-file and acct-fields directives, allowing operators to specify exactly which fields appear in each record.

The production accounting log field configuration that supports the full monitoring stack:

<acct-file /var/log/pmta/acct.csv>
  acct-fields timeQueued,timeDelivered,vmta,jobId,dsnStatus,dsnMsg,
              bounceCat,srcMta,dlvSourceIp,dlvHost,dlvIp,dlvPort,
              rcptTo,sender,msgId,dlvSize,dsnAction,attempts
</acct-file>

The critical fields and their operational uses: dsnStatus is the 3-digit SMTP response code; dsnMsg is the full SMTP response text needed for accurate bounce classification; vmta identifies which Virtual MTA handled the delivery (essential for multi-client operations); bounceCat is the bounce classification applied by the pattern library; dlvSourceIp is the sending IP (essential for per-IP monitoring); rcptTo is the recipient address (hashed for GDPR compliance in the ETL pipeline); timeQueued and timeDelivered together provide time-to-delivery calculation.

The ETL pipeline reads the accounting log in near-real-time using a log tailer (Filebeat, or a custom Python script using tail -F), parses each CSV record, validates field values, applies the GDPR pseudonymisation to rcptTo (SHA-256 hash after domain extraction), and writes the structured record to the operational database. The database schema optimised for the key monitoring queries: partitioned by date for efficient time-range queries; indexed on vmta, dlvHost, dlvSourceIp, and bounceCat for the aggregation queries that per-ISP deferral rate and per-IP delivery rate monitoring require.

Domain Block Calibration: Per-ISP Configuration

The <domain> block in PowerMTA's configuration controls how the MTA connects to and delivers to each receiving server or ISP. A well-calibrated domain block maximises delivery throughput within the rate limits imposed by the ISP at the programme's current reputation tier. Under-configured domain blocks leave throughput on the table; over-configured blocks generate throttle responses that reduce effective throughput and accumulate reputation pressure.

The domain block directives that have the most direct impact on throughput and deliverability:

<domain gmail.com>
  max-smtp-out 20          # concurrent connections per IP
  max-msg-per-connection 150  # messages per SMTP session (calibrated)
  max-msg-rate 200/min     # burst rate limit per IP
  retry-after 5m           # first retry interval after 4xx
  retry-after 15m          # second retry interval
  retry-after 45m          # third retry interval
  retry-after 2h           # subsequent retry intervals
  queue-life 72h           # maximum time message waits in queue
  smtp-tls-mode require    # require TLS for all connections
  min-retry-delay 5m       # minimum delay between retries to same domain
</domain>

The quarterly calibration process: query the accounting log database for the previous quarter's per-ISP deferral rate, per-IP session efficiency (average messages delivered per session vs max-msg-per-connection setting), and any throttle patterns. Compare against the domain block settings. If Gmail's average messages-per-session is consistently 80% or below max-msg-per-connection, the setting is correctly calibrated. If average messages-per-session is consistently reaching the max (100%), the ISP may support a higher limit — test with a 20% increase and monitor for session reset errors. If session reset errors appear at the current max, reduce by 15%.

ISPMax SMTP out (High rep)Max msg/session (High rep)Retry-after (first)Notes
gmail.com20–25150–2005mTLS required; reduce at Medium rep
outlook.com10–1550–8010mSNDS monitoring essential
yahoo.com15–2080–1205mBurst sensitive; add max-msg-rate
gmx.net5–820–4015mAggressive greylisting; patience needed
t-online.de3–520–3020mVery conservative rate limits
hotmail.com10–1550–8010mSame as outlook.com pool

Queue Management: Monitoring and Control

PowerMTA's queue is the staging area for messages between injection and delivery. Understanding queue depth, queue age, and per-ISP queue dynamics is essential for managing delivery windows and detecting throttle events before they become reputation problems.

The pmta command-line tool provides real-time queue inspection:

# Show queue summary by destination domain
pmta show queue --sort=count --count=20

# Show queue for a specific domain
pmta show queue gmail.com

# Show messages in queue older than 4 hours
pmta show queue --age=4h

# Pause injection to a specific domain (during incident)
pmta pause queue gmail.com

# Resume injection
pmta resume queue gmail.com

# Move messages to a different VMTA
pmta move queue --selector=vmta=old-vmta --new-vmta=new-vmta

The queue monitoring metrics that matter operationally: per-ISP queue depth (total messages waiting for delivery to each ISP), per-ISP queue drain rate (is the queue growing or shrinking over the last 30 minutes?), oldest message age per ISP (how long has the oldest queued message been waiting?). These three metrics, exported from the PowerMTA management API and written to the monitoring database every 5 minutes, provide the real-time queue visibility that detects throttle pressure within minutes of it developing.

Queue management interventions during active campaigns: when per-ISP queue depth exceeds 50,000 messages and is growing (drain rate negative), reduce injection rate to that ISP's domain block max-smtp-out by 30%. If the queue continues growing after 30 minutes, pause injection to that ISP entirely and allow the queue to drain before resuming. A campaign paused for 2 hours while the queue drains loses 2 hours of delivery window but avoids the reputation pressure that sustained throttle accumulates over days.

Bounce Classification Pattern Library

PowerMTA's bounce classification system maps SMTP response text patterns to bounce categories, which determine the downstream action (suppress, retry, investigate, alert). The pattern library is configured in a separate bounce-rules file referenced by the PowerMTA configuration.

# /etc/pmta/bounce-rules.txt — production pattern library

# Hard bounces — address invalid
[550/5.1.1] hard "user unknown"
[550/5.1.1] hard "no such user"
[550/5.1.1] hard "mailbox not found"
[550/5.1.2] hard "bad destination mailbox"
[553/5.1.3] hard "invalid address"

# Policy rejections — do not suppress address
[550/5.7.1] policy "spam rejected"
[550/5.7.1] policy "blocked for spam"
[550/5.7.26] policy "dmarc policy"
[550/5.7.511] policy "account is not allowed"

# Blocklist rejections — alert immediately
[550] blocklist "spamhaus"
[550] blocklist "barracuda"
[554] blocklist "dnsbl"

# Greylisting — rapid retry
[451] greylist "greylisted"
[421] throttle "temporarily deferred"

# Quota/full
[452/4.2.2] quota "over quota"
[452/4.2.2] quota "mailbox full"

The quarterly pattern library audit: query the accounting log for all unique dsnMsg values in the previous quarter where bounceCat is "generic" or "unknown" (meaning no specific pattern matched). Review these unclassified response texts and add specific patterns for any that recur more than 50 times per quarter. Each new pattern added improves classification accuracy for all future messages generating that response. Over 2-3 years of quarterly audits, the pattern library accumulates the full set of response texts the programme actually encounters, making classification accuracy approach 100%.

FBL Processing Integration

PowerMTA's built-in FBL processor handles the ARF complaint email workflow: monitoring the FBL mailbox via IMAP, parsing incoming ARF-format complaint emails, extracting the original recipient address from the ARF payload, applying the suppression via a configured callback URL, and logging the complaint event to the accounting log. The FBL processor configuration:

<fbl-processor>
  mailbox-monitor imap://fbl@yourdomain.com:password@mail.yourdomain.com/INBOX
  suppress-url https://app.yourdomain.com/api/suppress?email={rcpt}
  acct-file /var/log/pmta/fbl-complaints.csv
  acct-fields timeLogged,rcptTo,sourceIp,originalJobId,fblSource
  poll-interval 5m
</fbl-processor>

The suppress-url endpoint receives an HTTP GET or POST request for each complaint, with the recipient address as a URL parameter. The endpoint adds the address to the suppression database and returns HTTP 200 to confirm processing. If the endpoint is unavailable or returns a non-200 response, the FBL processor retries the suppression with exponential backoff — ensuring no complaints are lost due to transient API unavailability.

The FBL complaint accounting log records enable per-campaign complaint rate calculation: join the FBL complaint log to the accounting log on originalJobId to count complaints per campaign. Divide by campaign injection count to produce the per-campaign complaint rate. Alert when any campaign exceeds 0.10% complaint rate across any FBL source. This per-campaign FBL monitoring is the operational practice that catches quality problems in specific campaigns before they accumulate enough signals to affect domain reputation at Gmail.

Management API for Operational Automation

PowerMTA exposes a management API (HTTP-based) that enables programmatic inspection and control of the running MTA. The management API is used by the monitoring stack for queue depth polling, by the injection API for injection status checking, and by automation scripts for scheduled operational tasks.

# Example: get queue stats via management API
import requests

PMTA_API = 'http://localhost:8080/mgmt'
AUTH = ('admin', 'your-password')

# Get queue depth per domain
response = requests.get(f'{PMTA_API}/queue', auth=AUTH)
queue_data = response.json()

for domain_entry in queue_data['entries']:
    domain = domain_entry['name']
    count = domain_entry['count']
    oldest = domain_entry['oldestMsg']  # seconds
    if count > 10000 or oldest > 14400:  # >10K msgs or >4h old
        alert(f'Queue alert: {domain} has {count} msgs, oldest {oldest//3600}h')

The management API polling interval for queue monitoring should be 5 minutes during active campaign delivery windows. During off-hours (no active campaigns), 30-minute polling intervals are sufficient. The monitoring script writes each poll result to the time-series database, enabling the queue depth trend charts that show whether a queue is draining (delivery proceeding normally) or building (throttle pressure accumulating).

Additional management API use cases: pausing/resuming delivery to specific domains during incidents, listing active messages for specific recipient domains (to verify message delivery before escalating a subscriber complaint), and checking VMTA status for multi-client operations (confirming each client's VMTA is active and processing messages). The management API makes all of these operations scriptable — reducing manual intervention during incidents and enabling automated response to predefined conditions.

Daily Operations Workflow

Production PowerMTA operations follow a structured daily workflow that ensures all monitoring checkpoints are completed and all operational data is current before any new campaign injection begins.

▶ Daily PowerMTA Operations Checklist
1
08:00 — Postmaster Tools review: Check domain reputation tier and spam rate for all sending domains. Any change from previous day triggers investigation before campaign injection.
2
08:15 — Accounting log overnight review: Query per-ISP deferral rate for overnight period. Any ISP showing >15% deferral rate warrants domain block review before the next send.
3
08:30 — FBL complaint review: Check FBL complaint count from previous day. Any campaign above 0.10% complaint rate triggers content/segment audit.
4
08:45 — Queue health check: Confirm queue is empty or draining from previous day's campaigns. Any stale queue (messages >24h old) requires investigation.
5
09:00 — Pre-campaign verification: For any campaign scheduled to send today, verify authentication (test message headers), spam score (mail-tester.com), and seed inbox placement.
6
During campaign — Queue monitoring: Check per-ISP queue depth every 30 minutes during active delivery. Alert if any ISP queue exceeds 25K messages with negative drain rate.
7
Post-campaign — Performance review: Query accounting log for campaign delivery rate, per-ISP deferral rate, bounce rate by category. Log results in campaign performance database.

Capacity Planning and Scaling

PowerMTA capacity planning requires calculating the maximum sustainable throughput of the current IP pool and comparing it against the programme's volume growth trajectory. When current throughput is within 80% of the pool's capacity ceiling, plan the next IP addition — allowing 8-10 weeks for warmup before the additional capacity is needed.

The throughput ceiling calculation: for each ISP, (number of IPs × max-smtp-out × messages per session per cycle) = theoretical maximum throughput per ISP per hour. The binding constraint ISP — the one whose maximum throughput is reached first at the current volume — determines the pool's effective capacity ceiling. When the programme's volume approaches 80% of the binding ISP's ceiling, begin the IP addition planning and warmup process.

The accounting log provides the empirical throughput data that validates or corrects the theoretical calculation: actual messages-per-session per ISP, actual session count per hour per ISP, and actual delivery rate per IP. When actual throughput consistently runs below theoretical maximum (below 70% of calculated ceiling), either the domain block configuration is sub-optimal (max-smtp-out or max-msg-per-connection too low for the current reputation tier) or ISP-side rate limits are lower than the configuration assumes. In either case, the accounting log data guides the correct configuration adjustment.

PowerMTA production operations, implemented with the architecture and practices documented in this guide, transforms a sending MTA from a message relay into an operational intelligence platform. The accounting log provides the data; the domain block calibration provides the throughput; the bounce classification provides the list quality intelligence; the FBL integration provides the complaint signal; and the management API provides the operational control. Together they constitute the complete production operations stack that high-volume commercial email requires.

H
Henrik Larsen

MTA Operations Engineer at Cloud Server for Email. Specialising in email deliverability, infrastructure architecture, and high-volume sending operations.