How do PowerMTA's retry-after, max-connect-rate, max-smtp-out, max-msg-per-connection, and max-msg-rate directives work?

Summary

PowerMTA's `retry-after`, `max-connect-rate`, `max-smtp-out`, `max-msg-per-connection`, and `max-msg-rate` directives are critical for controlling email delivery and maintaining a good sender reputation. `retry-after` determines how long to wait before retrying failed deliveries; setting it too low can lead to greylisting or blocks. `max-connect-rate` limits the number of connections opened to a domain, which must be managed carefully to avoid rate limiting. `max-smtp-out` controls the number of simultaneous SMTP connections, and should be balanced with the number of sending IPs to prevent blacklisting. `max-msg-per-connection` sets the number of messages per connection; lower values can improve deliverability but may increase overhead. Finally, `max-msg-rate` limits the sending speed and must align with IP reputation and receiving domain policies. Effective configuration requires balancing sending speed with deliverability and adhering to recipient server limits.

Key findings

  • Retry-After Misconfiguration: A low `retry-after` value combined with aggressive connection rates is often seen as an attempt to overwhelm receiving servers and can lead to rate limiting or temporary blocks.
  • Max-Connect-Rate Sensitivity: Using `max-connect-rate` without careful monitoring and adjustment, especially with large providers, can trigger rate limiting.
  • Max-SMTP-Out Imbalance: A high `max-smtp-out` setting with a small number of sending IPs can lead to blacklisting.
  • Max-Msg-Per-Connection Tradeoffs: Lowering `max-msg-per-connection` can improve deliverability but also increases overhead due to more frequent connection teardowns.
  • Max-Msg-Rate Importance: `max-msg-rate` must be aligned with the IP reputation and receiving domain policies; sudden increases without warming up IPs can harm sender reputation.
  • Managed Connections: Poor connection management is a significant cause of throttling.

Key considerations

  • Careful Configuration: Pay close attention to all the different directives.
  • Retry-After Value: Avoid setting the `retry-after` to very short intervals. Experiment with longer intervals and adjust as needed.
  • Connection Rates: Be cautious with connection rates, particularly when sending to large email providers such as Gmail and Yahoo.
  • IP/Connection Balance: Balance the `max-smtp-out` directive with the number of IPs you have. A small number of IPs should not open too many connections.
  • Gradual Warm-Up: Before dramatically increasing your max-msg-rate, warm up the IP and increase send volumes slowly.
  • Recipient Limits: Properly configure and tune `max-connect-rate` and `max-smtp-out` to respect recipient limits.
  • Monitoring: Monitor your deliverability performance carefully, and make corrections on an ongoing basis.

What email marketers say
11Marketer opinions

PowerMTA's `retry-after`, `max-connect-rate`, `max-smtp-out`, `max-msg-per-connection`, and `max-msg-rate` directives are crucial for managing email sending behavior and maintaining deliverability. `retry-after` dictates the interval for retrying failed deliveries, with short intervals potentially leading to greylisting or blocks. `max-connect-rate` limits connections to a domain, requiring careful calibration to avoid rate limiting. `max-smtp-out` defines simultaneous SMTP connections, which should be balanced with the number of sending IPs to prevent blacklisting. `max-msg-per-connection` controls the number of messages per connection; lower values enhance deliverability but may increase overhead. Finally, `max-msg-rate` limits the sending speed and must align with IP reputation and recipient domain policies. Proper configuration requires a nuanced understanding of these parameters and their interplay.

Key opinions

  • Retry-After Impact: Very short `retry-after` intervals (e.g., <10 minutes) can negatively impact deliverability by triggering greylisting or blocks.
  • Max-Connect-Rate Sensitivity: Using `max-connect-rate` carelessly, especially with large providers like Gmail and Yahoo, can lead to rate limiting; monitoring connection success is critical.
  • Max-SMTP-Out Balance: `max-smtp-out` requires balancing with the number of sending IPs; a high value with few IPs increases the risk of blacklisting.
  • Max-Msg-Per-Connection Trade-off: Lowering `max-msg-per-connection` can improve deliverability but may increase overhead due to frequent connection teardowns.
  • Max-Msg-Rate Alignment: `max-msg-rate` should align with IP reputation and recipient domain policies; sudden increases can damage sender reputation.

Key considerations

  • Retry-After Optimization: Start with a longer `retry-after` interval and adjust based on observed behavior and server responses.
  • Connect-Rate Monitoring: Closely monitor connection success rates when using `max-connect-rate` and adjust the rate accordingly to avoid rate limiting.
  • IP and Connection Balance: Maintain a balance between the number of IPs in your sending pool and the maximum concurrent connections allowed by `max-smtp-out`.
  • Connection Strategy: Consider using a lower `max-msg-per-connection` to distribute messages more evenly, but be mindful of the increased overhead.
  • Sender Reputation: Warm up IPs before significantly increasing `max-msg-rate` to protect sender reputation and avoid deliverability issues.
