]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.5-20190518
authorWietse Venema <wietse@porcupine.org>
Sat, 18 May 2019 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Wed, 29 May 2019 23:01:57 +0000 (19:01 -0400)
19 files changed:
postfix/HISTORY
postfix/README_FILES/BASIC_CONFIGURATION_README
postfix/README_FILES/MAILLOG_README
postfix/README_FILES/SMTPD_POLICY_README
postfix/RELEASE_NOTES
postfix/html/BASIC_CONFIGURATION_README.html
postfix/html/MAILLOG_README.html
postfix/html/SMTPD_POLICY_README.html
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/proto/BASIC_CONFIGURATION_README.html
postfix/proto/MAILLOG_README.html
postfix/proto/SMTPD_POLICY_README.html
postfix/proto/postconf.proto
postfix/src/dns/dns_lookup.c
postfix/src/dns/dns_str_resflags.c
postfix/src/global/mail_version.h
postfix/src/smtpd/smtpd.c
postfix/src/util/sys_defs.h

index 3824c0c047c0089e9c07a62b07e892c6029432b7..90995d74acd49e60844a607b29f1780fcea699ee 100644 (file)
@@ -24257,6 +24257,22 @@ Apologies for any names omitted.
        and the way that check_client_access will match subnets of
        an IPv6 address.
 
+20190428
+
+       Cleanup: replace "(whatever *) 0" with meaningfully-named
+       constants. Sheesh. File: smtpd/smtpd.c.
+
+       Documentation: BASIC_CONFIGURATION_README example default
+       setting was not updated after Postfix 3.0 change. File:
+       proto/BASIC_CONFIGURATION_README.html
+
+20190505
+
+       Workaround: uClibc has no res_send. Log a warning if this
+       code path would be used, and ignore dns_ncache_ttl_fix_enable.
+       Files: util/sys_defs.h, dns/dns_lookup.c, TODO: makedefs
+       and INSTALL documentation.
+
 20190516
 
        Initial search order support for check_ccert_access. The
index e8624ec922e95918df67a40fd859f80c4f917a1b..cfd8851107b6013386b6abe08eb86d70b5ba4244 100644 (file)
@@ -172,16 +172,17 @@ Postfix can also be configured to relay mail from "mobile" clients that send
 mail from outside an authorized network block. This is explained in the
 SASL_README and TLS_README documents.
 
-IMPORTANT: If your machine is connected to a wide area network then your
-default mynetworks setting may be too friendly.
+IMPORTANT: If your machine is connected to a wide area network then the
+"mynetworks_style = host" setting may be too friendly.
 
 Examples (specify only one of the following):
 
     /etc/postfix/main.cf:
-        mynetworks_style = subnet  (default: authorize subnetworks)
-        mynetworks_style = host    (safe: authorize local machine only)
-        mynetworks = 127.0.0.0/8   (safe: authorize local machine only)
+        mynetworks_style = subnet  (not safe on a wide area network)
+        mynetworks_style = host    (authorize local machine only)
+        mynetworks = 127.0.0.0/8   (authorize local machine only)
         mynetworks = 127.0.0.0/8 168.100.189.2/32 (authorize local machine)
+        mynetworks = 127.0.0.0/8 168.100.189.2/28 (authorize local networks)
 
 You can specify the trusted networks in the main.cf file, or you can let
 Postfix do the work for you. The default is to let Postfix do the work. The
index 518442535bd138bc6c24857f3d651e5c4d9e3413..11407598407e6b9dc80fbc5aee27e4f1bed0eb5d 100644 (file)
@@ -82,8 +82,8 @@ L\bLi\bim\bmi\bit\bta\bat\bti\bio\bon\bns\bs
 
 Background:
 
-  * Postfix consists of a number of daemon programs, and non-daemon programs
-    some of which are used for local mail submission, and some for Postfix
+  * Postfix consists of a number of daemon programs that run in the background,
+    as well as non-daemon programs for local mail submission or Postfix
     management.
 
   * Logging to Postfix logfile or stdout requires the Postfix postlogd(8)
index 26a06a153d1653568cffabba6c9902f8f5b67abc..0c96c760ae1a2973dcdc26533175d7eb0c27e00a 100644 (file)
@@ -13,8 +13,8 @@ implemented with only a dozen lines of Perl, as is shown at the end of this
 document. A complete example can be found in the Postfix source code, in the
 directory examples/smtpd-policy.
 
