Tuning Postfix Queue Settings

Revision as of 19:02, 8 August 2007 by Cfremon (talk | contribs) (Creating page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Some system administrators will want to control the queue lifetime or even how frequently a message in the deferred queue is selected for redelivery. This article contains information on configuring both Postfix queue lifetime and Postfix deferred queue parameters.

Note: Before changing the content of your Postfix configuration file, make a backup of the original /opt/zimbra/postfix/conf/main.cf file in case you need to restore your configuration. Be sure to also keep a backup of your changed Postfix configuration file, in order to restore your configuration after upgrading or reinstalling.

Reconfiguring the Postfix Queue Lifetime

The default queue lifetime is 5 days. After 5 days, messages in the deferred queue are returned to the sender with an “undelivered” notice. To change the queue lifetime, use the following steps.

To reconfigure the queue lifetime

1. Log in as root in the command line utility. Switch to the zimbra user account.

su - zimbra

2. Type the following command, replacing [time] with the new queue lifetime. Time can be in seconds (s), minutes (m), hours (h), days (d), and weeks (w).

postconf -e maximal_queue_lifetime=[time]

For example, to reconfigure the queue lifetime to 15 minutes, you would type:

postconf –e maximal_queue_lifetime=15m

The queue lifetime is now reconfigured. The changes will take effect immediately.

Reconfiguring Postfix Deferred Queue Parameters

Some administrators prefer to more tightly control the way mail in the deferred queue is handled. Three parameters determine how the mail in the deferred queue is handled by the queue manager: queue_run_delay, minimal_backoff_time, and maximal_backoff_time.

  • queue_run_delay determines the time between deferred queue scans by the queue manager. The default is 1,000 seconds (1000s). This time should be less than or equal to the minimal_backoff_time setting.
  • minimal_backoff_time determines the minimal time between attempts to deliver a deferred message. When a message is first placed in the deferred queue, the value of this setting is what determines when the first attempt to redeliver the message is made. The default is 1,000 seconds (1000s). This time should be equal to or greater than the queue_run_delay setting.
  • maximal_backoff_time determines the maximal time between attempts to deliver a message. The time between each attempt to deliver a deferred message will grow exponentially until it reaches the value in this setting. The attempted deliveries are repeated at this value until the queue lifetime is reached. The default is 4,000 seconds (4000s).

To reconfigure one or more of these settings, use the following steps.

To reconfigure a deferred queue parameter

1. Log in as root in the command line utility. Switch to the zimbra user account.

su - zimbra

2. Type the following command, replacing [parameter] with the parameter you want to reconfigure and replacing [time] with the new time. Time can be in seconds (s), minutes (m), hours (h), days (d), and weeks (w).

postconf -e [parameter]=[time]

To reconfigure multiple parameters, use this command for each parameter you want to reconfigure.

For example, to change the queue_run_delay parameter to 2,000 seconds and the minimal_backoff_time parameter to 2,000 seconds:

postconf –e queue_run_delay=2000s
postconf –e minimal_backoff_time=2000s

The deferred queue parameters are now reconfigured. The changes will take effect immediately.

Related Topics

Mail Queue Monitoring

Monitoring Zimbra Servers

Zimbra MTA

http://www.postfix.org/rate.html

Jump to: navigation, search