]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.8-20101103
authorWietse Venema <wietse@porcupine.org>
Wed, 3 Nov 2010 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:36:38 +0000 (06:36 +0000)
33 files changed:
postfix/HISTORY
postfix/README_FILES/ADDRESS_VERIFICATION_README
postfix/README_FILES/POSTSCREEN_README
postfix/RELEASE_NOTES
postfix/WISHLIST
postfix/html/ADDRESS_VERIFICATION_README.html
postfix/html/POSTSCREEN_README.html
postfix/html/oqmgr.8.html
postfix/html/postconf.5.html
postfix/html/postscreen.8.html
postfix/html/qmgr.8.html
postfix/man/man5/postconf.5
postfix/man/man8/oqmgr.8
postfix/man/man8/postscreen.8
postfix/man/man8/qmgr.8
postfix/mantools/postlink
postfix/proto/ADDRESS_VERIFICATION_README.html
postfix/proto/POSTSCREEN_README.html
postfix/proto/postconf.proto
postfix/src/cleanup/Makefile.in
postfix/src/cleanup/cleanup.h
postfix/src/cleanup/cleanup_addr.c
postfix/src/cleanup/cleanup_milter.c
postfix/src/dnsblog/dnsblog.c
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/oqmgr/qmgr.c
postfix/src/postscreen/postscreen.c
postfix/src/postscreen/postscreen.h
postfix/src/postscreen/postscreen_state.c
postfix/src/postscreen/postscreen_tests.c
postfix/src/qmgr/qmgr.c
postfix/src/smtpd/smtpd_check.c

index 20fa1ee173ae7c08398c3e38bf755ddb2cac25da..f6d0de624364c57efeb424a93a2528c7e672684a 100644 (file)
@@ -16040,6 +16040,21 @@ Apologies for any names omitted.
        postscreen/postscreen_misc.c, postscreen/postscreen.h,
        postscreen/postscreen_tests.c.
 
+       Feature: preliminary postscreen penalty mechanism. Basic
+       idea: when a client exceeds some threshold, don't allow it
+       to pass any tests until the penalty expires. Penalties
+       provide a way to slow down clients without blocking mail
+       permanently.  Files: postscreen/postscreen_misc.c,
+       postscreen/postscreen_tests.c, postscreen/postscreen.c.
+
+       A first application of the postscreen penalty mechanism
+       triggers on clients that make brief connections to find out
+       if the mail server is up.  With "postscreen_early_hangup_penalty
+       = 600" they will disqualify themselves for 10 minutes.
+       Unfortunately, this behavior is used by legitimate bulk
+       mail services. This application was removed 20101103.  The
+       penalty mechanism itself is left in place as #ifdef NONPROD.
+
 20100923
 
        Cleanup: renamed MUMBLE_FLAG_MUMBLE aggregates to
@@ -16076,3 +16091,35 @@ Apologies for any names omitted.
 20101007
 
        Bugfix (introduced: 2100923): duplicate "PASS OLD" logging.
+       File: postscreen/postscreen_misc.c.
+
+20101008
+
+       Cleanup: dnsblog now logs "addr X listed by domain Y as Z"
+       instead of "addr X blocked by domain Y as Z", because the
+       service may be used for whitelist lookups. File:
+       dnsblog/dnsblog.c.
+
+20101023
+
+       Cleanup: don't apply reject_rhsbl_helo to non-domain forms
+       such as network addresses.  This would cause false positives
+       with dbl.spamhaus.org.  File: smtpd/smtpd_check.c.
+
+20101103
+
+       Cleanup: new qmgr_ipc_timeout parameter (default: 60s) to
+       override the system-wide ipc_timeout setting (default:
+       3600s). The shorter timeout allows the queue manager to
+       reset a deadlocked IPC connection before the watchdog timer
+       goes off. Files: *qmgr/qmgr.c.
+
+       Cleanup: new qmgr_daemon_timeout parameter (default: 1000s)
+       to make the hard-coded 1000s watchdog timeout configurable.
+       Files: *qmgr/qmgr.c.
+
+       Cleanup: request default DSN notification when adding a
+       recipient with smfi_addrcpt, instead of requesting "never
+       notify" as with Postfix automatically-added BCC recipients.
+       Files: cleanup/cleanup_addr.c, cleanup/cleanup.h,
+       cleanup/cleanup_milter.c.
index 97dd381c3b8f7a44a3d485ddc05c59181164944a..3d1a09f1aeff6ff2e32ad54d9352395c9853e3e1 100644 (file)
@@ -121,7 +121,7 @@ L\bLi\bim\bmi\bit\bta\bat\bti\bio\bon\bns\bs o\bof\bf a\bad\bdd\bdr\bre\bes\bss\bs v\bve\ber\bri\bif\bfi\b
     You can change the probe sender address into the null address
     ("address_verify_sender ="). This is UNSAFE because address probes will
     fail with mis-configured sites that reject MAIL FROM: <>, while probes from
-    "postmaster@$myorigin" would succeed.
+    "double-bounce@$myorigin" would succeed.
 
 R\bRe\bec\bci\bip\bpi\bie\ben\bnt\bt a\bad\bdd\bdr\bre\bes\bss\bs v\bve\ber\bri\bif\bfi\bic\bca\bat\bti\bio\bon\bn
 
index 988b070a8074803ff8f1fa447ba2c9554aba85cf..d06b7237c2cdc146cdec27508cb80c62e89b9d05 100644 (file)
@@ -217,7 +217,7 @@ postscreen_dnsbl_action, respectively.
 i\big\bgn\bno\bor\bre\be (default)
     Ignore the failure of this test. Allow other tests to complete. Repeat this
     test the next time the client connects. This option is useful for testing
-    and collecting statistics without interfering with mail deliveries.
+    and collecting statistics without blocking mail.
 e\ben\bnf\bfo\bor\brc\bce\be
     Allow other tests to complete. Reject attempts to deliver mail with a 550
     SMTP reply, and log the helo/sender/recipient information. Repeat this test
index 630b2cee754b7615ccf3e3d9e380bbd56cb9460a..91a2e837cc62c45434aa37bfa18414da88a38524 100644 (file)
@@ -33,13 +33,21 @@ This is supported only when the default value is stress-dependent
 postscreen parameters always evaluate as if the stress value is 
 equal to the empty string.
 
+Incompatibility with snapshot 20101103
+======================================
+
+Postfix now requests default delivery status notifications when
+adding a recipient with the Milter smfi_addrcpt action, instead of
+"never notify" as with Postfix automatically-added recipients
+(always_bcc and sender/recipient_bcc_maps).
+
 Incompatibility with snapshot 20101006
 ======================================
 
-To avoid repeated delivery to mailing list members with pathological
-nested alias configurations, the local(8) delivery agent now keeps
-the owner-alias attribute of the parent alias, when delivering mail
-to a child alias that does not have its own owner alias.
+To avoid repeated delivery to mailing lists with pathological nested
+alias configurations, the local(8) delivery agent now keeps the
+owner-alias attribute of a parent alias, when delivering mail to a
+child alias that does not have its own owner alias.
 
 With this change, local addresses from that child alias will be
 written to a new queue file, and a temporary error with one local
@@ -47,6 +55,9 @@ address will no longer result in repeated delivery to other mailing
 list members.  Specify "reset_owner_alias = yes" for the older,
 more fragile, behavior.
 
+The postconf(5) manpage entry for "reset_owner_alias" has more
+background information on this issue.
+
 Incompatibility with snapshot 20100912
 ======================================
 
index 77871f84e738099c6ed9582583499349cbbd4d31..cf0c54e57e5bba5c045bb04bbad8bdad56c48f9e 100644 (file)
@@ -2,9 +2,18 @@ Wish list:
 
        Remove this file from the stable release.
 