-Another example of policy delegation is the SPF policy server at http://
-www.openspf.org/Software.
+Another example of policy delegation is the SPF policy server at https://
+web.archive.org/web/20190221142057/http://www.openspf.org/Software.
 
 Policy delegation is now the preferred method for adding policies to Postfix.
 It's much easier to develop a new feature in few lines of Perl, Python, Ruby,
index 7bbae50ddf729811e7af3100d4b09465557caf03..8dded9175a0732155bf1395e5feaecb5f1047786 100644 (file)
@@ -25,7 +25,7 @@ more recent Eclipse Public License 2.0. Recipients can choose to take
 the software under the license of their choice. Those who are more
 comfortable with the IPL can continue with that license.
 
-Major changes with snapshot 20190516
+Major changes with snapshot 20190517
 ====================================
 
 Search order support for check_ccert_access. Search order support
index 79525d1bb490cb2b2d355f72cb350a2835e2f94f..8d760c0975be9154d60eaa6486fe16908158edd9 100644 (file)
@@ -264,17 +264,18 @@ clients that send mail from outside an authorized network block.
 This is explained in the <a href="SASL_README.html">SASL_README</a> and <a href="TLS_README.html">TLS_README</a> documents. </p>
 
 <p> IMPORTANT: If your machine is connected to a wide area network
-then your default <a href="postconf.5.html#mynetworks">mynetworks</a> setting may be too friendly. </p>
+then the "<a href="postconf.5.html#mynetworks_style">mynetworks_style</a> = host" setting may be too friendly. </p>
 
 <p> Examples (specify only one of the following): </p>
 
 <blockquote>
 <pre>
 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
-    <a href="postconf.5.html#mynetworks_style">mynetworks_style</a> = subnet  (default: authorize subnetworks)
-    <a href="postconf.5.html#mynetworks_style">mynetworks_style</a> = host    (safe: authorize local machine only)
-    <a href="postconf.5.html#mynetworks">mynetworks</a> = 127.0.0.0/8   (safe: authorize local machine only)
+    <a href="postconf.5.html#mynetworks_style">mynetworks_style</a> = subnet  (not safe on a wide area network)
+    <a href="postconf.5.html#mynetworks_style">mynetworks_style</a> = host    (authorize local machine only)
+    <a href="postconf.5.html#mynetworks">mynetworks</a> = 127.0.0.0/8   (authorize local machine only)
     <a href="postconf.5.html#mynetworks">mynetworks</a> = 127.0.0.0/8 168.100.189.2/32 (authorize local machine) 
+    <a href="postconf.5.html#mynetworks">mynetworks</a> = 127.0.0.0/8 168.100.189.2/28 (authorize local networks) 
 </pre>
 </blockquote>
 
index b1f97022d198cd4e4e1e6c04aace1636ef36b969..0b9f250b33bf291b62ad5a2bbc17a3e8bdf7c167 100644 (file)
@@ -142,9 +142,9 @@ the /dev directory, such as /dev/stdout. </p>
 
 <ul>
 
-<li> <p> Postfix consists of a number of daemon programs, and
-non-daemon programs some of which are used for local mail submission,
-and some for Postfix management.
+<li> <p> Postfix consists of a number of daemon programs that run
+in the background, as well as non-daemon programs for local mail
+submission or Postfix management.
 
 <li> <p> Logging to Postfix logfile or stdout requires the Postfix
 <a href="postlogd.8.html">postlogd(8)</a> service. This ensures that simultaneous logging from
index 44ebf0a28017e6bc7492e66e730cf191c5ac5c62..da57bc56649277cb29e55de0c027062a6e3d0b18 100644 (file)
@@ -31,7 +31,7 @@ can be found in the Postfix source code, in the directory
 examples/smtpd-policy. </p>
 
 <p> Another example of policy delegation is the SPF policy server
-at <a href="http://www.openspf.org/Software">http://www.openspf.org/Software</a>.  </p>
+at https://web.archive.org/web/20190221142057/<a href="http://www.openspf.org/Software">http://www.openspf.org/Software</a>.  </p>
 
 <p> Policy delegation is now the preferred method for adding policies
 to Postfix. It's much easier to develop a new feature in few lines
index 6d2044d93cc2c94db908d4c1825b10facb3d73ed..33840234a20259272b8690be6b883a6e878ce2d3 100644 (file)
@@ -14184,7 +14184,8 @@ client network address information.
 
 <dt><b><a name="check_ccert_access">check_ccert_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
