HowTo: adjust the time until warnings or errors for temporarily undeliverable messages are sent

The defaults for warning and error messages in Postfix for messages that can not be delivered temporarily are defined by:

root@ucs01:~# postconf | egrep "delay_warning_time|queue_lifetime"
bounce_queue_lifetime = 5d
delay_warning_time = 0h
maximal_queue_lifetime = 5d

Currently (UCS 4.4-4) these settings can not be controlled by UCR. Instead, they can be adjusted by main.cf.local

The following example will enable warning messages sent after 1 hour and set the maximal timeframe for delivery attempts to 1 day.

cat >> /etc/postfix/main.cf.local <<__EOF__
delay_warning_time=1h
maximal_queue_lifetime=1d
bounce_queue_lifetime=1d
__EOF__

ucr commit /etc/postfix/main.cf 

service postfix restart

Verification:

root@ucs01:~# postconf | egrep "delay_warning_time|queue_lifetime"
bounce_queue_lifetime = 1d
delay_warning_time = 1h
maximal_queue_lifetime = 1d


2 Likes
Mastodon