For my link archive:
- [Wayback] email – Sending and receiving mails using Postfix/Dovecot – Server Fault
- [Wayback] rate limiting – Postfix throttling for outgoing messages – Server Fault (answer by [Wayback] User Deckard):
You need to set
default_destination_recipient_limit = 2
instead of 1. Because if set to 1 then the limit will only apply to the same recipient, not domain.
- [Wayback] connections – Postfix: define a global concurrency_limit – Server Fault
… [Wayback] User Maxxer:
Given that my problem is not related to the domain, I basically need to change the process limit.
the line to be changed is this, right?
smtp unix - - y - 5 smtp
… [Wayback] User Ingvar J:
Yes, this looks like the correct statement
…
-
- [Wayback] centos5 – postfix limit sending rate – Server Fault (answer by [Wayback] User Antti Rytsölä):
…
_destination_concurrency_limit
needs to be > 1.Value 1 will cause the destination to be full email, value >1 will cause the destination match the email domain. However the
destination_rate_relay
when set will always send one at a time.…
try
smtp_destination_recipient_limit = 2 smtp_destination_concurrency_limit = 2 smtp_destination_rate_delay = 1s
…
- [Wayback] centos5 – postfix limit sending rate – Server Fault (answer by [Wayback] User Antti Rytsölä):
-
The crux seems to be a combination of these parameters to do outgoing rate-limiting, for instance with these values:
default_destination_concurrency_limit = 30 default_destination_rate_delay = 5s
Here default_destination_concurrency_limit
needs to be larger than one (so mails are grouped by domain) in order for the default_destination_rate_delay
to have any effect at all.
You can even extend this to named transports as per [Wayback] Postfix Users – Create Custom Mail Queue answered by [Wayback] Ralf Hildebrandt
> Can I create custom mail queue in
/var/spool/postfix
to hold the mails for
> specific destination and schedule to deliver one by one for period of time,
> let’s say 2 mins.That’s not needed. Create a custom transport for the destination.
Then use
<nameofcustomtransport>_destination_rate_delay
= 120s
In the below bullets from the Postfix documentation, emphasis is mine.
- [Wayback]
Postfix Configuration Parameters:
main.cf- [Wayback] Postfix Configuration Parameters:
default_destination_concurrency_limit
default_destination_concurrency_limit
(default:20
)The default maximal number of parallel deliveries to the same destination. This is the default limit for delivery via the lmtp(8), pipe(8), smtp(8) and virtual(8) delivery agents. With per-destination recipient limit > 1, a destination is a domain, otherwise it is a recipient.
Use transport_destination_concurrency_limit to specify a transport-specific override, where transport is the
master.cf
name of the message delivery transport. - [Wayback]
Postfix Configuration Parameters: default_destination_rate_delay
default_destination_rate_delay
(default:0s
)The default amount of delay that is inserted between individual message deliveries to the same destination and over the same message delivery transport. Specify a non-zero value to rate-limit those message deliveries to at most one per $default_destination_rate_delay.
The resulting behavior depends on the value of the corresponding per-destination recipient limit.
- With a corresponding per-destination recipient limit > 1, the rate delay specifies the time between deliveries to the same domain. Different domains are delivered in parallel, subject to the process limits specified in
master.cf
. - With a corresponding per-destination recipient limit equal to 1, the rate delay specifies the time between deliveries to the same recipient. Different recipients are delivered in parallel, subject to the process limits specified in
master.cf
.
To enable the delay, specify a non-zero time value (an integral value plus an optional one-letter suffix that specifies the time unit).
Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). The default time unit is s (seconds).
NOTE: the delay is enforced by the queue manager. The delay timer state does not survive “
postfix reload
” or “postfix stop
“.Use
transport_destination_rate_delay
to specify a transport-specific override, where transport is themaster.cf
name of the message delivery transport.NOTE: with a non-zero
_destination_rate_delay
, specify atransport_destination_concurrency_failed_cohort_limit
of 10 or more to prevent Postfix from deferring all mail for the same destination after only one connection or handshake error.This feature is available in Postfix 2.5 and later.
- With a corresponding per-destination recipient limit > 1, the rate delay specifies the time between deliveries to the same domain. Different domains are delivered in parallel, subject to the process limits specified in
- [Wayback] Postfix Configuration Parameters:
default_process_limit
default_process_limit
(default:100
)The default maximal number of Postfix child processes that provide a given service. This limit can be overruled for specific services in the master.cf file.
- [Wayback] Postfix Configuration Parameters:
- [Wayback] Postfix manual – master(5):
master.cf
(whereProcess limit
is the7
th parameter on a configuration line)
…
Process limit (default: $default_process_limit) The maximum number of processes that may execute this service simultaneously. Specify 0 for no process count limit. NOTE: Some Postfix services must be configured as a sin- gle-process service (for example, qmgr(8)) and some services must be configured with no process limit (for example, cleanup(8)). These limits must not be changed.
…
–jeroen