-<dd> Use the remote SMTP client certificate fingerprint or the public key
+<dd> By default use the remote SMTP client certificate fingerprint
+or the public key
 fingerprint (Postfix 2.9 and later) as lookup key for the specified
 <a href="access.5.html">access(5)</a> database; with Postfix version 2.2, also require that the
 remote SMTP client certificate is verified successfully.
@@ -14193,6 +14194,18 @@ The fingerprint digest algorithm is configurable via the
 Postfix version 2.5).  This feature is available with Postfix version
 2.2 and later. </dd>
 
+<br>
+
+<dd> Alternatively, <a href="postconf.5.html#check_ccert_access">check_ccert_access</a> accepts an explicit search
+order (Postfix 3.5 and later). The default search order as described
+above corresponds with: </dd>
+
+<dd> <a href="postconf.5.html#check_ccert_access">check_ccert_access</a> { <a href="DATABASE_README.html">type:table</a> { search_order = cert_fingerprint,
+pubkey_fingerprint } } </dd>
+
+<dd> Other valid search_order elements are "subject" (the certificate
+subject DN) and "issuer" (the certificate issuer DN). </dd>
+
 <dt><b><a name="check_client_access">check_client_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified access database for the client hostname,
index db745eaf55b6787439c99d09fa6707dba1c93af6..4093ad0b66154168e9602014a076a059fd468c76 100644 (file)
@@ -9466,7 +9466,8 @@ restriction that matches wins.
 The following restrictions are specific to client hostname or
 client network address information.
 .IP "\fBcheck_ccert_access \fItype:table\fR\fR"
-Use the remote SMTP client certificate fingerprint or the public key
+By default use the remote SMTP client certificate fingerprint
+or the public key
 fingerprint (Postfix 2.9 and later) as lookup key for the specified
 \fBaccess\fR(5) database; with Postfix version 2.2, also require that the
 remote SMTP client certificate is verified successfully.
@@ -9475,6 +9476,17 @@ smtpd_tls_fingerprint_digest parameter (hard\-coded as md5 prior to
 Postfix version 2.5).  This feature is available with Postfix version
 2.2 and later.
 .br
+.br
+Alternatively, check_ccert_access accepts an explicit search
+order (Postfix 3.5 and later). The default search order as described
+above corresponds with:
+.br
+check_ccert_access { type:table { search_order = cert_fingerprint,
+pubkey_fingerprint } }
+.br
+Other valid search_order elements are "subject" (the certificate
+subject DN) and "issuer" (the certificate issuer DN).
+.br
 .IP "\fBcheck_client_access \fItype:table\fR\fR"
 Search the specified access database for the client hostname,
 parent domains, client IP address, or networks obtained by stripping
index 80cf6d2676c96f7b2c927e79093e769a5c012f21..f8d94b02c248e187c814b745731e116f348b82dc 100644 (file)
@@ -264,17 +264,18 @@ clients that send mail from outside an authorized network block.
 This is explained in the SASL_README and TLS_README documents. </p>
 
 <p> IMPORTANT: If your machine is connected to a wide area network
-then your default mynetworks setting may be too friendly. </p>
+then the "mynetworks_style = host" setting may be too friendly. </p>
 
 <p> Examples (specify only one of the following): </p>
 
 <blockquote>
 <pre>
 /etc/postfix/main.cf:
-    mynetworks_style = subnet  (default: authorize subnetworks)
-    mynetworks_style = host    (safe: authorize local machine only)
-    mynetworks = 127.0.0.0/8   (safe: authorize local machine only)
+    mynetworks_style = subnet  (not safe on a wide area network)
+    mynetworks_style = host    (authorize local machine only)
+    mynetworks = 127.0.0.0/8   (authorize local machine only)
     mynetworks = 127.0.0.0/8 168.100.189.2/32 (authorize local machine) 
+    mynetworks = 127.0.0.0/8 168.100.189.2/28 (authorize local networks) 
 </pre>
 </blockquote>
 
index 5fad103c57fd40a21e5173109b0fe6f6a86c1971..9804983a702849ee5bbeb2dd3729e9fa55f43934 100644 (file)
@@ -142,9 +142,9 @@ the /dev directory, such as /dev/stdout. </p>
 
 <ul>
 