+       anvil rate limit for sasl_username.
+
+       Support filtering of messages that are generated by Postfix:
+       This would apply to postmaster notices and bounce messages
+       (DKIM), and address verification (BATV).
+
+       Replace sscanf() numerical conversions by strto[dl]()
+       for better error reporting.
+
        Consistency: in postconf.proto make <dt>..</dt> tags bold.
 
-       Milter addrcpt - use Sendmail default DSN
+       Milter addrcpt - use Sendmail-compatible default DSN settings.
 
        postscreen(8): listen on multiple IP addresses and enforce
        that the client contacts the primary MX address first (i.e.
index 6ea0ab6363c872a6c084688fddd4f1c73e903317..00d555c9ee56099232f2a9102ebe8c5e2ab78208 100644 (file)
@@ -243,7 +243,7 @@ server does not reject mail for this address. </p>
 ("<a href="postconf.5.html#address_verify_sender">address_verify_sender</a>
 ="). This is UNSAFE because address probes will fail with
 mis-configured sites that reject MAIL FROM:  &lt;&gt;, while
-probes from "postmaster@$<a href="postconf.5.html#myorigin">myorigin</a>" would succeed. </p>
+probes from "double-bounce@$<a href="postconf.5.html#myorigin">myorigin</a>" would succeed. </p>
 
 </ul>
 
index bbbeabff38245dcfa9deab5327ea03a041139aed..4f2a1fd186838c3167272a66aea38867921067a2 100644 (file)
@@ -295,8 +295,8 @@ or <a href="postconf.5.html#postscreen_dnsbl_action">postscreen_dnsbl_action</a>
 
 <dd> Ignore the failure of this test. Allow other tests to complete.
 Repeat this test the next time the client connects.  This option
-is useful for testing and collecting statistics without interfering
-with mail deliveries. </dd>
+is useful for testing and collecting statistics without blocking
+mail. </dd>
 
 <dt> <b>enforce</b> </dt>
 
@@ -506,6 +506,21 @@ feature. </dd>
 unexpectedly, <i>time</i> seconds after the start of the
 test named <i>test name</i>. </p>
 
+<!--
+
+<p> While an unexpired penalty is in effect, an SMTP client is not
+allowed to pass any tests, and  <a href="postscreen.8.html">postscreen(8)</a> logs each connection
+with the remaining amount of penalty time as: </p>
+
+<pre>
+    <b>PENALTY</b> <i>time</i> <b>for</b> <i>address</i>
+</pre>
+
+<p> During this time, all attempts by the client to deliver mail
+will be deferred with a 450 SMTP status.  </p>
+
+-->
+
 <p> The following errors are reported by the built-in SMTP engine.
 This engine never accepts mail, therefore it has per-session limits
 on the number of commands and on the session length. </p>
index 5e6db842baab959252e940fc4db09390a687ab3a..43116cae01ecbdeaa1a03f25ad415cb064cbd5f5 100644 (file)
@@ -324,6 +324,17 @@ OQMGR(8)                                                              OQMGR(8)
        <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>SAFETY CONTROLS</b>
+       <b><a href="postconf.5.html#qmgr_daemon_timeout">qmgr_daemon_timeout</a> (1000s)</b>
+              How  much  time a Postfix queue manager process may
+              take to handle a request before it is terminated by
+              a built-in watchdog timer.
+
+       <b><a href="postconf.5.html#qmgr_ipc_timeout">qmgr_ipc_timeout</a> (60s)</b>
+              The  time  limit  for  the queue manager to send or
+              receive information over an internal  communication
+              channel.
+
 <b>MISCELLANEOUS CONTROLS</b>
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
               The  default  location  of  the Postfix <a href="postconf.5.html">main.cf</a> and
@@ -342,28 +353,24 @@ OQMGR(8)                                                              OQMGR(8)
               Log  warnings  about problematic configuration set-
               tings, and provide helpful suggestions.
 
-       <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
-              The time limit for sending or receiving information
-              over an internal communication channel.
-
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The  process  ID  of  a  Postfix  command or daemon
+              The process ID  of  a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The process name of a  Postfix  command  or  daemon
+              The  process  name  of  a Postfix command or daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The  location of the Postfix top-level queue direc-
+              The location of the Postfix top-level queue  direc-
               tory.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              The mail system  name  that  is  prepended  to  the
-              process  name  in  syslog  records, so that "smtpd"
+              The  mail  system  name  that  is  prepended to the
+              process name in syslog  records,  so  that  "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>FILES</b>
@@ -386,7 +393,7 @@ OQMGR(8)                                                              OQMGR(8)
        <a href="QSHAPE_README.html">QSHAPE_README</a>, Postfix queue analysis
 
 <b>LICENSE</b>
-       The  Secure  Mailer  license must be distributed with this
+       The Secure Mailer license must be  distributed  with  this
        software.
 
 <b>AUTHOR(S)</b>
index 27ad367f4470c05822fd1859830f298697df638b..a785cbdd3cde90b32e2add6d8fd497fa981e0c30 100644 (file)
@@ -6980,8 +6980,9 @@ one-letter suffix that specifies the time unit).  Time units: s
 <DT><b><a name="postscreen_forbidden_commands">postscreen_forbidden_commands</a>
 (default: $<a href="postconf.5.html#smtpd_forbidden_commands">smtpd_forbidden_commands</a>)</b></DT><DD>
 
-<p> List of commands that <a href="postscreen.8.html">postscreen(8)</a> server considers in violation
-of the SMTP protocol. See also: <a href="postconf.5.html#postscreen_non_smtp_command_action">postscreen_non_smtp_command_action</a>.
+<p> List of commands that the <a href="postscreen.8.html">postscreen(8)</a> server considers in
+violation of the SMTP protocol. See <a href="postconf.5.html#smtpd_forbidden_commands">smtpd_forbidden_commands</a> for
+syntax, and <a href="postconf.5.html#postscreen_non_smtp_command_action">postscreen_non_smtp_command_action</a> for possible actions.
 </p>
 
 <p> This feature is available in Postfix 2.8.  </p>
@@ -7480,6 +7481,21 @@ This feature is available in Postfix 2.0 and later.
 </p>
 
 
+</DD>
+
+<DT><b><a name="qmgr_daemon_timeout">qmgr_daemon_timeout</a>
+(default: 1000s)</b></DT><DD>
+
+<p> How much time a Postfix queue manager process may take to handle
+a request before it is terminated by a built-in watchdog timer.
+</p>
+
+<p>
+Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+The default time unit is s (seconds).
+</p>
+
+
 </DD>
 
 <DT><b><a name="qmgr_fudge_factor">qmgr_fudge_factor</a>
@@ -7497,6 +7513,22 @@ current queue manager solves the problem in a better way.
 </p>
 
 
+</DD>
+
+<DT><b><a name="qmgr_ipc_timeout">qmgr_ipc_timeout</a>
+(default: 60s)</b></DT><DD>
+
+<p> The time limit for the queue manager to send or receive information
+over an internal communication channel.  The purpose is to break
+out of deadlock situations. If the time limit is exceeded the
+software either retries or aborts the operation. </p>
+
+<p>
+Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+The default time unit is s (seconds).
+</p>
+
+
 </DD>
 
 <DT><b><a name="qmgr_message_active_limit">qmgr_message_active_limit</a>
index 3e13d95ce9fa518d1afec81e4d9db3266e9a41c5..45a4c6f6732b45e8df240e2fa758efaa8eb73aba 100644 (file)
@@ -137,8 +137,8 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
               defined  with the <a href="postconf.5.html#postscreen_dnsbl_sites">postscreen_dnsbl_sites</a> parameter.
 
        <b><a href="postconf.5.html#postscreen_forbidden_commands">postscreen_forbidden_commands</a> ($<a href="postconf.5.html#smtpd_forbidden_commands">smtpd_forbidden_commands</a>)</b>
-              List of commands that <a href="postscreen.8.html"><b>postscreen</b>(8)</a> server  consid-
-              ers in violation of the SMTP protocol.
+              List of commands that the <a href="postscreen.8.html"><b>postscreen</b>(8)</a> server con-
+              siders in violation of the SMTP protocol.
 
        <b><a href="postconf.5.html#postscreen_greet_action">postscreen_greet_action</a> (ignore)</b>
               The  action  that  <a href="postscreen.8.html"><b>postscreen</b>(8)</a> takes when an SMTP
index 7293c8645c60b65614ec0c9c93d8b024b1747217..06aa2f69266bfa847776695c1fbfbfa1fdc89b55 100644 (file)
@@ -396,6 +396,17 @@ QMGR(8)                                                                QMGR(8)
        <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>SAFETY CONTROLS</b>
+       <b><a href="postconf.5.html#qmgr_daemon_timeout">qmgr_daemon_timeout</a> (1000s)</b>
+              How  much  time a Postfix queue manager process may
+              take to handle a request before it is terminated by
+              a built-in watchdog timer.
+
+       <b><a href="postconf.5.html#qmgr_ipc_timeout">qmgr_ipc_timeout</a> (60s)</b>
+              The  time  limit  for  the queue manager to send or
+              receive information over an internal  communication
+              channel.
+
 <b>MISCELLANEOUS CONTROLS</b>
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
               The  default  location  of  the Postfix <a href="postconf.5.html">main.cf</a> and
@@ -414,28 +425,24 @@ QMGR(8)                                                                QMGR(8)
               Log  warnings  about problematic configuration set-
               tings, and provide helpful suggestions.
 
-       <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
-              The time limit for sending or receiving information
-              over an internal communication channel.
-
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The  process  ID  of  a  Postfix  command or daemon
+              The process ID  of  a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The process name of a  Postfix  command  or  daemon
+              The  process  name  of  a Postfix command or daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The  location of the Postfix top-level queue direc-
+              The location of the Postfix top-level queue  direc-
               tory.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              The mail system  name  that  is  prepended  to  the
-              process  name  in  syslog  records, so that "smtpd"
+              The  mail  system  name  that  is  prepended to the
+              process name in syslog  records,  so  that  "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>FILES</b>
@@ -459,7 +466,7 @@ QMGR(8)                                                                QMGR(8)
        <a href="QSHAPE_README.html">QSHAPE_README</a>, Postfix queue analysis
 
 <b>LICENSE</b>
-       The  Secure  Mailer  license must be distributed with this
+       The Secure Mailer license must be  distributed  with  this
        software.
 
 <b>AUTHOR(S)</b>
index 024612ec66704071464f9d48b7712c02736c18b6..d231402222001ec20acce7394fa6c63e774fad2f 100644 (file)
@@ -3963,8 +3963,9 @@ one-letter suffix that specifies the time unit).  Time units: s
 .PP
 This feature is available in Postfix 2.8.
 .SH postscreen_forbidden_commands (default: $smtpd_forbidden_commands)
