How can I change the retransmission time in Postfix?
Matthew Whittaker
Co-founder & CTO, Suped
Published 18 Jun 2025
Updated 15 Aug 2025
7 min read
Dealing with deferred emails in Postfix can be a frustrating experience. You send out an important message, only to see it stuck in the queue, waiting for the recipient server to accept it. Often, these deferrals are due to temporary issues like recipient server greylisting or rate limiting. Understanding how Postfix handles these situations, particularly its retransmission times, is crucial for maintaining good email deliverability.
Postfix, by default, is designed to be resilient, retrying failed deliveries over a period. However, its default settings might not always align with the expectations of modern recipient servers, which often employ anti-spam measures like greylisting. This is where modifying retransmission parameters becomes vital, allowing you to fine-tune your Postfix server to adapt to these nuances and ensure your emails eventually reach their destination.
The key is to strike a balance: retrying too aggressively can lead to being temporarily blocked or even added to a blocklist (or blacklist), while retrying too infrequently can result in significant delivery delays or even bounces if the message eventually expires. This guide will walk you through how to adjust these critical settings in Postfix.
Understanding Postfix retransmission defaults
Postfix manages message retransmission through several parameters, primarily defined in your Postfix main.cf configuration file. The most directly relevant setting for controlling the time between retry attempts for a malfunctioning transport is transport_retry_time. By default, Postfix will wait 60 seconds before attempting to re-deliver a message to a server that previously returned a temporary error.
Other important parameters include maximal_queue_lifetime, which dictates how long a message can stay in the queue before being returned as undeliverable, and queue_run_delay, controlling how often the queue manager processes deferred messages. These settings collectively determine your server's retransmission strategy.
Default Postfix Queue and Retransmission Settingsini
It's worth noting that the Postfix documentation provides comprehensive details on these and other parameters, which can be an excellent resource for deeper understanding and advanced configurations.
Identifying the need for retransmission time adjustments
The primary reason to adjust Postfix retransmission times is to better handle temporary delivery failures, especially those resulting from greylisting or aggressive rate limiting by recipient mail servers. Greylisting, for example, intentionally rejects an email for a short period, expecting a legitimate mail server to retry later. If your Postfix server retries too quickly, it might be caught in a loop, continuously resetting the greylisting timer.
Common symptoms indicating a need for adjustment include widespread 450 4.2.0 Greylisted errors in your mail logs, significant delays in delivery to specific domains, or a high number of deferred messages in your queue. These issues can negatively impact your sender reputation and lead to poor email deliverability. If you're encountering these, it's a strong signal to investigate and modify your retransmission settings, as outlined in this helpful guide on configuring retry duration in Postfix.
Monitoring your Postfix logs is key to diagnosing these issues. Look for patterns in status=deferred entries, specifically those with 4xx SMTP error codes, which indicate temporary failures. This analysis helps determine whether a shorter or longer retransmission time is appropriate for your specific sending patterns and recipient server responses. Understanding email greylisting and its mechanics is a good starting point.
Modifying Postfix retransmission parameters
To change the retransmission time, you'll need to edit your Postfix main.cf file. This file is typically located in /etc/postfix/. Before making any changes, it's always a good practice to back up your configuration file. You can adjust the transport_retry_time to a value that aligns better with common greylisting periods, often around 300 seconds (5 minutes).
Setting transport_retry_time to 300 secondsini
transport_retry_time = 300s
After modifying main.cf, you must reload Postfix for the changes to take effect. You can typically do this using a command like sudo postfix reload or sudo systemctl reload postfix. It's also important to consider maximal_backoff_time and minimal_backoff_time, which define the minimum and maximum delays between consecutive retries, with Postfix using an exponential backoff strategy.
For specific issues like temporary deferral errors or when warming up new IP addresses, careful adjustments to these parameters can be extremely beneficial. You can find detailed information on these parameters in the Postfix postconf(5) manpage.
Fine-tuning and monitoring retransmission behavior
Adjusting retransmission times is not a set-it-and-forget-it task. It requires careful monitoring and fine-tuning. After making changes, closely observe your mail logs for signs of improved delivery or new issues. Tools like qshape can help you analyze your mail queue and identify bottlenecks. This allows you to see how long messages are sitting in the deferred queue and to which domains, guiding further adjustments. You should also consider how your Postfix settings interact with Yahoo's retry policies, for example, to avoid excessive deferrals.
Another parameter to consider is smtp_connect_timeout, which defines how long Postfix waits for an SMTP connection to establish. If you're seeing connection timeouts before even reaching a greylisting response, adjusting this can also be beneficial. Each recipient server has its own set of rules, and adapting your Postfix configuration to these variations is a continuous process for optimal deliverability.
Aggressive (shorter) retries
Pros: Quicker delivery once temporary issues are resolved. Can be effective for very short-term network glitches or transient server load issues.
Cons: May trigger rate limits or keep you stuck in greylisting loops if the retry interval is too short. Can put unnecessary load on your server and the recipient server. Risk of being added to a blocklist (or blacklist) for appearing to send unsolicited traffic.
Conservative (longer) retries
Pros: Better adherence to greylisting policies and rate limits, improving deliverability over time. Reduces the risk of your IP being flagged as suspicious. Less load on your Postfix server.
Cons: Messages stay in the queue longer, leading to increased delivery delays. Might cause some messages to time out and bounce if the recipient issue is prolonged and your maximal_queue_lifetime is too short.
The optimal retransmission time will vary depending on your sending volume, audience, and the specific recipient servers you frequently interact with. It's often a process of trial and error, combined with continuous monitoring. Being on top of your Postfix configuration is crucial for improving overall email deliverability.
Monitoring Postfix queue with qshape
The qshape utility is invaluable for understanding your Postfix queue. It helps identify which domains are causing deferrals and how long messages are waiting. For instance, running qshape deferred will show you a breakdown of deferred mail by destination. This data is critical for making informed decisions about your retransmission settings and addressing issues like email throttling and delays. The Postfix QSHAPE_README provides more context.
Views from the trenches
Best practices
Always back up your main.cf file before making any configuration changes to Postfix.
Start with small adjustments to retransmission times and monitor the impact closely, rather than making large leaps.
Regularly monitor your Postfix logs for deferred messages and 4xx SMTP responses to identify patterns.
Utilize Postfix's qshape utility to analyze your mail queue and pinpoint problematic domains or mail servers.
Common pitfalls
Setting retransmission times too short, leading to excessive retries that might trigger rate limits or permanent blocks.
Ignoring greylisting messages and assuming they are permanent failures, which can delay legitimate email delivery.
Not accounting for the exponential backoff strategy used by Postfix, which already increases retry intervals over time.
Failing to reload Postfix after making configuration changes, leading to the new settings not taking effect.
Expert tips
Consider segmenting your email traffic if you send to domains with vastly different retransmission or rate-limiting policies.
Look into external Postfix modules or policy daemons if you need more granular control over retry policies for specific domains or error types.
Combine retransmission adjustments with other deliverability best practices, such as proper SPF, DKIM, and DMARC configuration.
Continuously review recipient server feedback, including DMARC reports, to fine-tune your retransmission strategy.
Marketer view
Marketer from Email Geeks says they use Postfix as an SMTP for a hosting server and are receiving greylist messages across all MX records for the destination domain. This indicates a systemic issue with how their Postfix retries are interacting with the greylisting policy.
2020-07-31 - Email Geeks
Marketer view
Marketer from Email Geeks says they would assume that any greylisting would reset every time a retry occurs, suggesting a need for a longer initial wait period to allow the greylist to clear.
2020-07-31 - Email Geeks
Refining your Postfix configuration for optimal delivery
Modifying Postfix's retransmission time is a key aspect of optimizing email deliverability, especially when faced with temporary deferrals like those caused by greylisting. By strategically adjusting parameters like transport_retry_time, you can align your server's behavior with the expectations of recipient mail systems, reducing delays and improving the success rate of your email campaigns.
Remember that deliverability is a dynamic field, and consistent monitoring of your mail logs and queue performance is essential. Continuously adapting your Postfix configuration based on observed behavior will ensure your messages reliably reach the inbox, avoiding unnecessary bounces or prolonged deferrals.