[SOLVED] Removing messages from the queue older than 1 days

max046

Member
Feb 26, 2024
31
4
8
Good afternoon, I'm trying to configure the removal of letters from the queue. To do this, I added to /etc/pmg/templates/main.cf.in:
maximal_queue_lifetime = 1d
bounce_queue_lifetime = 1d
Next, I ran pmgconfig sync --restart 1 and postqueue -f, but old messages continue to be in the queue.
Tell me how to fix it?
 
More precisely, if you run postqueue -f, then letters older than 1 day will be deleted, tell me where the interval for sending letters from the queue is configured?
 
Привет max046!

If for some recipients delivery failed for a transient reason (it might succeed later), the message is placed in the "deferred" queue.
Postfix waits for 5 minutes (queue_run_delay, default: 300s ) and checks its deferred queue and then sends again. It complies with the minimal_backoff_time (default: 300s). After that Postfix each time doubles the wait time period till it reaches maximal_backoff_time (default: 4000s or 66,6 minutes approximately). So then Postfix keep on trying approx. every hour for maximal_queue_lifetime (default: 5d).

I hope this helps!
 
Привет max046!

If for some recipients delivery failed for a transient reason (it might succeed later), the message is placed in the "deferred" queue.
Postfix waits for 5 minutes (queue_run_delay, default: 300s ) and checks its deferred queue and then sends again. It complies with the minimal_backoff_time (default: 300s). After that Postfix each time doubles the wait time period till it reaches maximal_backoff_time (default: 4000s or 66,6 minutes approximately). So then Postfix keep on trying approx. every hour for maximal_queue_lifetime (default: 5d).

I hope this helps!
Thanks.