20071202
Feature: output rate control. For example, specify
- "smtp_delivery_rate_delay = 5m" to insert a five-minute
+ "smtp_destination_rate_delay = 5m" to insert a five-minute
delay between deliveries. This was an opportunity to define
the mutually exclusive states that a queue can have, and
to detect invalid transitions. This will make adding new
Bugfix (introduced 20080112): missing #ifdef for the SASL
login failure cache. File: smtp/smtp_sasl_auth_cache.h.
+
+20080123
+
+ Name fix: renamed the mumble_delivery_rate_delay parameter
+ to mumble_destination_rate_delay, because it really is a
+ per-destination feature. With this change we keep the option
+ of implementing a future per-transport rate delay.
that exhibits frequent brief bursts of errors and connection caching does not
solve the problem, there is a subtle workaround.
- * In master.cf set up a dedicated clone of the "smtp" transport for the
- destination in question.
+ * Postfix version 2.5 and later:
- * In master.cf configure a reasonable process limit for the transport (a
- number in the 10-20 range is typical).
+ o In master.cf set up a dedicated clone of the "smtp" transport for the
+ destination in question. In the example below we will call it
+ "fragile".
- * IMPORTANT!!! In main.cf configure a very large initial and destination
- concurrency limit for this transport (say 2000).
+ o In master.cf configure a reasonable process limit for the cloned smtp
+ transport (a number in the 10-20 range is typical).
- /etc/postfix/main.cf:
- initial_destination_concurrency = 2000
- transportname_destination_concurrency_limit = 2000
+ o IMPORTANT!!! In main.cf configure a large per-destination pseudo-cohort
+ failure limit for the cloned smtp transport.
- Where transportname is the name of the master.cf entry in question.
+ /etc/postfix/main.cf:
+ transport_maps = hash:/etc/postfix/transport
+ fragile_destination_concurrency_failed_cohort_limit = 100
+ fragile_destination_concurrency_limit = 20
-The effect of this surprising configuration is that up to 2000 consecutive
-errors are tolerated without marking the destination dead, while the total
-concurrency remains reasonable (10-20 processes). This trick is only for a very
-specialized situation: high volume delivery into a channel with multi-error
-bursts that is capable of high throughput, but is repeatedly throttled by the
-bursts of errors.
+ /etc/postfix/transport:
+ example.com fragile:
+
+ /etc/postfix/master.cf:
+ # service type private unpriv chroot wakeup maxproc command
+ fragile unix - - n - 20 smtp
+
+ See also the documentation for
+ default_destination_concurrency_failed_cohort_limit and
+ default_destination_concurrency_limit.
+
+ * Earlier Postfix versions:
+
+ o In master.cf set up a dedicated clone of the "smtp" transport for the
+ destination in question. In the example below we will call it
+ "fragile".
+
+ o In master.cf configure a reasonable process limit for the transport (a
+ number in the 10-20 range is typical).
+
+ o IMPORTANT!!! In main.cf configure a very large initial and destination
+ concurrency limit for this transport (say 2000).
+
+ /etc/postfix/main.cf:
+ transport_maps = hash:/etc/postfix/transport
+ initial_destination_concurrency = 2000
+ fragile_destination_concurrency_limit = 2000
+
+ /etc/postfix/transport:
+ example.com fragile:
+
+ /etc/postfix/master.cf:
+ # service type private unpriv chroot wakeup maxproc command
+ fragile unix - - n - 20 smtp
+
+ See also the documentation for default_destination_concurrency_limit.
+
+The effect of this configuration is that up to 2000 consecutive errors are
+tolerated without marking the destination dead, while the total concurrency
+remains reasonable (10-20 processes). This trick is only for a very specialized
+situation: high volume delivery into a channel with multi-error bursts that is
+capable of high throughput, but is repeatedly throttled by the bursts of
+errors.
When a destination is unable to handle the load even after the Postfix process
limit is reduced to 1, a desperate measure is to insert brief delays between
delivery attempts.
- * In the transport map entry for the problem destination, specify a dead host
- as the primary nexthop.
+ * Postfix version 2.5 and later:
+
+ o In master.cf set up a dedicated clone of the "smtp" transport for the
+ problem destination. In the example below we call it "slow".
+
+ o In main.cf configure a short delay between deliveries to the same
+ destination.
+
+ /etc/postfix/main.cf:
+ transport_maps = hash:/etc/postfix/transport
+ slow_destination_rate_delay = 1
+
+ /etc/postfix/transport:
+ example.com slow:
+
+ /etc/postfix/master.cf:
+ # service type private unpriv chroot wakeup maxproc command
+ slow unix - - n - - smtp
+
+ See also the documentation for default_destination_rate_delay.
+
+ This solution forces the Postfix smtp(8) client to wait for
+ $slow_destination_rate_delay seconds between deliveries to the same
+ destination.
+
+ * Earlier Postfix versions:
+
+ o In the transport map entry for the problem destination, specify a dead
+ host as the primary nexthop.
- * In the master.cf entry for the transport specify the problem destination as
- the fallback_relay and specify a small smtp_connect_timeout value.
+ o In the master.cf entry for the transport specify the problem
+ destination as the fallback_relay and specify a small
+ smtp_connect_timeout value.
- /etc/postfix/transport:
- problem.example.com slow:[dead.host]
+ /etc/postfix/main.cf:
+ transport_maps = hash:/etc/postfix/transport
- /etc/postfix/master.cf:
- # service type private unpriv chroot wakeup maxproc command
- slow unix - - n - 1 smtp
- -o fallback_relay=problem.example.com
- -o smtp_connect_timeout=1
+ /etc/postfix/transport:
+ example.com slow:[dead.host]
-This solution forces the Postfix smtp(8) client to wait for
-$smtp_connect_timeout seconds between deliveries. The solution depends on
-Postfix connection management details, and needs to be updated when SMTP
-connection caching is introduced.
+ /etc/postfix/master.cf:
+ # service type private unpriv chroot wakeup maxproc command
+ slow unix - - n - 1 smtp
+ -o fallback_relay=problem.example.com
+ -o smtp_connect_timeout=1
+ -o smtp_cache_connection=no
-Hopefully a more elegant solution to these problems will be found in the
-future.
+ This solution forces the Postfix smtp(8) client to wait for
+ $smtp_connect_timeout seconds between deliveries. The connection caching
+ feature is disabled to prevent the client from skipping over the dead host.
P\bPo\bos\bst\btf\bfi\bix\bx q\bqu\bue\beu\bue\be d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs
only.
[Feature 20071202] Output rate control in the queue manager. For
-example, specify "smtp_delivery_rate_delay = 5m", to pause five
+example, specify "smtp_destination_rate_delay = 5m", to pause five
minutes between message deliveries. More information in the postconf(5)
-manual under "default_delivery_rate_delay".
+manual under "default_destination_rate_delay".
Major changes - smtp client
---------------------------
$manpage_directory/man8/virtual.8:f:root:-:644
$sample_directory/sample-aliases.cf:f:root:-:644:o
$sample_directory/sample-auth.cf:f:root:-:644:o
-$sample_directory/sample-canonical.cf:f:root:-:644:o:o
+$sample_directory/sample-canonical.cf:f:root:-:644:o
$sample_directory/sample-compatibility.cf:f:root:-:644:o
$sample_directory/sample-debug.cf:f:root:-:644:o
-$sample_directory/sample-filter.cf:f:root:-:644:o:o
+$sample_directory/sample-filter.cf:f:root:-:644:o
$sample_directory/sample-flush.cf:f:root:-:644:o
$sample_directory/sample-ipv6.cf:f:root:-:644:o
$sample_directory/sample-ldap.cf:f:root:-:644:o
$sample_directory/sample-local.cf:f:root:-:644:o
$sample_directory/sample-mime.cf:f:root:-:644:o
$sample_directory/sample-misc.cf:f:root:-:644:o
-$sample_directory/sample-pcre-access.cf:f:root:-:644:o:o
-$sample_directory/sample-pcre-body.cf:f:root:-:644:o:o
-$sample_directory/sample-pcre-header.cf:f:root:-:644:o:o
+$sample_directory/sample-pcre-access.cf:f:root:-:644:o
+$sample_directory/sample-pcre-body.cf:f:root:-:644:o
+$sample_directory/sample-pcre-header.cf:f:root:-:644:o
$sample_directory/sample-pgsql-aliases.cf:f:root:-:644:o
$sample_directory/sample-qmqpd.cf:f:root:-:644:o
$sample_directory/sample-rate.cf:f:root:-:644:o
-$sample_directory/sample-regexp-access.cf:f:root:-:644:o:o
-$sample_directory/sample-regexp-body.cf:f:root:-:644:o:o
-$sample_directory/sample-regexp-header.cf:f:root:-:644:o:o
+$sample_directory/sample-regexp-access.cf:f:root:-:644:o
+$sample_directory/sample-regexp-body.cf:f:root:-:644:o
+$sample_directory/sample-regexp-header.cf:f:root:-:644:o
$sample_directory/sample-relocated.cf:f:root:-:644:o
$sample_directory/sample-resource.cf:f:root:-:644:o
$sample_directory/sample-rewrite.cf:f:root:-:644:o
<ul>
+<li> <p> Postfix version 2.5 and later: </p>
+
+<ul>
+
+<li> <p> In <a href="master.5.html">master.cf</a> set up a dedicated clone of the "smtp" transport
+for the destination in question. In the example below we will call
+it "fragile". </p>
+
+<li> <p> In <a href="master.5.html">master.cf</a> configure a reasonable process limit for the
+cloned smtp transport (a number in the 10-20 range is typical). </p>
+
+<li> <p> IMPORTANT!!! In <a href="postconf.5.html">main.cf</a> configure a large per-destination
+pseudo-cohort failure limit for the cloned smtp transport. </p>
+
+<pre>
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
+ <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
+ fragile_destination_concurrency_failed_cohort_limit = 100
+ fragile_destination_concurrency_limit = 20
+
+/etc/postfix/transport:
+ example.com fragile:
+
+/etc/postfix/<a href="master.5.html">master.cf</a>:
+ # service type private unpriv chroot wakeup maxproc command
+ fragile unix - - n - 20 smtp
+</pre>
+
+<p> See also the documentation for
+<a href="postconf.5.html#default_destination_concurrency_failed_cohort_limit">default_destination_concurrency_failed_cohort_limit</a> and
+<a href="postconf.5.html#default_destination_concurrency_limit">default_destination_concurrency_limit</a>. </p>
+
+</ul>
+
+<li> <p> Earlier Postfix versions: </p>
+
+<ul>
+
<li> <p> In <a href="master.5.html">master.cf</a> set up a dedicated clone of the "smtp"
-transport for the destination in question. </p>
+transport for the destination in question. In the example below
+we will call it "fragile". </p>
<li> <p> In <a href="master.5.html">master.cf</a> configure a reasonable process limit for the
transport (a number in the 10-20 range is typical). </p>
<pre>
/etc/postfix/<a href="postconf.5.html">main.cf</a>:
+ <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
<a href="postconf.5.html#initial_destination_concurrency">initial_destination_concurrency</a> = 2000
- <i>transportname</i>_destination_concurrency_limit = 2000
+ fragile_destination_concurrency_limit = 2000
+
+/etc/postfix/transport:
+ example.com fragile:
+
+/etc/postfix/<a href="master.5.html">master.cf</a>:
+ # service type private unpriv chroot wakeup maxproc command
+ fragile unix - - n - 20 smtp
</pre>
-<p> Where <i>transportname</i> is the name of the <a href="master.5.html">master.cf</a> entry
-in question. </p>
+<p> See also the documentation for <a href="postconf.5.html#default_destination_concurrency_limit">default_destination_concurrency_limit</a>.
+</p>
+
+</ul>
</ul>
-<p> The effect of this surprising configuration is that up to 2000
+<p> The effect of this configuration is that up to 2000
consecutive errors are tolerated without marking the destination
dead, while the total concurrency remains reasonable (10-20
processes). This trick is only for a very specialized situation:
<ul>
+<li> <p> Postfix version 2.5 and later: </p>
+
+<ul>
+
+<li> <p> In <a href="master.5.html">master.cf</a> set up a dedicated clone of the "smtp" transport
+for the problem destination. In the example below we call it "slow".
+</p>
+
+<li> <p> In <a href="postconf.5.html">main.cf</a> configure a short delay between deliveries to
+the same destination. </p>
+
+<pre>
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
+ <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
+ slow_destination_rate_delay = 1
+
+/etc/postfix/transport:
+ example.com slow:
+
+/etc/postfix/<a href="master.5.html">master.cf</a>:
+ # service type private unpriv chroot wakeup maxproc command
+ slow unix - - n - - smtp
+</pre>
+
+</ul>
+
+<p> See also the documentation for <a href="postconf.5.html#default_destination_rate_delay">default_destination_rate_delay</a>. </p>
+
+<p> This solution forces the Postfix <a href="smtp.8.html">smtp(8)</a> client to wait for
+$slow_destination_rate_delay seconds between deliveries to the same
+destination. </p>
+
+<li> <p> Earlier Postfix versions: </p>
+
+<ul>
+
<li> <p> In the transport map entry for the problem destination,
specify a dead host as the primary nexthop. </p>
<a href="postconf.5.html#smtp_connect_timeout">smtp_connect_timeout</a> value. </p>
<pre>
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
+ <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
+
/etc/postfix/transport:
- problem.example.com slow:[dead.host]
+ example.com slow:[dead.host]
/etc/postfix/<a href="master.5.html">master.cf</a>:
# service type private unpriv chroot wakeup maxproc command
slow unix - - n - 1 smtp
-o <a href="postconf.5.html#fallback_relay">fallback_relay</a>=problem.example.com
-o <a href="postconf.5.html#smtp_connect_timeout">smtp_connect_timeout</a>=1
+ -o smtp_cache_connection=no
</pre>
</ul>
<p> This solution forces the Postfix <a href="smtp.8.html">smtp(8)</a> client to wait for
-$<a href="postconf.5.html#smtp_connect_timeout">smtp_connect_timeout</a> seconds between deliveries. The solution
-depends on Postfix connection management details, and needs to be
-updated when SMTP connection caching is introduced. </p>
+$<a href="postconf.5.html#smtp_connect_timeout">smtp_connect_timeout</a> seconds between deliveries. The connection
+caching feature is disabled to prevent the client from skipping
+over the dead host. </p>
-<p> Hopefully a more elegant solution to these problems will be
-found in the future. </p>
+</ul>
<h2><a name="queues">Postfix queue directories</a></h2>
Available in Postfix version 2.5 and later:
- <b><a href="postconf.5.html#default_delivery_rate_delay">default_delivery_rate_delay</a> (0s)</b>
+ <b><a href="postconf.5.html#default_destination_rate_delay">default_destination_rate_delay</a> (0s)</b>
The default amount of delay that is inserted
between individual deliveries to the same destina-
tion; with per-destination recipient limit > 1, a
destination is a domain, otherwise it is a recipi-
ent.
- <b><a href="postconf.5.html#transport_delivery_rate_delay"><i>transport</i>_delivery_rate_delay</a> $<a href="postconf.5.html#default_delivery_rate_delay">default_delivery_rate_delay</a></b>
+ <b><a href="postconf.5.html#transport_destination_rate_delay"><i>transport</i>_destination_rate_delay</a> $<a href="postconf.5.html#default_destination_rate_delay">default_destina</a>-</b>
+ <b><a href="postconf.5.html#default_destination_rate_delay">tion_rate_delay</a></b>
Idem, for delivery via the named message <i>transport</i>.
<b>MISCELLANEOUS CONTROLS</b>
</pre>
-</DD>
-
-<DT><b><a name="default_delivery_rate_delay">default_delivery_rate_delay</a>
-(default: 0s)</b></DT><DD>
-
-<p> The default amount of delay that is inserted between individual
-deliveries to the same destination; with per-destination recipient
-limit > 1, a destination is a domain, otherwise it is a recipient.
-</p>
-
-<p> To enable the delay, specify a non-zero time value (an integral
-value plus an optional one-letter suffix that specifies the time
-unit). </p>
-
-<p> Time units: s (seconds), m (minutes), h (hours), d (days), w
-(weeks). The default time unit is s (seconds). </p>
-
-<p> NOTE: the delay is enforced by the queue manager. The delay
-timer state does not survive "postfix reload" or "postfix stop".
-</p>
-
-<p> Use <a href="postconf.5.html#transport_delivery_rate_delay"><i>transport</i>_delivery_rate_delay</a> to specify a
-transport-specific override, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
-name of the message delivery transport.
-</p>
-
-<p> This feature is available in Postfix 2.5 and later. </p>
-
-
</DD>
<DT><b><a name="default_delivery_slot_cost">default_delivery_slot_cost</a>
<p> This feature is available in Postfix 2.5 and later. </p>
+</DD>
+
+<DT><b><a name="default_destination_rate_delay">default_destination_rate_delay</a>
+(default: 0s)</b></DT><DD>
+
+<p> The default amount of delay that is inserted between individual
+deliveries to the same destination; with per-destination recipient
+limit > 1, a destination is a domain, otherwise it is a recipient.
+</p>
+
+<p> To enable the delay, specify a non-zero time value (an integral
+value plus an optional one-letter suffix that specifies the time
+unit). </p>
+
+<p> Time units: s (seconds), m (minutes), h (hours), d (days), w
+(weeks). The default time unit is s (seconds). </p>
+
+<p> NOTE: the delay is enforced by the queue manager. The delay
+timer state does not survive "postfix reload" or "postfix stop".
+</p>
+
+<p> Use <a href="postconf.5.html#transport_destination_rate_delay"><i>transport</i>_destination_rate_delay</a> to specify a
+transport-specific override, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
+name of the message delivery transport.
+</p>
+
+<p> This feature is available in Postfix 2.5 and later. </p>
+
+
</DD>
<DT><b><a name="default_destination_recipient_limit">default_destination_recipient_limit</a>
</p>
-</DD>
-
-<DT><b><a name="transport_delivery_rate_delay">transport_delivery_rate_delay</a>
-(default: $<a href="postconf.5.html#default_delivery_rate_delay">default_delivery_rate_delay</a>)</b></DT><DD>
-
-<p> A transport-specific override for the <a href="postconf.5.html#default_recipient_refill_delay">default_recipient_refill_delay</a>
-parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a> name of
-the message delivery transport. </p>
-
-<p> This feature is available in Postfix 2.5 and later. </p>
-
-
</DD>
<DT><b><a name="transport_delivery_slot_cost">transport_delivery_slot_cost</a>
<p> This feature is available in Postfix 2.5 and later. </p>
+</DD>
+
+<DT><b><a name="transport_destination_rate_delay">transport_destination_rate_delay</a>
+(default: $<a href="postconf.5.html#default_destination_rate_delay">default_destination_rate_delay</a>)</b></DT><DD>
+
+<p> A transport-specific override for the <a href="postconf.5.html#default_destination_rate_delay">default_destination_rate_delay</a>
+parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a> name of
+the message delivery transport. </p>
+
+<p> This feature is available in Postfix 2.5 and later. </p>
+
+
</DD>
<DT><b><a name="transport_destination_recipient_limit">transport_destination_recipient_limit</a>
Available in Postfix version 2.5 and later:
- <b><a href="postconf.5.html#default_delivery_rate_delay">default_delivery_rate_delay</a> (0s)</b>
+ <b><a href="postconf.5.html#default_destination_rate_delay">default_destination_rate_delay</a> (0s)</b>
The default amount of delay that is inserted
between individual deliveries to the same destina-
tion; with per-destination recipient limit > 1, a
destination is a domain, otherwise it is a recipi-
ent.
- <b><a href="postconf.5.html#transport_delivery_rate_delay"><i>transport</i>_delivery_rate_delay</a> $<a href="postconf.5.html#default_delivery_rate_delay">default_delivery_rate_delay</a></b>
+ <b><a href="postconf.5.html#transport_destination_rate_delay"><i>transport</i>_destination_rate_delay</a> $<a href="postconf.5.html#default_destination_rate_delay">default_destina</a>-</b>
+ <b><a href="postconf.5.html#default_destination_rate_delay">tion_rate_delay</a></b>
Idem, for delivery via the named message <i>transport</i>.
<b>MISCELLANEOUS CONTROLS</b>
.fi
.ad
.ft R
-.SH default_delivery_rate_delay (default: 0s)
-The default amount of delay that is inserted between individual
-deliveries to the same destination; with per-destination recipient
-limit > 1, a destination is a domain, otherwise it is a recipient.
-.PP
-To enable the delay, specify a non-zero time value (an integral
-value plus an optional one-letter suffix that specifies the time
-unit).
-.PP
-Time units: s (seconds), m (minutes), h (hours), d (days), w
-(weeks). The default time unit is s (seconds).
-.PP
-NOTE: the delay is enforced by the queue manager. The delay
-timer state does not survive "postfix reload" or "postfix stop".
-.PP
-Use \fItransport\fR_delivery_rate_delay to specify a
-transport-specific override, where \fItransport\fR is the master.cf
-name of the message delivery transport.
-.PP
-This feature is available in Postfix 2.5 and later.
.SH default_delivery_slot_cost (default: 5)
How often the Postfix queue manager's scheduler is allowed to
preempt delivery of one message with another.
is the master.cf name of the message delivery transport.
.PP
This feature is available in Postfix 2.5 and later.
+.SH default_destination_rate_delay (default: 0s)
+The default amount of delay that is inserted between individual
+deliveries to the same destination; with per-destination recipient
+limit > 1, a destination is a domain, otherwise it is a recipient.
+.PP
+To enable the delay, specify a non-zero time value (an integral
+value plus an optional one-letter suffix that specifies the time
+unit).
+.PP
+Time units: s (seconds), m (minutes), h (hours), d (days), w
+(weeks). The default time unit is s (seconds).
+.PP
+NOTE: the delay is enforced by the queue manager. The delay
+timer state does not survive "postfix reload" or "postfix stop".
+.PP
+Use \fItransport\fR_destination_rate_delay to specify a
+transport-specific override, where \fItransport\fR is the master.cf
+name of the message delivery transport.
+.PP
+This feature is available in Postfix 2.5 and later.
.SH default_destination_recipient_limit (default: 50)
The default maximal number of recipients per message delivery.
This is the default limit for delivery via the \fBlmtp\fR(8), \fBpipe\fR(8),
delivery is requested with "\fBsendmail -v\fR".
.PP
This feature is available in Postfix 2.1 and later.
-.SH transport_delivery_rate_delay (default: $default_delivery_rate_delay)
-A transport-specific override for the default_recipient_refill_delay
-parameter value, where \fItransport\fR is the master.cf name of
-the message delivery transport.
-.PP
-This feature is available in Postfix 2.5 and later.
.SH transport_delivery_slot_cost (default: $default_delivery_slot_cost)
A transport-specific override for the default_delivery_slot_cost
parameter value, where \fItransport\fR is the master.cf name of
transport.
.PP
This feature is available in Postfix 2.5 and later.
+.SH transport_destination_rate_delay (default: $default_destination_rate_delay)
+A transport-specific override for the default_destination_rate_delay
+parameter value, where \fItransport\fR is the master.cf name of
+the message delivery transport.
+.PP
+This feature is available in Postfix 2.5 and later.
.SH transport_destination_recipient_limit (default: $default_destination_recipient_limit)
A transport-specific override for the
default_destination_recipient_limit parameter value, where
undeliverable.
.PP
Available in Postfix version 2.5 and later:
-.IP "\fBdefault_delivery_rate_delay (0s)\fR"
+.IP "\fBdefault_destination_rate_delay (0s)\fR"
The default amount of delay that is inserted between individual
deliveries to the same destination; with per-destination recipient
limit > 1, a destination is a domain, otherwise it is a recipient.
-.IP "\fItransport\fB_delivery_rate_delay $default_delivery_rate_delay
+.IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay
Idem, for delivery via the named message \fItransport\fR.
.SH MISCELLANEOUS CONTROLS
.ad
undeliverable.
.PP
Available in Postfix version 2.5 and later:
-.IP "\fBdefault_delivery_rate_delay (0s)\fR"
+.IP "\fBdefault_destination_rate_delay (0s)\fR"
The default amount of delay that is inserted between individual
deliveries to the same destination; with per-destination recipient
limit > 1, a destination is a domain, otherwise it is a recipient.
-.IP "\fItransport\fB_delivery_rate_delay $default_delivery_rate_delay
+.IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay
Idem, for delivery via the named message \fItransport\fR.
.SH "MISCELLANEOUS CONTROLS"
.na
s;\bdefault_destination_concur[-</Bb>]*\n* *[<Bb>]*rency_positive_feedback\b;<a href="postconf.5.html#default_destination_concurrency_positive_feedback">$&</a>;g;
s;\bdefault_destination_con[-</Bb>]*\n* *[<Bb>]*currency_failed_cohort_limit\b;<a href="postconf.5.html#default_destination_concurrency_failed_cohort_limit">$&</a>;g;
s;\bdestination_concurrency_feedback_debug\b;<a href="postconf.5.html#destination_concurrency_feedback_debug">$&</a>;g;
- s;\bdefault_delivery_rate_delay\b;<a href="postconf.5.html#default_delivery_rate_delay">$&</a>;g;
+ s;\bdefault_destina[-</Bb>]*\n* *[<Bb>]*tion_rate_delay\b;<a href="postconf.5.html#default_destination_rate_delay">$&</a>;g;
s;\bqmqpd_error_delay\b;<a href="postconf.5.html#qmqpd_error_delay">$&</a>;g;
s;\bqmqpd_timeout\b;<a href="postconf.5.html#qmqpd_timeout">$&</a>;g;
s;(<i>transport</i>)(<b>)?(_recipient_refill_delay)\b;$2<a href="postconf.5.html#transport_recipient_refill_delay">$1$3</a>;g;
s;(<i>transport</i>)(<b>)?(_recipient_refill_limit)\b;$2<a href="postconf.5.html#transport_recipient_refill_limit">$1$3</a>;g;
s;(<i>transport</i>)(<b>)?(_time_limit)\b;$2<a href="postconf.5.html#transport_time_limit">$1$3</a>;g;
- s;(<i>transport</i>)(<b>)?(_delivery_rate_delay)\b;$2<a href="postconf.5.html#transport_delivery_rate_delay">$1$3</a>;g;
+ s;(<i>transport</i>)(<b>)?(_destination_rate_delay)\b;$2<a href="postconf.5.html#transport_destination_rate_delay">$1$3</a>;g;
# Undo hyperlinks of manual pages with the same name as parameters.
<ul>
+<li> <p> Postfix version 2.5 and later: </p>
+
+<ul>
+
+<li> <p> In master.cf set up a dedicated clone of the "smtp" transport
+for the destination in question. In the example below we will call
+it "fragile". </p>
+
+<li> <p> In master.cf configure a reasonable process limit for the
+cloned smtp transport (a number in the 10-20 range is typical). </p>
+
+<li> <p> IMPORTANT!!! In main.cf configure a large per-destination
+pseudo-cohort failure limit for the cloned smtp transport. </p>
+
+<pre>
+/etc/postfix/main.cf:
+ transport_maps = hash:/etc/postfix/transport
+ fragile_destination_concurrency_failed_cohort_limit = 100
+ fragile_destination_concurrency_limit = 20
+
+/etc/postfix/transport:
+ example.com fragile:
+
+/etc/postfix/master.cf:
+ # service type private unpriv chroot wakeup maxproc command
+ fragile unix - - n - 20 smtp
+</pre>
+
+<p> See also the documentation for
+default_destination_concurrency_failed_cohort_limit and
+default_destination_concurrency_limit. </p>
+
+</ul>
+
+<li> <p> Earlier Postfix versions: </p>
+
+<ul>
+
<li> <p> In master.cf set up a dedicated clone of the "smtp"
-transport for the destination in question. </p>
+transport for the destination in question. In the example below
+we will call it "fragile". </p>
<li> <p> In master.cf configure a reasonable process limit for the
transport (a number in the 10-20 range is typical). </p>
<pre>
/etc/postfix/main.cf:
+ transport_maps = hash:/etc/postfix/transport
initial_destination_concurrency = 2000
- <i>transportname</i>_destination_concurrency_limit = 2000
+ fragile_destination_concurrency_limit = 2000
+
+/etc/postfix/transport:
+ example.com fragile:
+
+/etc/postfix/master.cf:
+ # service type private unpriv chroot wakeup maxproc command
+ fragile unix - - n - 20 smtp
</pre>
-<p> Where <i>transportname</i> is the name of the master.cf entry
-in question. </p>
+<p> See also the documentation for default_destination_concurrency_limit.
+</p>
+
+</ul>
</ul>
-<p> The effect of this surprising configuration is that up to 2000
+<p> The effect of this configuration is that up to 2000
consecutive errors are tolerated without marking the destination
dead, while the total concurrency remains reasonable (10-20
processes). This trick is only for a very specialized situation:
<ul>
+<li> <p> Postfix version 2.5 and later: </p>
+
+<ul>
+
+<li> <p> In master.cf set up a dedicated clone of the "smtp" transport
+for the problem destination. In the example below we call it "slow".
+</p>
+
+<li> <p> In main.cf configure a short delay between deliveries to
+the same destination. </p>
+
+<pre>
+/etc/postfix/main.cf:
+ transport_maps = hash:/etc/postfix/transport
+ slow_destination_rate_delay = 1
+
+/etc/postfix/transport:
+ example.com slow:
+
+/etc/postfix/master.cf:
+ # service type private unpriv chroot wakeup maxproc command
+ slow unix - - n - - smtp
+</pre>
+
+</ul>
+
+<p> See also the documentation for default_destination_rate_delay. </p>
+
+<p> This solution forces the Postfix smtp(8) client to wait for
+$slow_destination_rate_delay seconds between deliveries to the same
+destination. </p>
+
+<li> <p> Earlier Postfix versions: </p>
+
+<ul>
+
<li> <p> In the transport map entry for the problem destination,
specify a dead host as the primary nexthop. </p>
smtp_connect_timeout value. </p>
<pre>
+/etc/postfix/main.cf:
+ transport_maps = hash:/etc/postfix/transport
+
/etc/postfix/transport:
- problem.example.com slow:[dead.host]
+ example.com slow:[dead.host]
/etc/postfix/master.cf:
# service type private unpriv chroot wakeup maxproc command
slow unix - - n - 1 smtp
-o fallback_relay=problem.example.com
-o smtp_connect_timeout=1
+ -o smtp_cache_connection=no
</pre>
</ul>
<p> This solution forces the Postfix smtp(8) client to wait for
-$smtp_connect_timeout seconds between deliveries. The solution
-depends on Postfix connection management details, and needs to be
-updated when SMTP connection caching is introduced. </p>
+$smtp_connect_timeout seconds between deliveries. The connection
+caching feature is disabled to prevent the client from skipping
+over the dead host. </p>
-<p> Hopefully a more elegant solution to these problems will be
-found in the future. </p>
+</ul>
<h2><a name="queues">Postfix queue directories</a></h2>
<p> This feature is available in Postfix 2.4 and later. </p>
-%PARAM default_delivery_rate_delay 0s
+%PARAM default_destination_rate_delay 0s
<p> The default amount of delay that is inserted between individual
deliveries to the same destination; with per-destination recipient
timer state does not survive "postfix reload" or "postfix stop".
</p>
-<p> Use <i>transport</i>_delivery_rate_delay to specify a
+<p> Use <i>transport</i>_destination_rate_delay to specify a
transport-specific override, where <i>transport</i> is the master.cf
name of the message delivery transport.
</p>
<p> This feature is available in Postfix 2.5 and later. </p>
-%PARAM transport_delivery_rate_delay $default_delivery_rate_delay
+%PARAM transport_destination_rate_delay $default_destination_rate_delay
-<p> A transport-specific override for the default_recipient_refill_delay
+<p> A transport-specific override for the default_destination_rate_delay
parameter value, where <i>transport</i> is the master.cf name of
the message delivery transport. </p>
#define DEF_CONC_FDBACK_DEBUG 0
extern bool var_conc_feedback_debug;
-#define VAR_DEST_RATE_DELAY "default_delivery_rate_delay"
-#define _DEST_RATE_DELAY "_delivery_rate_delay"
+#define VAR_DEST_RATE_DELAY "default_destination_rate_delay"
+#define _DEST_RATE_DELAY "_destination_rate_delay"
#define DEF_DEST_RATE_DELAY "0s"
extern int var_dest_rate_delay;
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20080116"
-#define MAIL_VERSION_NUMBER "2.5.0-RC2"
+#define MAIL_RELEASE_DATE "20080123"
+#define MAIL_VERSION_NUMBER "2.5.0"
#ifdef SNAPSHOT
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
/* undeliverable.
/* .PP
/* Available in Postfix version 2.5 and later:
-/* .IP "\fBdefault_delivery_rate_delay (0s)\fR"
+/* .IP "\fBdefault_destination_rate_delay (0s)\fR"
/* The default amount of delay that is inserted between individual
/* deliveries to the same destination; with per-destination recipient
/* limit > 1, a destination is a domain, otherwise it is a recipient.
-/* .IP "\fItransport\fB_delivery_rate_delay $default_delivery_rate_delay
+/* .IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay
/* Idem, for delivery via the named message \fItransport\fR.
/* .SH MISCELLANEOUS CONTROLS
/* .ad
vars["destination_concurrency_positive_feedback"] = "default_destination_concurrency_positive_feedback"
vars["destination_recipient_limit"] = "default_destination_recipient_limit"
vars["initial_destination_concurrency"] = "initial_destination_concurrency"
- vars["delivery_rate_delay"] = "default_delivery_rate_delay"
+ vars["destination_rate_delay"] = "default_destination_rate_delay"
# auto_table.h
/* undeliverable.
/* .PP
/* Available in Postfix version 2.5 and later:
-/* .IP "\fBdefault_delivery_rate_delay (0s)\fR"
+/* .IP "\fBdefault_destination_rate_delay (0s)\fR"
/* The default amount of delay that is inserted between individual
/* deliveries to the same destination; with per-destination recipient
/* limit > 1, a destination is a domain, otherwise it is a recipient.
-/* .IP "\fItransport\fB_delivery_rate_delay $default_delivery_rate_delay
+/* .IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay
/* Idem, for delivery via the named message \fItransport\fR.
/* MISCELLANEOUS CONTROLS
/* .ad
*/
#define CACHE_DICT_OPEN_FLAGS \
(DICT_FLAG_DUP_REPLACE | DICT_FLAG_SYNC_UPDATE)
+#define PROXY_COLON DICT_TYPE_PROXY ":"
+#define PROXY_COLON_LEN (sizeof(PROXY_COLON) - 1)
- if (strncmp(map, DICT_TYPE_PROXY, sizeof(DICT_TYPE_PROXY) - 1) != 0
- || map[sizeof(DICT_TYPE_PROXY) - 1] != ':')
+ if (strncmp(map, PROXY_COLON, PROXY_COLON_LEN) != 0)
msg_fatal("SASL authentication cache name \"%s\" must start with \""
- DICT_TYPE_PROXY "\":", map);
+ PROXY_COLON, map);
auth_cache = (SMTP_SASL_AUTH_CACHE *) mymalloc(sizeof(*auth_cache));
auth_cache->dict = dict_open(map, O_CREAT | O_RDWR, CACHE_DICT_OPEN_FLAGS);
return (vstring_export(val_buf));
}
-/* smtp_sasl_auth_cache_valid - validate auth failure cache value */
+/* smtp_sasl_auth_cache_valid_value - validate auth failure cache value */
-static int smtp_sasl_auth_cache_valid(SMTP_SASL_AUTH_CACHE *auth_cache,
+static int smtp_sasl_auth_cache_valid_value(SMTP_SASL_AUTH_CACHE *auth_cache,
const char *entry,
const char *password)
{
key = smtp_sasl_auth_cache_make_key(session->host, session->sasl_username);
if ((entry = dict_get(auth_cache->dict, key)) != 0)
- if ((valid = smtp_sasl_auth_cache_valid(auth_cache, entry,
+ if ((valid = smtp_sasl_auth_cache_valid_value(auth_cache, entry,
session->sasl_passwd)) == 0)
/* Remove expired, password changed, or malformed cache entry. */
if (dict_del(auth_cache->dict, key) == 0)
/* workarounds may be enabled that depend on the socket type.
/* BUGS
/* Bizarre systems may have other harmless error results. Such
-/* systems encourage programers to ignore error results, and
-/* penalizes programmers who code defensively.
+/* systems encourage programmers to ignore error results, and
+/* penalize programmers who code defensively.
/* LICENSE
/* .ad
/* .fi
/* known harmless error results to EAGAIN.
/* BUGS
/* Bizarre systems may have other harmless error results. Such
-/* systems encourage programers to ignore error results, and
-/* penalizes programmers who code defensively.
+/* systems encourage programmers to ignore error results, and
+/* penalize programmers who code defensively.
/* LICENSE
/* .ad
/* .fi
/* skips over silly error results such as EINTR.
/* BUGS
/* Bizarre systems may have other harmless error results. Such
-/* systems encourage programers to ignore error results, and
-/* penalizes programmers who code defensively.
+/* systems encourage programmers to ignore error results, and
+/* penalize programmers who code defensively.
/* LICENSE
/* .ad
/* .fi