Local queue
Queue module buffers messages on disk and retries delivery multiple times to another target to ensure reliable delivery.
It is also responsible for generation of DSN messages in case of delivery failures.
Arguments
First argument specifies directory to use for storage. Relative paths are relative to the StateDirectory.
Configuration directives
target.queue {
target remote
location ...
max_parallelism 16
max_tries 4
initial_retry_time 5m
retry_time_scale 1.25
post_init_delay 10s
bounce {
destination example.org {
deliver_to &local_mailboxes
}
default_destination {
reject
}
}
autogenerated_msg_domain example.org
hostname mx.example.org
debug no
}
target block_name
Required.
Default: not specified
Delivery target to use for final delivery.
location directory
Default: StateDirectory/configuration_block_name
File system directory to use to store queued messages. Relative paths are relative to the StateDirectory.
max_parallelism integer
Default: 16
Start up to integer goroutines for message processing. Basically, this option limits amount of messages tried to be delivered concurrently.
max_tries integer
Default: 20
Attempt delivery up to integer times. Note that no more attempts will be done if a permanent error occurred during previous attempt.
Delay before the next attempt is increased exponentially using the following
formula: initial_retry_time * retry_time_scale ^ (n - 1), where n is the
number of attempts already made. With default settings this gives you
approximately the following sequence of delays:
5mins, 6.25mins, 7.81mins, 9.76mins, 12.2mins, 15.2mins, 19mins, 23mins, ...
initial_retry_time duration
Default: 5m
Delay before the first retry after a temporary delivery failure. Subsequent
retry delays are multiplied by retry_time_scale.
retry_time_scale float
Default: 1.25
Multiplier applied to the delay after each attempt, producing exponential
growth of the interval between retries. See max_tries for the formula.
post_init_delay duration
Default: 10s
Minimum time to wait before retrying messages restored from the on-disk queue after start-up. If a message is scheduled to be retried sooner, its delivery is postponed until this delay has elapsed. This prevents a restart or a crash loop from immediately consuming delivery attempts.
bounce { ... }
Default: not specified
This configuration contains pipeline configuration to be used for generated DSN (Delivery Status Notification) messages.
If this is block is not present in configuration, DSNs will not be generated. Note, however, this is not what you want most of the time.
autogenerated_msg_domain domain
Default: global directive value
Domain to use in sender address for DSNs. Should be specified too if 'bounce' block is specified.
hostname domain
Default: global directive value
Hostname to use in the Reporting-MTA field of generated DSN messages. It is
also used as the hostname of the bounce pipeline, if one is specified.
debug boolean
Default: no
Enable verbose logging.