[SOLVED] Question about mail queue lifetime

killmasta93

Renowned Member
Aug 13, 2017
974
59
68
31
HI
Currently i was wondering if someone could shed some light,
sometimes emails stay in the mail queue for a while i was reading i can change the lifetime to put less time atleast 6 hours but not sure exacly were to change that?
because there was an email that never got delivered on the 17 of may but we never got the postmaster alert

Thank you
 
Hi!

You can achieve this by editing the service configuration template main.cf.in
Copy the template from /var/lib/pmg/templates/ to /etc/pmg/templates/ then apply your changes there
(see details here)
To change the default values (5 days) to 6 hours, add the following lines to the end of the file:
Code:
maximal_queue_lifetime = 6h
bounce_queue_lifetime = 6h
You can read about these parameters from the postfix manual:
maximal_queue_lifetime
bounce_queue_lifetime

After modifying the template, you need to run the following command:
Bash:
# pmgconfig sync --restart 1

I myself changed the defaults to 2 days

Regards