-List of commands that \fBpostscreen\fR(8) server considers in violation
-of the SMTP protocol. See also: postscreen_non_smtp_command_action.
+List of commands that the \fBpostscreen\fR(8) server considers in
+violation of the SMTP protocol. See smtpd_forbidden_commands for
+syntax, and postscreen_non_smtp_command_action for possible actions.
 .PP
 This feature is available in Postfix 2.8.
 .SH postscreen_greet_action (default: ignore)
@@ -4246,6 +4247,12 @@ clogging up the Postfix active queue. Specify 0 to disable.
 This feature is enabled with the helpful_warnings parameter.
 .PP
 This feature is available in Postfix 2.0 and later.
+.SH qmgr_daemon_timeout (default: 1000s)
+How much time a Postfix queue manager process may take to handle
+a request before it is terminated by a built-in watchdog timer.
+.PP
+Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+The default time unit is s (seconds).
 .SH qmgr_fudge_factor (default: 100)
 Obsolete feature: the percentage of delivery resources that a busy
 mail system will use up for delivery of a large mailing  list
@@ -4253,6 +4260,14 @@ message.
 .PP
 This feature exists only in the \fBoqmgr\fR(8) old queue manager. The
 current queue manager solves the problem in a better way.
+.SH qmgr_ipc_timeout (default: 60s)
+The time limit for the queue manager to send or receive information
+over an internal communication channel.  The purpose is to break
+out of deadlock situations. If the time limit is exceeded the
+software either retries or aborts the operation.
+.PP
+Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+The default time unit is s (seconds).
 .SH qmgr_message_active_limit (default: 20000)
 The maximal number of messages in the active queue.
 .SH qmgr_message_recipient_limit (default: 20000)
index 00dda1311f46f58693b137235a5e67efc3693932..6019d2bacd7eb876a86739d0ad7c5ba08a94306b 100644 (file)
@@ -287,7 +287,20 @@ deliveries to the same destination; with per-destination recipient
 limit > 1, a destination is a domain, otherwise it is a recipient.
 .IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay
 Idem, for delivery via the named message \fItransport\fR.
-.SH MISCELLANEOUS CONTROLS
+.SH "SAFETY CONTROLS"
+.na
+.nf
+.ad
+.fi
+.IP "\fBqmgr_daemon_timeout (1000s)\fR"
+How much time a Postfix queue manager process may take to handle
+a request before it is terminated by a built-in watchdog timer.
+.IP "\fBqmgr_ipc_timeout (60s)\fR"
+The time limit for the queue manager to send or receive information
+over an internal communication channel.
+.SH "MISCELLANEOUS CONTROLS"
+.na
+.nf
 .ad
 .fi
 .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
@@ -302,9 +315,6 @@ sub-second delay values.
 .IP "\fBhelpful_warnings (yes)\fR"
 Log warnings about problematic configuration settings, and provide
 helpful suggestions.
-.IP "\fBipc_timeout (3600s)\fR"
-The time limit for sending or receiving information over an internal
-communication channel.
 .IP "\fBprocess_id (read-only)\fR"
 The process ID of a Postfix command or daemon process.
 .IP "\fBprocess_name (read-only)\fR"
index 152137589eb7199f3d15b2ba1604c7965ec52ab5..c75c11feba1ba16eefbb6d3678dfcc04500ca167 100644 (file)
@@ -136,8 +136,8 @@ The inclusive lower bound for blocking an SMTP client, based on
 its combined DNSBL score as defined with the postscreen_dnsbl_sites
 parameter.
 .IP "\fBpostscreen_forbidden_commands ($smtpd_forbidden_commands)\fR"
-List of commands that \fBpostscreen\fR(8) server considers in violation
-of the SMTP protocol.
+List of commands that the \fBpostscreen\fR(8) server considers in
+violation of the SMTP protocol.
 .IP "\fBpostscreen_greet_action (ignore)\fR"
 The action that \fBpostscreen\fR(8) takes when an SMTP client speaks
 before its turn within the time specified with the postscreen_greet_wait
index 83e7ea59b406c83dd0553224f8bbf00c86be6568..550a91a203b6d251f40fe4db162610b96496caaa 100644 (file)
@@ -335,6 +335,17 @@ deliveries to the same destination; with per-destination recipient
 limit > 1, a destination is a domain, otherwise it is a recipient.
 .IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay
 Idem, for delivery via the named message \fItransport\fR.
+.SH "SAFETY CONTROLS"
+.na
+.nf
+.ad
+.fi
+.IP "\fBqmgr_daemon_timeout (1000s)\fR"
+How much time a Postfix queue manager process may take to handle
+a request before it is terminated by a built-in watchdog timer.
+.IP "\fBqmgr_ipc_timeout (60s)\fR"
+The time limit for the queue manager to send or receive information
+over an internal communication channel.
 .SH "MISCELLANEOUS CONTROLS"
 .na
 .nf
@@ -352,9 +363,6 @@ sub-second delay values.
 .IP "\fBhelpful_warnings (yes)\fR"
 Log warnings about problematic configuration settings, and provide
 helpful suggestions.
