Plesk for Linux
kb: how-to
ABT: Group B
Applicable to:
- Plesk for Linux
Question
In some cases, mail gets stuck for 5 days filling up the mail queue. How to change the mail queue lifetime in Postfix on a Plesk server?
Answer
By default, Postfix will keep trying to deliver mail for 5 days. The number of days is defined by the Postfix maximal_queue_lifetime
parameter.
To change this limit:
-
Connect to a server via SSH.
-
Run the command below specifying the number of days. In this example, we are setting the limit to 1 day:
# postconf -e 'maximal_queue_lifetime = 1d'
Note: Specify 0 when mail delivery should be tried only once.
-
Verify the changes:
# postconf | grep maximal_queue_lifetime
maximal_queue_lifetime = 1dNote: Postfix service restart is not required.
Comments
4 comments
what is the difference between
postconf -d | grep maximal_queue_lifetime
and
postconf | grep maximal_queue_lifetime
it shows two different values
root@lvps**cut**:/etc/postfix# postconf -d | grep maximal_queue_lifetime
maximal_queue_lifetime = 5d
root@lvps**cut**:/etc/postfix# postconf | grep maximal_queue_lifetime
maximal_queue_lifetime = 10d
Hello @Pera,
"-d" is for printing main.cf default parameter settings instead of actual settings.
This may be checked at the official Postfix website:
http://www.postfix.org/postconf.1.html
Does Plesk/Postfix Send a Email non-delivery report when the maximal_queue_lifetime has passed?
Hello Go Advised Group
I was unable to find such functionality in postfix itself.
In case you'll know how to achieve this, submit a feature suggestion here.
Please sign in to leave a comment.