-<li> <p> Postfix consists of a number of daemon programs, and
-non-daemon programs some of which are used for local mail submission,
-and some for Postfix management.
+<li> <p> Postfix consists of a number of daemon programs that run
+in the background, as well as non-daemon programs for local mail
+submission or Postfix management.
 
 <li> <p> Logging to Postfix logfile or stdout requires the Postfix
 postlogd(8) service. This ensures that simultaneous logging from
index 99225ecc53d389030add15edf4d9378a445ebc1e..e2554b217e12a665310cb90441c1f20ffc730fb0 100644 (file)
@@ -31,7 +31,7 @@ can be found in the Postfix source code, in the directory
 examples/smtpd-policy. </p>
 
 <p> Another example of policy delegation is the SPF policy server
-at http://www.openspf.org/Software.  </p>
+at https://web.archive.org/web/20190221142057/http://www.openspf.org/Software.  </p>
 
 <p> Policy delegation is now the preferred method for adding policies
 to Postfix. It's much easier to develop a new feature in few lines
index 9851adb77cbe42cc7bfc61dd347e68c355930639..24291cc4d64ac8aff32b2ab46065e630b5d8821c 100644 (file)
@@ -5099,7 +5099,8 @@ client network address information.
 
 <dt><b><a name="check_ccert_access">check_ccert_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
-<dd> Use the remote SMTP client certificate fingerprint or the public key
+<dd> By default use the remote SMTP client certificate fingerprint
+or the public key
 fingerprint (Postfix 2.9 and later) as lookup key for the specified
 access(5) database; with Postfix version 2.2, also require that the
 remote SMTP client certificate is verified successfully.
@@ -5108,6 +5109,18 @@ smtpd_tls_fingerprint_digest parameter (hard-coded as md5 prior to
 Postfix version 2.5).  This feature is available with Postfix version
 2.2 and later. </dd>
 
+<br>
+
+<dd> Alternatively, check_ccert_access accepts an explicit search
+order (Postfix 3.5 and later). The default search order as described
+above corresponds with: </dd>
+
+<dd> check_ccert_access { type:table { search_order = cert_fingerprint,
+pubkey_fingerprint } } </dd>
+
+<dd> Other valid search_order elements are "subject" (the certificate
+subject DN) and "issuer" (the certificate issuer DN). </dd>
+
 <dt><b><a name="check_client_access">check_client_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified access database for the client hostname,
index 1ea98b387f5a6f82e119d42871597f4b1e484a46..ae0ddadd798073aa7d8d6e631f742ee88e41dd4b 100644 (file)
@@ -305,6 +305,7 @@ typedef struct DNS_REPLY {
   * information, but that will have to wait until it is safe to make
   * libunbound a mandatory dependency for Postfix.
   */
+#ifdef HAVE_RES_SEND
 
 /* dns_res_query - a res_query() clone that can return negative replies */
 
@@ -371,6 +372,8 @@ static int dns_res_query(const char *name, int class, int type,
     }
 }
 