Marketer view

Email marketer from EmailGeeks Forum notes that `max-smtp-out` should be tuned based on the number of IPs in your sending pool. Having a high `max-smtp-out` with only a few IPs can lead to those IPs being quickly blacklisted. Recommends maintaining a balance between the number of IPs and the maximum concurrent connections.

April 2021 - EmailGeeks Forum
Marketer view

Email marketer from Reddit shares that setting a very low `retry-after` value (e.g., less than 10 minutes) can be counterproductive and may lead to being greylisted or temporarily blocked by some ISPs. Recommends starting with a longer interval and adjusting based on observed behavior.

November 2024 - Reddit

What the experts say
2Expert opinions

Experts emphasize that improper configurations of PowerMTA directives, particularly `retry-after`, `max-connect-rate`, and `max-smtp-out`, are primary culprits in deliverability issues like rate limiting and temporary blocks. Setting `retry-after` too low, especially combined with aggressive connection rates, can overwhelm recipient servers. Likewise, poorly managed connections due to excessive `max-connect-rate` and `max-smtp-out` settings commonly lead to throttling, as these limits protect receiving infrastructure.

Key opinions

  • Aggressive Retries are Problematic: Setting `retry-after` too low, especially with high connection rates, can trigger rate limiting and temporary blocks by appearing as an attempt to overwhelm receiving servers.
  • Poor Connection Management Leads to Throttling: Poorly managed connections, evidenced by excessive `max-connect-rate` and `max-smtp-out` settings, are a common cause of throttling.

Key considerations

  • Carefully Configure Retry-After: Avoid setting `retry-after` to excessively low values, as this can be interpreted as aggressive behavior.
  • Manage Connections: Properly manage connection settings such as `max-connect-rate` and `max-smtp-out` to prevent exceeding recipient server limits and causing throttling.
Expert view

Expert from Word to the Wise explains that poorly managed connections, indicated by excessive `max-connect-rate` and `max-smtp-out` settings, are the most common cause of throttling. The rate limits are there to protect their infrastructure, so going over the limit will cause problems.

January 2024 - Word to the Wise
Expert view

Expert from Spam Resource explains that setting the `retry-after` value too low, especially when combined with aggressive connection rates, can easily trigger rate limiting and temporary blocks from receiving mail servers. This is because it appears as an attempt to overwhelm the server.

July 2024 - Spam Resource

What the documentation says
6Technical articles

The documentation outlines how PowerMTA directives control email sending behavior. `retry-after` specifies the minimum interval before retrying failed deliveries, managing the sending rate. `max-connect-rate` limits connections to a domain, complying with recipient limits and preventing throttling. `max-smtp-out` sets the maximum simultaneous SMTP connections, managing resource usage. `max-msg-per-connection` defines messages per connection, improving load balancing. `max-msg-rate` limits messages sent per time unit, controlling sending speed and protecting sender reputation. Proper configuration, along with managing concurrent connections, ensures the server doesn't overload during sending and retries after failure.

Key findings

  • Retry-After Definition: `retry-after` specifies the minimum time interval before retrying delivery to a domain after a temporary failure.
  • Max-Connect-Rate Function: `max-connect-rate` limits the number of connections opened to a domain within a given time period.
  • Max-SMTP-Out Purpose: `max-smtp-out` sets the maximum number of simultaneous SMTP connections PowerMTA will maintain.
  • Max-Msg-Per-Connection Role: `max-msg-per-connection` defines the maximum number of messages sent over a single SMTP connection before it's closed.
  • Max-Msg-Rate Importance: `max-msg-rate` limits the number of messages sent per unit of time.
  • Concurrency: Proper configuration ensures the server doesn't get overloaded while messages are being sent and retried after a failure.

Key considerations

  • Sending Rate: Use `retry-after` to manage sending rate and avoid overwhelming receiving servers.
  • Comply with Limits: Use `max-connect-rate` to comply with recipient domain connection limits and prevent throttling.
  • Resource Management: Limit `max-smtp-out` to manage resource usage and avoid server overload.
  • Load Balancing: Use `max-msg-per-connection` to mitigate issues related to long-lived connections and ensure better load balancing.
  • Sender Reputation: Set an appropriate `max-msg-rate` to control sending speed and avoid being flagged as a spammer, which is critical for sender reputation.
Technical article

Documentation from PowerMTA indicates that `max-msg-per-connection` defines the maximum number of messages that can be sent over a single SMTP connection before the connection is closed and reopened. This directive helps in mitigating issues related to long-lived connections and ensures better load balancing.

March 2024 - PowerMTA
Technical article

Documentation from SparkPost explains that `retry-after` specifies the minimum time interval before retrying delivery to a domain that has previously returned a temporary failure. It helps manage the sending rate and avoid overwhelming receiving servers. The value is specified in minutes.

April 2021 - SparkPost