-.IP "\fBipc_timeout (3600s)\fR"
-The time limit for sending or receiving information over an internal
-communication channel.
 .IP "\fBprocess_id (read-only)\fR"
 The process ID of a Postfix command or daemon process.
 .IP "\fBprocess_name (read-only)\fR"
index 2f933155b7dbf04c68d09c6ca75ffc69a9558493..a5a77dfdbe9f98767c1bd34c85bb21262f0f37c9 100755 (executable)
@@ -359,6 +359,8 @@ while (<>) {
     s;\bqmgr_message_active_limit\b;<a href="postconf.5.html#qmgr_message_active_limit">$&</a>;g;
     s;\bqmgr_message_recip[-</bB>]*\n* *[<bB>]*ient_limit\b;<a href="postconf.5.html#qmgr_message_recipient_limit">$&</a>;g;
     s;\bqmgr_message_recip[-</bB>]*\n* *[<bB>]*ient_minimum\b;<a href="postconf.5.html#qmgr_message_recipient_minimum">$&</a>;g;
+    s;\bqmgr_daemon_timeout\b;<a href="postconf.5.html#qmgr_daemon_timeout">$&</a>;g;
+    s;\bqmgr_ipc_timeout\b;<a href="postconf.5.html#qmgr_ipc_timeout">$&</a>;g;
     s;\bqmqpd_authorized_clients\b;<a href="postconf.5.html#qmqpd_authorized_clients">$&</a>;g;
 
     s;\bdefault_destination_concur[-</Bb>]*\n* *[<Bb>]*rency_negative_feedback\b;<a href="postconf.5.html#default_destination_concurrency_negative_feedback">$&</a>;g;
index 4507b8bce573502dd95fadae8d94236ec02d5315..07f15f426889ac9d7aeb789b7794f25651e183bb 100644 (file)
@@ -243,7 +243,7 @@ server does not reject mail for this address. </p>
 ("address_verify_sender
 ="). This is UNSAFE because address probes will fail with
 mis-configured sites that reject MAIL FROM:  &lt;&gt;, while
-probes from "postmaster@$myorigin" would succeed. </p>
+probes from "double-bounce@$myorigin" would succeed. </p>
 
 </ul>
 
index 90eeeeaedf0f0f7e21f61ba77e43b1bce6ac45b2..2a7492f3242a98db5977769131f791926b5460ed 100644 (file)
@@ -295,8 +295,8 @@ or postscreen_dnsbl_action, respectively. </p>
 
 <dd> Ignore the failure of this test. Allow other tests to complete.
 Repeat this test the next time the client connects.  This option
-is useful for testing and collecting statistics without interfering
-with mail deliveries. </dd>
+is useful for testing and collecting statistics without blocking
+mail. </dd>
 
 <dt> <b>enforce</b> </dt>
 
@@ -506,6 +506,21 @@ postscreen(8) logs this as: </p>
 unexpectedly, <i>time</i> seconds after the start of the
 test named <i>test name</i>. </p>
 
+<!--
+
+<p> While an unexpired penalty is in effect, an SMTP client is not
+allowed to pass any tests, and  postscreen(8) logs each connection
+with the remaining amount of penalty time as: </p>
+
+<pre>
+    <b>PENALTY</b> <i>time</i> <b>for</b> <i>address</i>
+</pre>
+
+<p> During this time, all attempts by the client to deliver mail
+will be deferred with a 450 SMTP status.  </p>
+
+-->
+
 <p> The following errors are reported by the built-in SMTP engine.
 This engine never accepts mail, therefore it has per-session limits
 on the number of commands and on the session length. </p>
index 8f3ae15fc4093f5a8d07dd084023fba8142e9718..ad997071c5671e38719b8a12f03121838a5abd2a 100644 (file)
@@ -13133,8 +13133,9 @@ commencing a MAIL transaction. </p>
 
 %PARAM postscreen_forbidden_commands $smtpd_forbidden_commands
 
-<p> List of commands that postscreen(8) server considers in violation
-of the SMTP protocol. See also: postscreen_non_smtp_command_action.
+<p> List of commands that the postscreen(8) server considers in
+violation of the SMTP protocol. See smtpd_forbidden_commands for
+syntax, and postscreen_non_smtp_command_action for possible actions.
 </p>
 
 <p> This feature is available in Postfix 2.8.  </p>
@@ -13336,3 +13337,27 @@ fails with a temporary error condition, the entire mailing list may
 be expanded repeatedly until the mail expires in the queue, resulting
 in multiple deliveries of the same message to mailing list members.
 </p>
+
+%PARAM qmgr_ipc_timeout 60s
+
+<p> The time limit for the queue manager to send or receive information
+over an internal communication channel.  The purpose is to break
+out of deadlock situations. If the time limit is exceeded the
+software either retries or aborts the operation. </p>
+
+<p>
+Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+The default time unit is s (seconds).
+</p>
+
+%PARAM qmgr_daemon_timeout 1000s
+
+<p> How much time a Postfix queue manager process may take to handle
+a request before it is terminated by a built-in watchdog timer.
+</p>
+
+<p>
+Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+The default time unit is s (seconds).
+</p>
+
index f997030387b6d85d0a05c3aa5ce6daf855102332..7e28474b962f78ab03d2b721f7c70d5edfb28a3b 100644 (file)
@@ -515,6 +515,7 @@ cleanup.o: ../../include/attr.h
 cleanup.o: ../../include/been_here.h
 cleanup.o: ../../include/cleanup_user.h
 cleanup.o: ../../include/dict.h
+cleanup.o: ../../include/dsn_mask.h
 cleanup.o: ../../include/header_body_checks.h
 cleanup.o: ../../include/header_opts.h
 cleanup.o: ../../include/htable.h
@@ -590,6 +591,7 @@ cleanup_api.o: ../../include/deliver_request.h
 cleanup_api.o: ../../include/dict.h
 cleanup_api.o: ../../include/dsn.h
 cleanup_api.o: ../../include/dsn_buf.h
+cleanup_api.o: ../../include/dsn_mask.h
 cleanup_api.o: ../../include/header_body_checks.h
 cleanup_api.o: ../../include/header_opts.h
 cleanup_api.o: ../../include/htable.h
@@ -625,6 +627,7 @@ cleanup_body_edit.o: ../../include/attr.h
 cleanup_body_edit.o: ../../include/been_here.h
 cleanup_body_edit.o: ../../include/cleanup_user.h
 cleanup_body_edit.o: ../../include/dict.h
+cleanup_body_edit.o: ../../include/dsn_mask.h
 cleanup_body_edit.o: ../../include/header_body_checks.h
 cleanup_body_edit.o: ../../include/header_opts.h
 cleanup_body_edit.o: ../../include/htable.h
@@ -771,6 +774,7 @@ cleanup_final.o: ../../include/attr.h
 cleanup_final.o: ../../include/been_here.h
 cleanup_final.o: ../../include/cleanup_user.h
 cleanup_final.o: ../../include/dict.h
+cleanup_final.o: ../../include/dsn_mask.h
 cleanup_final.o: ../../include/header_body_checks.h
 cleanup_final.o: ../../include/header_opts.h
 cleanup_final.o: ../../include/htable.h
@@ -799,6 +803,7 @@ cleanup_init.o: ../../include/attr.h
 cleanup_init.o: ../../include/been_here.h
 cleanup_init.o: ../../include/cleanup_user.h
 cleanup_init.o: ../../include/dict.h
+cleanup_init.o: ../../include/dsn_mask.h
 cleanup_init.o: ../../include/ext_prop.h
 cleanup_init.o: ../../include/flush_clnt.h
 cleanup_init.o: ../../include/header_body_checks.h
@@ -834,6 +839,7 @@ cleanup_map11.o: ../../include/attr.h
 cleanup_map11.o: ../../include/been_here.h
 cleanup_map11.o: ../../include/cleanup_user.h
 cleanup_map11.o: ../../include/dict.h
+cleanup_map11.o: ../../include/dsn_mask.h
 cleanup_map11.o: ../../include/header_body_checks.h
 cleanup_map11.o: ../../include/header_opts.h
 cleanup_map11.o: ../../include/htable.h
@@ -864,6 +870,7 @@ cleanup_map1n.o: ../../include/attr.h
 cleanup_map1n.o: ../../include/been_here.h
 cleanup_map1n.o: ../../include/cleanup_user.h
 cleanup_map1n.o: ../../include/dict.h
+cleanup_map1n.o: ../../include/dsn_mask.h
 cleanup_map1n.o: ../../include/header_body_checks.h
 cleanup_map1n.o: ../../include/header_opts.h
 cleanup_map1n.o: ../../include/htable.h
@@ -895,6 +902,7 @@ cleanup_masquerade.o: ../../include/attr.h
 cleanup_masquerade.o: ../../include/been_here.h
 cleanup_masquerade.o: ../../include/cleanup_user.h
 cleanup_masquerade.o: ../../include/dict.h
+cleanup_masquerade.o: ../../include/dsn_mask.h
 cleanup_masquerade.o: ../../include/header_body_checks.h
 cleanup_masquerade.o: ../../include/header_opts.h
 cleanup_masquerade.o: ../../include/htable.h
@@ -927,6 +935,7 @@ cleanup_message.o: ../../include/been_here.h
 cleanup_message.o: ../../include/cleanup_user.h
 cleanup_message.o: ../../include/conv_time.h
 cleanup_message.o: ../../include/dict.h
+cleanup_message.o: ../../include/dsn_mask.h
 cleanup_message.o: ../../include/dsn_util.h
 cleanup_message.o: ../../include/ext_prop.h
 cleanup_message.o: ../../include/header_body_checks.h
@@ -1010,6 +1019,7 @@ cleanup_out.o: ../../include/attr.h
 cleanup_out.o: ../../include/been_here.h
 cleanup_out.o: ../../include/cleanup_user.h
 cleanup_out.o: ../../include/dict.h
+cleanup_out.o: ../../include/dsn_mask.h
 cleanup_out.o: ../../include/header_body_checks.h
 cleanup_out.o: ../../include/header_opts.h
 cleanup_out.o: ../../include/htable.h
@@ -1083,6 +1093,7 @@ cleanup_region.o: ../../include/attr.h
 cleanup_region.o: ../../include/been_here.h
 cleanup_region.o: ../../include/cleanup_user.h
 cleanup_region.o: ../../include/dict.h
+cleanup_region.o: ../../include/dsn_mask.h
 cleanup_region.o: ../../include/header_body_checks.h
 cleanup_region.o: ../../include/header_opts.h
 cleanup_region.o: ../../include/htable.h
@@ -1110,6 +1121,7 @@ cleanup_rewrite.o: ../../include/attr.h
 cleanup_rewrite.o: ../../include/been_here.h
 cleanup_rewrite.o: ../../include/cleanup_user.h
 cleanup_rewrite.o: ../../include/dict.h
+cleanup_rewrite.o: ../../include/dsn_mask.h
 cleanup_rewrite.o: ../../include/header_body_checks.h
 cleanup_rewrite.o: ../../include/header_opts.h
 cleanup_rewrite.o: ../../include/htable.h
@@ -1142,6 +1154,7 @@ cleanup_state.o: ../../include/attr.h
 cleanup_state.o: ../../include/been_here.h
 cleanup_state.o: ../../include/cleanup_user.h
 cleanup_state.o: ../../include/dict.h
+cleanup_state.o: ../../include/dsn_mask.h
 cleanup_state.o: ../../include/header_body_checks.h
 cleanup_state.o: ../../include/header_opts.h
 cleanup_state.o: ../../include/htable.h
index b21b6fc028e237bd80fedebb47899d6d15ef218e..a962f00786b187fd5c81db12a13a1ac505813c78 100644 (file)
@@ -33,6 +33,7 @@
 #include <string_list.h>
 #include <cleanup_user.h>
 #include <header_body_checks.h>
+#include <dsn_mask.h>
 
  /*
   * Milter library.
@@ -283,7 +284,14 @@ extern void cleanup_out_recipient(CLEANUP_STATE *, const char *, int, const char
   */
 extern void cleanup_addr_sender(CLEANUP_STATE *, const char *);
 extern void cleanup_addr_recipient(CLEANUP_STATE *, const char *);
-extern void cleanup_addr_bcc(CLEANUP_STATE *, const char *);
+extern void cleanup_addr_bcc_dsn(CLEANUP_STATE *, const char *, const char *, int);
+
+#define NO_DSN_ORCPT   ((char *) 0)
+#define NO_DSN_NOTIFY  DSN_NOTIFY_NEVER
+#define DEF_DSN_NOTIFY (0)
+
+#define cleanup_addr_bcc(state, addr) \
+    cleanup_addr_bcc_dsn((state), (addr), NO_DSN_ORCPT, NO_DSN_NOTIFY)
 
  /*
   * cleanup_bounce.c.
index 99c7e1073ee8680314c8e5504613b829f089ba1b..dc87f5c9529fecfc48d94e548eefc5b98861c6ce 100644 (file)
 /*     CLEANUP_STATE *state;
 /*     const char *addr;
 /*
+/*     void    cleanup_addr_bcc_dsn(state, addr, dsn_orcpt, dsn_notify)
+/*     CLEANUP_STATE *state;
+/*     const char *addr;
+/*     const char *dsn_orcpt;
+/*     int     dsn_notify;
+/*
 /*     void    cleanup_addr_bcc(state, addr)
 /*     CLEANUP_STATE *state;
 /*     const char *addr;
 /*     cleanup_addr_recipient() processes recipient envelope information
 /*     and updates state->recip.
 /*
-/*     cleanup_addr_bcc() processes recipient envelope information. This
+/*     cleanup_addr_bcc_dsn() processes recipient envelope information. This
 /*     is a separate function to avoid invoking cleanup_addr_recipient()
 /*     recursively.
 /*
+/*     cleanup_addr_bcc() is a backwards-compatibility wrapper for
+/*     cleanup_addr_bcc_dsn() that requests no delivery status
+/*     notification for the recipient.
+/*
 /*     Arguments:
 /* .IP state
 /*     Queue file and message processing state. This state is updated
 /*     as records are processed and as errors happen.
 /* .IP buf
 /*     Record content.
+/* .IP dsn_orcpt
+/*     The DSN original recipient (or NO_DSN_ORCPT to specify none).
+/* .IP dsn_notify
+/*     DSN notification options. Specify NO_DSN_NOTIFY to disable
+/*     notification, and DEF_DSN_NOTIFY for default notification.
 /* LICENSE
 /* .ad
 /* .fi
@@ -179,9 +194,10 @@ void    cleanup_addr_recipient(CLEANUP_STATE *state, const char *buf)
     vstring_free(clean_addr);
 }
 
-/* cleanup_addr_bcc - process automatic BCC recipient */
+/* cleanup_addr_bcc_dsn - process automatic BCC recipient */
 
-void    cleanup_addr_bcc(CLEANUP_STATE *state, const char *bcc)
+void    cleanup_addr_bcc_dsn(CLEANUP_STATE *state, const char *bcc,
+                                const char *dsn_orcpt, int dsn_notify)
 {
     VSTRING *clean_addr = vstring_alloc(100);
 
@@ -189,8 +205,6 @@ void    cleanup_addr_bcc(CLEANUP_STATE *state, const char *bcc)
      * Note: BCC addresses are supplied locally, and must be rewritten in the
      * local address rewriting context.
      */
-#define NO_DSN_ORCPT   ((char *) 0)
-
     cleanup_rewrite_internal(MAIL_ATTR_RWR_LOCAL, clean_addr, bcc);
     if (state->flags & CLEANUP_FLAG_MAP_OK) {
        if (cleanup_rcpt_canon_maps
@@ -205,7 +219,7 @@ void    cleanup_addr_bcc(CLEANUP_STATE *state, const char *bcc)
            && (cleanup_masq_flags & CLEANUP_MASQ_FLAG_ENV_RCPT))
            cleanup_masquerade_internal(clean_addr, cleanup_masq_domains);
     }
-    cleanup_out_recipient(state, NO_DSN_ORCPT, DSN_NOTIFY_NEVER,
+    cleanup_out_recipient(state, dsn_orcpt, dsn_notify,
                          STR(clean_addr), STR(clean_addr));
     vstring_free(clean_addr);
 }
index 05ded61672485fccd6c6e13d354493c2139d7524..0fc9282c63f80ee78a942af1daf1426a3d90d868 100644 (file)
@@ -1449,7 +1449,7 @@ static const char *cleanup_add_rcpt(void *context, const char *ext_rcpt)
        }
     }
     tok822_free_tree(tree);
-    cleanup_addr_bcc(state, STR(int_rcpt_buf));
+    cleanup_addr_bcc_dsn(state, STR(int_rcpt_buf), NO_DSN_ORCPT, DEF_DSN_NOTIFY);
     vstring_free(int_rcpt_buf);
     if (addr_count == 0) {
        msg_warn("%s: ignoring attempt from Milter to add null recipient",
index 425a70267a1a5694e072835600fa4dab32f4e327..dd3ea71583a07bd5fcceca96d13565b599c334d0 100644 (file)
@@ -188,7 +188,7 @@ static VSTRING *dnsblog_query(VSTRING *result, const char *dnsbl_domain,
                msg_warn("%s: skipping reply record type %s for query %s: %m",
                         myname, dns_strtype(rr->type), STR(query));
            } else {
-               msg_info("addr %s blocked by domain %s as %s",
+               msg_info("addr %s listed by domain %s as %s",
                         addr, dnsbl_domain, hostaddr.buf);
                if (LEN(result) > 0)
                    vstring_strcat(result, " ");
@@ -198,7 +198,7 @@ static VSTRING *dnsblog_query(VSTRING *result, const char *dnsbl_domain,
        dns_rr_free(addr_list);
     } else if (dns_status == DNS_NOTFOUND) {
        if (msg_verbose)
-           msg_info("%s: addr %s not listed under domain %s",
+           msg_info("%s: addr %s not listed by domain %s",
                     myname, addr, dnsbl_domain);
     } else {
        msg_warn("%s: lookup error for DNS query %s: %s",
index 7b10077e08f605c0d137feed3cdc09afc1f752d5..3c19cd30260ef019d4650f4e162f2a26feadd86d 100644 (file)
@@ -1870,6 +1870,10 @@ extern int var_mailtool_compat;
 #define DEF_DAEMON_TIMEOUT     "18000s"
 extern int var_daemon_timeout;
 
+#define VAR_QMGR_DAEMON_TIMEOUT        "qmgr_daemon_timeout"
+#define DEF_QMGR_DAEMON_TIMEOUT        "1000s"
+extern int var_qmgr_daemon_timeout;
+
  /*
   * How long an intra-mail command may take before we assume the mail system
   * is in deadlock (should never happen).
@@ -1878,6 +1882,10 @@ extern int var_daemon_timeout;
 #define DEF_IPC_TIMEOUT                "3600s"
 extern int var_ipc_timeout;
 
+#define VAR_QMGR_IPC_TIMEOUT   "qmgr_ipc_timeout"
+#define DEF_QMGR_IPC_TIMEOUT   "60s"
+extern int var_qmgr_ipc_timeout;
+
  /*
   * Time limit on intra-mail triggers.
   */
index 8569f945f23a2ec20b6811f8c6963a34f251bfd3..1f917433844ad22b3cdbe1287015844449b3a913 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20101007"
+#define MAIL_RELEASE_DATE      "20101103"
 #define MAIL_VERSION_NUMBER    "2.8"
 
 #ifdef SNAPSHOT
index edff94dc814ccd1fa67c39113d9a86f6a436d6ec..c3911ebdf86afc3126753af3368d9eb5a8a90e73 100644 (file)
 /*     limit > 1, a destination is a domain, otherwise it is a recipient.
 /* .IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay
 /*     Idem, for delivery via the named message \fItransport\fR.
-/* .SH MISCELLANEOUS CONTROLS
+/* SAFETY CONTROLS
+/* .ad
+/* .fi
+/* .IP "\fBqmgr_daemon_timeout (1000s)\fR"
+/*     How much time a Postfix queue manager process may take to handle
+/*     a request before it is terminated by a built-in watchdog timer.
+/* .IP "\fBqmgr_ipc_timeout (60s)\fR"
+/*     The time limit for the queue manager to send or receive information
+/*     over an internal communication channel.
+/* MISCELLANEOUS CONTROLS
 /* .ad
 /* .fi
 /* .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
 /* .IP "\fBhelpful_warnings (yes)\fR"
 /*     Log warnings about problematic configuration settings, and provide
 /*     helpful suggestions.
-/* .IP "\fBipc_timeout (3600s)\fR"
-/*     The time limit for sending or receiving information over an internal
-/*     communication channel.
 /* .IP "\fBprocess_id (read-only)\fR"
 /*     The process ID of a Postfix command or daemon process.
 /* .IP "\fBprocess_name (read-only)\fR"
@@ -376,6 +382,8 @@ int     var_conc_cohort_limit;
 int     var_conc_feedback_debug;
 int     var_dest_rate_delay;
 char   *var_def_filter_nexthop;
+int     var_qmgr_daemon_timeout;
+int     var_qmgr_ipc_timeout;
 
 static QMGR_SCAN *qmgr_scans[2];
 
@@ -584,8 +592,11 @@ static void qmgr_post_init(char *unused_name, char **unused_argv)
      * Left-over active queue entries are moved to the incoming queue because
      * the incoming queue has priority; moving left-overs to the deferred
      * queue could cause anomalous delays when "postfix reload/start" are
-     * issued often.
+     * issued often. Override the IPC timeout (default 3600s) so that the
+     * queue manager can reset a broken IPC channel before the watchdog timer
+     * goes off.
      */
+    var_ipc_timeout = var_qmgr_ipc_timeout;
     var_use_limit = 0;
     var_idle_limit = 0;
     qmgr_move(MAIL_QUEUE_ACTIVE, MAIL_QUEUE_INCOMING, event_time());
@@ -617,6 +628,8 @@ int     main(int argc, char **argv)
        VAR_XPORT_RETRY_TIME, DEF_XPORT_RETRY_TIME, &var_transport_retry_time, 1, 0,
        VAR_QMGR_CLOG_WARN_TIME, DEF_QMGR_CLOG_WARN_TIME, &var_qmgr_clog_warn_time, 0, 0,
        VAR_DEST_RATE_DELAY, DEF_DEST_RATE_DELAY, &var_dest_rate_delay, 0, 0,
+       VAR_QMGR_DAEMON_TIMEOUT, DEF_QMGR_DAEMON_TIMEOUT, &var_qmgr_daemon_timeout, 1, 0,
+       VAR_QMGR_IPC_TIMEOUT, DEF_QMGR_IPC_TIMEOUT, &var_qmgr_ipc_timeout, 1, 0,
        0,
     };
     static const CONFIG_INT_TABLE int_table[] = {
@@ -658,5 +671,6 @@ int     main(int argc, char **argv)
                        MAIL_SERVER_LOOP, qmgr_loop,
                        MAIL_SERVER_PRE_ACCEPT, pre_accept,
                        MAIL_SERVER_SOLITARY,
+                       MAIL_SERVER_WATCHDOG, &var_qmgr_daemon_timeout,
                        0);
 }
index d3c270ebea0606da69d9b8399f8e06499ff5e36f..74a32f4e4eb737afcc7818837b505decf99b93de 100644 (file)
 /*     its combined DNSBL score as defined with the postscreen_dnsbl_sites
 /*     parameter.
 /* .IP "\fBpostscreen_forbidden_commands ($smtpd_forbidden_commands)\fR"
-/*     List of commands that \fBpostscreen\fR(8) server considers in violation
-/*     of the SMTP protocol.
+/*     List of commands that the \fBpostscreen\fR(8) server considers in
+/*     violation of the SMTP protocol.
 /* .IP "\fBpostscreen_greet_action (ignore)\fR"
 /*     The action that \fBpostscreen\fR(8) takes when an SMTP client speaks
 /*     before its turn within the time specified with the postscreen_greet_wait
index 374389a64f07bb6e2477e91d42fc75148ec9d1eb..4470756b39d97c6d61a786ffcbe7fc6d4321ef6d 100644 (file)
@@ -50,6 +50,7 @@ typedef struct {
     time_t  dnsbl_stamp;               /* dnsbl expiration time */
     VSTRING *dnsbl_reply;              /* dnsbl reject text */
     int     dnsbl_index;               /* dnsbl request index */
+    time_t  penal_stamp;               /* penalty expiration time */
     /* Built-in SMTP protocol engine. */
     time_t  pipel_stamp;               /* pipelining expiration time */
     time_t  nsmtp_stamp;               /* non-smtp command expiration time */
@@ -97,6 +98,9 @@ typedef struct {
 #define PS_STATE_FLAGS_TODO_TO_PASS(todo_flags) ((todo_flags) >> 1)
 #define PS_STATE_FLAGS_TODO_TO_DONE(todo_flags) ((todo_flags) << 1)
 
+#define PS_STATE_FLAG_PENAL_UPDATE     (1<<6)  /* save new penalty */
+#define PS_STATE_FLAG_PENAL_FAIL       (1<<7)  /* penalty is active */
+
 #define PS_STATE_FLAG_PREGR_FAIL       (1<<8)  /* failed pregreet test */
 #define PS_STATE_FLAG_PREGR_PASS       (1<<9)  /* passed pregreet test */
 #define PS_STATE_FLAG_PREGR_TODO       (1<<10) /* pregreet test expired */
@@ -178,7 +182,7 @@ typedef struct {
   * Super-aggregates for all tests combined.
   */
 #define PS_STATE_MASK_ANY_FAIL \
-       (PS_STATE_FLAG_BLIST_FAIL | \
+       (PS_STATE_FLAG_BLIST_FAIL | PS_STATE_FLAG_PENAL_FAIL | \
        PS_STATE_MASK_EARLY_FAIL | PS_STATE_MASK_SMTPD_FAIL)
 
 #define PS_STATE_MASK_ANY_PASS \
@@ -191,7 +195,7 @@ typedef struct {
        (PS_STATE_MASK_ANY_TODO | PS_STATE_MASK_ANY_FAIL)
 
 #define PS_STATE_MASK_ANY_UPDATE \
-       (PS_STATE_MASK_ANY_PASS)
+       (PS_STATE_MASK_ANY_PASS | PS_STATE_FLAG_PENAL_UPDATE)
 
  /*
   * See log_adhoc.c for discussion.
@@ -391,6 +395,7 @@ extern int ps_dnsbl_request(const char *, void (*) (int, char *), char *);
        (dst)->dnsbl_stamp = PS_TIME_STAMP_INVALID; \
        (dst)->pipel_stamp = PS_TIME_STAMP_INVALID; \
        (dst)->barlf_stamp = PS_TIME_STAMP_INVALID; \
+       (dst)->penal_stamp = PS_TIME_STAMP_INVALID; \
     } while (0)
 #define PS_BEGIN_TESTS(state, name) do { \
        (state)->test_name = (name); \
index 06a037fabc9642c9dc9b0a8c319717776a723419..740c024544133be7c4e74d4a608980819966cfd8 100644 (file)
@@ -62,7 +62,7 @@
 /*     port arguments are null-terminated strings with the remote
 /*     SMTP client endpoint. The _reply members are set to
 /*     polite "try again" SMTP replies. The protocol member is set
-/*     to "SMTP". 
+/*     to "SMTP".
 /*
 /*     The ps_stress variable is set to non-zero when
 /*     ps_check_queue_length passes over a high-water mark.
@@ -224,6 +224,9 @@ const char *ps_print_state_flags(int flags, const char *context)
        "HANGUP", PS_STATE_FLAG_HANGUP,
        "CACHE_EXPIRED", PS_STATE_FLAG_CACHE_EXPIRED,
 
+       "PENAL_UPDATE", PS_STATE_FLAG_PENAL_UPDATE,
+       "PENAL_FAIL", PS_STATE_FLAG_PENAL_FAIL,
+
        "PREGR_FAIL", PS_STATE_FLAG_PREGR_FAIL,
        "PREGR_PASS", PS_STATE_FLAG_PREGR_PASS,
        "PREGR_TODO", PS_STATE_FLAG_PREGR_TODO,
index 02b6965e5e78d58c6913071ed6295da802a54492..7c7fdfe0b476984ed16eb3984ca6fbe2b8db9239 100644 (file)
@@ -30,7 +30,7 @@
 /* DESCRIPTION
 /*     The functions in this module overwrite the per-test expiration
 /*     time stamps and all flags bits.  Some functions are implemented
-/*     as unsafe macros, meaning they evaluate one ore more arguments
+/*     as unsafe macros, meaning they evaluate one or more arguments
 /*     multiple times.
 /*
 /*     PS_INIT_TESTS() is an unsafe macro that sets the per-test
@@ -132,6 +132,7 @@ void    ps_new_tests(PS_STATE *state)
     state->pipel_stamp = PS_TIME_STAMP_NEW;
     state->nsmtp_stamp = PS_TIME_STAMP_NEW;
     state->barlf_stamp = PS_TIME_STAMP_NEW;
+    state->penal_stamp = PS_TIME_STAMP_NEW;
 
     /*
      * Don't flag disabled tests as "todo", because there would be no way to
@@ -155,11 +156,14 @@ void    ps_parse_tests(PS_STATE *state,
                               const char *stamp_str,
                               time_t time_value)
 {
+    const char *myname = "ps_parse_tests";
     unsigned long pregr_stamp;
     unsigned long dnsbl_stamp;
     unsigned long pipel_stamp;
     unsigned long nsmtp_stamp;
     unsigned long barlf_stamp;
+    unsigned long penal_stamp;
+    time_t  penalty_left;
 
     /*
      * We don't know what tests have expired or have never passed.
@@ -175,9 +179,9 @@ void    ps_parse_tests(PS_STATE *state,
      * enabled tests, but the remote SMTP client has not yet passed all those
      * tests.
      */
-    switch (sscanf(stamp_str, "%lu;%lu;%lu;%lu;%lu",
+    switch (sscanf(stamp_str, "%lu;%lu;%lu;%lu;%lu;%lu",
                   &pregr_stamp, &dnsbl_stamp, &pipel_stamp, &nsmtp_stamp,
-                  &barlf_stamp)) {
+                  &barlf_stamp, &penal_stamp)) {
     case 0:
        pregr_stamp = PS_TIME_STAMP_DISABLED;
     case 1:
@@ -188,6 +192,8 @@ void    ps_parse_tests(PS_STATE *state,
        nsmtp_stamp = PS_TIME_STAMP_DISABLED;
     case 4:
        barlf_stamp = PS_TIME_STAMP_DISABLED;
+    case 5:
+       penal_stamp = PS_TIME_STAMP_DISABLED;
     default:
        break;
     }
@@ -196,6 +202,7 @@ void    ps_parse_tests(PS_STATE *state,
     state->pipel_stamp = pipel_stamp;
     state->nsmtp_stamp = nsmtp_stamp;
     state->barlf_stamp = barlf_stamp;
+    state->penal_stamp = penal_stamp;
 
     if (pregr_stamp == PS_TIME_STAMP_NEW
        || dnsbl_stamp == PS_TIME_STAMP_NEW
@@ -253,6 +260,41 @@ void    ps_parse_tests(PS_STATE *state,
            state->flags |= PS_STATE_FLAG_DNSBL_TODO;
     }
 #endif
+
+    /*
+     * Apply unexpired penalty for past behavior.
+     * 
+     * XXX Before we can drop connections, change this function to return
+     * success/fail, to inform the caller that the state object no longer
+     * exists.
+     */
+#ifdef NONPROD
+    if ((penalty_left = state->penal_stamp - event_time()) > 0) {
+       msg_info("PENALTY %ld for %s",
+                (long) penalty_left, state->smtp_client_addr);
+       PS_FAIL_SESSION_STATE(state, PS_STATE_FLAG_PENAL_FAIL);
+#if 0
+       switch (ps_penal_action) {
+       case PS_ACT_DROP:
+           PS_DROP_SESSION_STATE(state,
+                            "421 4.3.2 Service currently unavailable\r\n");
+           break;
+       case PS_ACT_ENFORCE:
+#endif
+           PS_ENFORCE_SESSION_STATE(state,
+                            "450 4.3.2 Service currently unavailable\r\n");
+#if 0
+           break;
+       case PS_ACT_IGNORE:
+           PS_UNFAIL_SESSION_STATE(state, PS_STATE_FLAG_PENAL_FAIL);
+           break;
+       default:
+           msg_panic("%s: unknown penalty action value %d",
+                     myname, ps_penal_action);
+       }
+#endif
+    }
+#endif                                         /* NONPROD */
 }
 
 /* ps_print_tests - print postscreen cache record */
@@ -267,6 +309,25 @@ char   *ps_print_tests(VSTRING *buf, PS_STATE *state)
     if ((state->flags & PS_STATE_MASK_ANY_UPDATE) == 0)
        msg_panic("%s: attempt to save a no-update record", myname);
 
+    /*
+     * Don't record a client as "passed" while subject to penalty. Be sure to
+     * produce correct PASS OLD/NEW logging.
+     * 
+     * XXX This needs to be refined - we should not reset the result of tests
+     * that were passed in previous sessions, otherwise a client may never
+     * pass a multi-stage test such as greylisting. One solution is to keep
+     * the original and updated time stamps around, and to save an updated
+     * time stamp only when the corresponding "pass" flag is raised.
+     */
+#ifdef NONPROD
+    if (state->flags & PS_STATE_FLAG_PENAL_FAIL) {
+       state->pregr_stamp = state->dnsbl_stamp = state->pipel_stamp =
+           state->nsmtp_stamp = state->barlf_stamp =
+           ((state->flags & PS_STATE_FLAG_NEW) ?
+            PS_TIME_STAMP_NEW : PS_TIME_STAMP_DISABLED);
+    }
+#endif
+
     /*
      * Give disabled tests a dummy time stamp so that we don't log a client
      * with "pass new" when some disabled test becomes enabled at some later
@@ -283,12 +344,13 @@ char   *ps_print_tests(VSTRING *buf, PS_STATE *state)
     if (var_ps_barlf_enable == 0 && state->barlf_stamp == PS_TIME_STAMP_NEW)
        state->barlf_stamp = PS_TIME_STAMP_DISABLED;
 
-    vstring_sprintf(buf, "%lu;%lu;%lu;%lu;%lu",
+    vstring_sprintf(buf, "%lu;%lu;%lu;%lu;%lu;%lu",
                    (unsigned long) state->pregr_stamp,
                    (unsigned long) state->dnsbl_stamp,
                    (unsigned long) state->pipel_stamp,
                    (unsigned long) state->nsmtp_stamp,
-                   (unsigned long) state->barlf_stamp);
+                   (unsigned long) state->barlf_stamp,
+                   (unsigned long) state->penal_stamp);
     return (STR(buf));
 }
 
index d6d7fe5418f99ba04fcf088d45e850fc84735ca0..a59bf5da07d63d3a6b142dc721623938bffa4717 100644 (file)
 /*     limit > 1, a destination is a domain, otherwise it is a recipient.
 /* .IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay
 /*     Idem, for delivery via the named message \fItransport\fR.
+/* SAFETY CONTROLS
+/* .ad
+/* .fi
+/* .IP "\fBqmgr_daemon_timeout (1000s)\fR"
+/*     How much time a Postfix queue manager process may take to handle
+/*     a request before it is terminated by a built-in watchdog timer.
+/* .IP "\fBqmgr_ipc_timeout (60s)\fR"
+/*     The time limit for the queue manager to send or receive information
+/*     over an internal communication channel.
 /* MISCELLANEOUS CONTROLS
 /* .ad
 /* .fi
 /* .IP "\fBhelpful_warnings (yes)\fR"
 /*     Log warnings about problematic configuration settings, and provide
 /*     helpful suggestions.
-/* .IP "\fBipc_timeout (3600s)\fR"
-/*     The time limit for sending or receiving information over an internal
-/*     communication channel.
 /* .IP "\fBprocess_id (read-only)\fR"
 /*     The process ID of a Postfix command or daemon process.
 /* .IP "\fBprocess_name (read-only)\fR"
@@ -436,6 +442,8 @@ int     var_conc_cohort_limit;
 int     var_conc_feedback_debug;
 int     var_dest_rate_delay;
 char   *var_def_filter_nexthop;
+int     var_qmgr_daemon_timeout;
+int     var_qmgr_ipc_timeout;
 
 static QMGR_SCAN *qmgr_scans[2];
 
@@ -651,8 +659,11 @@ static void qmgr_post_init(char *name, char **unused_argv)
      * Left-over active queue entries are moved to the incoming queue because
      * the incoming queue has priority; moving left-overs to the deferred
      * queue could cause anomalous delays when "postfix reload/start" are
-     * issued often.
+     * issued often. Override the IPC timeout (default 3600s) so that the
+     * queue manager can reset a broken IPC channel before the watchdog timer
+     * goes off.
      */
+    var_ipc_timeout = var_qmgr_ipc_timeout;
     var_use_limit = 0;
     var_idle_limit = 0;
     qmgr_move(MAIL_QUEUE_ACTIVE, MAIL_QUEUE_INCOMING, event_time());
@@ -685,6 +696,8 @@ int     main(int argc, char **argv)
        VAR_QMGR_CLOG_WARN_TIME, DEF_QMGR_CLOG_WARN_TIME, &var_qmgr_clog_warn_time, 0, 0,
        VAR_XPORT_REFILL_DELAY, DEF_XPORT_REFILL_DELAY, &var_xport_refill_delay, 1, 0,
        VAR_DEST_RATE_DELAY, DEF_DEST_RATE_DELAY, &var_dest_rate_delay, 0, 0,
+       VAR_QMGR_DAEMON_TIMEOUT, DEF_QMGR_DAEMON_TIMEOUT, &var_qmgr_daemon_timeout, 1, 0,
+       VAR_QMGR_IPC_TIMEOUT, DEF_QMGR_IPC_TIMEOUT, &var_qmgr_ipc_timeout, 1, 0,
        0,
     };
     static const CONFIG_INT_TABLE int_table[] = {
@@ -733,5 +746,6 @@ int     main(int argc, char **argv)
                        MAIL_SERVER_LOOP, qmgr_loop,
                        MAIL_SERVER_PRE_ACCEPT, pre_accept,
                        MAIL_SERVER_SOLITARY,
+                       MAIL_SERVER_WATCHDOG, &var_qmgr_daemon_timeout,
                        0);
 }
index 3f5a8c5833f65f07eb652d14f6d12b27dfca26cd..a013a6d82f703054370072f397c6db86335641f2 100644 (file)
@@ -3799,7 +3799,8 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
                         name);
            else {
                cpp += 1;
-               if (state->helo_name)
+               if (state->helo_name
+                   && valid_hostname(state->helo_name, DONT_GRIPE))
                    status = reject_rbl_domain(state, *cpp, state->helo_name,
                                               SMTPD_NAME_HELO);
            }