+#endif
+
 /* dns_res_search - res_search() that can return negative replies */
 
 static int dns_res_search(const char *name, int class, int type,
@@ -474,8 +477,16 @@ static int dns_query(const char *name, int type, unsigned flags,
        _res.options &= ~saved_options;
        _res.options |= flags;
        if (keep_notfound && var_dns_ncache_ttl_fix) {
+#ifdef HAVE_RES_SEND
            len = dns_res_query((char *) name, C_IN, type, reply->buf,
                                reply->buf_len);
+#else
+           var_dns_ncache_ttl_fix = 0;
+           msg_warn("system library does not support %s=yes"
+                    " -- ignoring this setting", VAR_DNS_NCACHE_TTL_FIX);
+           len = dns_res_search((char *) name, C_IN, type, reply->buf,
+                                reply->buf_len, keep_notfound);
+#endif
        } else {
            len = dns_res_search((char *) name, C_IN, type, reply->buf,
                                 reply->buf_len, keep_notfound);
index 5f2cce5e0df9c980c3b0c9234c0c85c83fd5a9ac..472394c3a63554b0a761789e9d90d39381a5d06b 100644 (file)
 static const LONG_NAME_MASK resflag_table[] = {
     "RES_INIT", RES_INIT,
     "RES_DEBUG", RES_DEBUG,
+#ifdef RES_AAONLY
     "RES_AAONLY", RES_AAONLY,
+#endif
     "RES_USEVC", RES_USEVC,
+#ifdef RES_PRIMARY
     "RES_PRIMARY", RES_PRIMARY,
+#endif
     "RES_IGNTC", RES_IGNTC,
     "RES_RECURSE", RES_RECURSE,
     "RES_DEFNAMES", RES_DEFNAMES,
     "RES_STAYOPEN", RES_STAYOPEN,
     "RES_DNSRCH", RES_DNSRCH,
+#ifdef RES_INSECURE1
     "RES_INSECURE1", RES_INSECURE1,
+#endif
+#ifdef RES_INSECURE2
     "RES_INSECURE2", RES_INSECURE2,
+#endif
     "RES_NOALIASES", RES_NOALIASES,
+#ifdef RES_USE_INET6
     "RES_USE_INET6", RES_USE_INET6,
+#endif
 #ifdef RES_ROTATE
     "RES_ROTATE", RES_ROTATE,
 #endif
index 2ee3546c597f0155b1b497a896945c80ef76e92a..713ba8ec81678f31071839a4cd9c6363c66f4213 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      "20190517"
+#define MAIL_RELEASE_DATE      "20190518"
 #define MAIL_VERSION_NUMBER    "3.5"
 
 #ifdef SNAPSHOT
index 954d09ac6c4ac4e9dc3591cff26cc37f12bf96e1..3eaf905c8b57553ca48254a2269ec17dea3812cd 100644 (file)
@@ -4464,7 +4464,8 @@ static int xclient_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
            } else {
                neuter(attr_value, NEUTER_CHARACTERS, '?');
                if (normalize_mailhost_addr(attr_value, &state->rfc_addr,
-                                  &state->addr, &state->addr_family) < 0) {
+                                           &state->addr,
+                                           &state->addr_family) < 0) {
                    state->error_mask |= MAIL_ERROR_PROTOCOL;
                    smtpd_chat_reply(state, "501 5.5.4 Bad %s syntax: %s",
                                     XCLIENT_ADDR, attr_value);
@@ -4549,9 +4550,12 @@ static int xclient_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
                attr_value = SERVER_ADDR_UNKNOWN;
                UPDATE_STR(state->dest_addr, attr_value);
            } else {
+#define NO_NORM_RFC_ADDR               ((char **) 0)
+#define NO_NORM_ADDR_FAMILY    ((int *) 0)
                neuter(attr_value, NEUTER_CHARACTERS, '?');
-               if (normalize_mailhost_addr(attr_value, (char **) 0,
-                                       &state->dest_addr, (int *) 0) < 0) {
+               if (normalize_mailhost_addr(attr_value, NO_NORM_RFC_ADDR,
+                                           &state->dest_addr,
+                                           NO_NORM_ADDR_FAMILY) < 0) {
                    state->error_mask |= MAIL_ERROR_PROTOCOL;
                    smtpd_chat_reply(state, "501 5.5.4 Bad %s syntax: %s",
                                     XCLIENT_DESTADDR, attr_value);
@@ -4785,8 +4789,10 @@ static int xforward_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
                UPDATE_STR(state->xforward.addr, attr_value);
            } else {
                neuter(attr_value, NEUTER_CHARACTERS, '?');
-               if (normalize_mailhost_addr(attr_value, &state->xforward.rfc_addr,
-                                   &state->xforward.addr, (int *) 0) < 0) {
+               if (normalize_mailhost_addr(attr_value,
+                                           &state->xforward.rfc_addr,
+                                           &state->xforward.addr,
+                                           NO_NORM_ADDR_FAMILY) < 0) {
                    state->error_mask |= MAIL_ERROR_PROTOCOL;
                    smtpd_chat_reply(state, "501 5.5.4 Bad %s syntax: %s",
                                     XFORWARD_ADDR, attr_value);
index 39daa16d04eb93f54590902a1eb28eab868b5e1e..1385acaceb7e4321964783cc2036e8e4dd463488 100644 (file)
@@ -1315,6 +1315,12 @@ extern int dup2_pass_on_exec(int oldd, int newd);
 #endif
 #define OPTIND  (optind > 0 ? optind : 1)
 
+#if !defined(__UCLIBC__) && !defined(NO_RES_SEND)
+#define HAVE_RES_SEND
+#else
+#undef HAVE_RES_SEND
+#endif
+
  /*
   * Check for required but missing definitions.
   */