]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.9-20231011
authorWietse Venema <wietse@porcupine.org>
Wed, 11 Oct 2023 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Sat, 14 Oct 2023 06:40:01 +0000 (02:40 -0400)
postfix/HISTORY
postfix/README_FILES/POSTSCREEN_README
postfix/WISHLIST
postfix/html/POSTSCREEN_README.html
postfix/html/socketmap_table.5.html
postfix/man/man5/socketmap_table.5
postfix/proto/POSTSCREEN_README.html
postfix/proto/socketmap_table
postfix/src/global/mail_version.h
postfix/src/util/valid_utf8_string.c

index 017bef0af666b477adb041f47719b76bb932178a..a41360de9d4933518a90d622bea95e58e84b74fa 100644 (file)
@@ -27463,3 +27463,11 @@ Apologies for any names omitted.
        git metadata.  Added similar tests for the valid_utf8_string()
        function. Files: util/valid_utf8_string.c, util/printable.c,
        util/parse_utf8_char.h, util/Makefile.in.
+
+20231011
+
+       Documentation: fixed some instances of "." instead of ",".
+       Files: proto/POSTSCREEN_README.html, proto/socketmap_table.
+
+       Cleanup: finer-grained unit tests for valid_utf8_string().
+       File: util/valid_utf8_string.c.
index 420f5a08cacf8e283bdc00987a59d0023e38d29f..5b4d200114b8c7a796e5cc0974a7458fe72270e0 100644 (file)
@@ -114,7 +114,7 @@ clients.
 
 Q\bQu\bui\bic\bck\bk t\bte\bes\bst\bts\bs b\bbe\bef\bfo\bor\bre\be e\bev\bve\ber\bry\byt\bth\bhi\bin\bng\bg e\bel\bls\bse\be
 
-Before engaging in SMTP-level tests. postscreen(8) queries a number of local
+Before engaging in SMTP-level tests, postscreen(8) queries a number of local
 deny and allowlists. These tests speed up the handling of known clients.
 
   * Permanent allow/denylist test
index ee2cca0f151db31b4953da64c0b9695568c1ed34..30f1b81ed0f46fa41e6732195a43feef6a40c92e 100644 (file)
@@ -8,6 +8,14 @@ Wish list:
 
        postfix-install should mention makedefs.out.
 
+       In valid_utf8_string.c, add tests for over-long encodings
+       and surrogates. Can we add tests for 4-byte encodings with
+       strings that are displayable?
+
+       Add a pre-release check for '.' instead of ','. Generalize
+       from grep '[a-zA-Z0-9]\.  *[a-z]' proto/*|egrep -v
+       'i\.e\.|etc\.|e\.g\.|\.  *[a-zA-Z0-9]*\('
+
        Update DKIM examples for signing with the benefits of forced
        MIME converison with "force_mime_input_conversion = yes"
  
index 328131f77c3991cfeebf2c6bb2df1ac4619725a8..9bef8db4abea525cbb99b21efaa55bf0e9907cd0 100644 (file)
@@ -159,7 +159,7 @@ overhead for legitimate clients. </p>
 
 <h2> <a name="quick">Quick tests before everything else</a> </h2>
 
-<p> Before engaging in SMTP-level tests. <a href="postscreen.8.html">postscreen(8)</a> queries a
+<p> Before engaging in SMTP-level tests, <a href="postscreen.8.html">postscreen(8)</a> queries a
 number of local deny and allowlists. These tests speed up the
 handling of known clients. </p>
 
index a8bbd07aed92d3bc8c2fe05f11f02b0215a52c89..4c9e96cc87cf54fbe2de55ae07f8265d6e62f7d9 100644 (file)
@@ -18,7 +18,7 @@ SOCKETMAP_TABLE(5)                                          SOCKETMAP_TABLE(5)
        <b>postmap -q - <a href="socketmap_table.html">socketmap</a>:unix:</b><i>pathname</i><b>:</b><i>name</i> &lt;<i>inputfile</i>
 
 <b>DESCRIPTION</b>
-       The  Postfix  mail  system  uses optional tables for address rewriting.
+       The  Postfix  mail  system  uses optional tables for address rewriting,
        mail routing or policy lookup.
 
        The Postfix socketmap client expects TCP endpoint  names  of  the  form
index c53db3d6b38c68c19ae562ef4afff6ad3cd0d8fd..e5671ddbc5b03e594e23710e607d09d385ed8c1e 100644 (file)
@@ -19,7 +19,7 @@ Postfix socketmap table lookup client
 .ad
 .fi
 The Postfix mail system uses optional tables for address
-rewriting. mail routing or policy lookup.
+rewriting, mail routing or policy lookup.
 
 The Postfix socketmap client expects TCP endpoint names of
 the form \fBinet:\fIhost\fB:\fIport\fB:\fIname\fR, or
index b2d412df3d08e842e18ce1890eec5b755ae9602b..afd5cd3f162bb8cf23c5c418fd3178375cf223e2 100644 (file)
@@ -159,7 +159,7 @@ overhead for legitimate clients. </p>
 
 <h2> <a name="quick">Quick tests before everything else</a> </h2>
 
-<p> Before engaging in SMTP-level tests. postscreen(8) queries a
+<p> Before engaging in SMTP-level tests, postscreen(8) queries a
 number of local deny and allowlists. These tests speed up the
 handling of known clients. </p>
 
index be010540fd6971217a0a1609eef0fd2cf9a66ef8..52d1f4705fc6166b4694a4be11e8d3192f99bb58 100644 (file)
@@ -13,7 +13,7 @@
 #      \fBpostmap -q - socketmap:unix:\fIpathname\fB:\fIname\fB <\fIinputfile\fR
 # DESCRIPTION
 #      The Postfix mail system uses optional tables for address
-#      rewriting. mail routing or policy lookup.
+#      rewriting, mail routing or policy lookup.
 #
 #      The Postfix socketmap client expects TCP endpoint names of
 #      the form \fBinet:\fIhost\fB:\fIport\fB:\fIname\fR, or
index 28ebac2fbcdb9bcad7bc4438f70295d2925b2fc4..249e5576d804d5b61b3c373a9d2ec9bf00a1914b 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      "20231010"
+#define MAIL_RELEASE_DATE      "20231011"
 #define MAIL_VERSION_NUMBER    "3.9"
 
 #ifdef SNAPSHOT
index b03ceae4e102ff3907e37184333b9af07c1535b9..08b7e629c89b3266496cada72341a438fe0269a1 100644 (file)
@@ -85,6 +85,8 @@ int     valid_utf8_string(const char *str, ssize_t len)
   * 
   * XXX Need a test for 4-byte encodings, preferably with strings that can be
   * displayed.
+  * 
+  * XXX Need tests for over-long encodings and surrogates.
   */
 struct testcase {
     const char *name;
@@ -92,37 +94,65 @@ struct testcase {
     int     expected;
 };
 
+#define T_VALID                (1)
+#define T_INVALID      (0)
+#define valid_to_str(v)        ((v) ? "VALID" : "INVALID")
+
 static const struct testcase testcases[] = {
     {"Printable ASCII",
-       "printable", 1,
+       "printable", T_VALID,
+    },
+    {"Latin script, accented, no error",
+       "na\303\257ve", T_VALID,
     },
-    {"Latin accented text, no error",
-       "na\303\257ve", 1,
+    {"Latin script, accented, missing non-leading byte",
+       "na\303ve", T_INVALID,
     },
-    {"Latin text, with error",
-       "na\303ve", 0,
+    {"Latin script, accented, missing leading byte",
+       "na\257ve", T_INVALID,
     },
     {"Viktor, Cyrillic, no error",
-       "\320\262\320\270\320\272\321\202\320\276\321\200", 1,
+       "\320\262\320\270\320\272\321\202\320\276\321\200", T_VALID,
     },
-    {"Viktor, Cyrillic, two errors",
-       "\320\262\320\320\272\272\321\202\320\276\321\200", 0,
+    {"Viktor, Cyrillic, missing non-leading byte",
+       "\320\262\320\320\272\321\202\320\276\321\200", T_INVALID,
+    },
+    {"Viktor, Cyrillic, missing leading byte",
+       "\320\262\270\320\272\321\202\320\276\321\200", T_INVALID,
+    },
+    {"Viktor, Cyrillic, truncated",
+       "\320\262\320\270\320\272\321\202\320\276\321", T_INVALID,
     },
     {"Viktor, Hebrew, no error",
-       "\327\225\327\231\327\247\327\230\327\225\326\274\327\250", 1,
+       "\327\225\327\231\327\247\327\230\327\225\326\274\327\250", T_VALID,
     },
-    {"Viktor, Hebrew, with error",
-       "\327\225\231\327\247\327\230\327\225\326\274\327\250", 0,
+    {"Viktor, Hebrew, missing leading byte",
+       "\327\225\231\327\247\327\230\327\225\326\274\327\250", T_INVALID,
     },
     {"Chinese (Simplified), no error",
        "\344\270\255\345\233\275\344\272\222\350\201\224\347\275\221\347"
        "\273\234\345\217\221\345\261\225\347\212\266\345\206\265\347\273"
-       "\237\350\256\241\346\212\245\345\221\212", 1,
+       "\237\350\256\241\346\212\245\345\221\212", T_VALID,
+    },
+    {"Chinese (Simplified), missing leading byte",
+       "\344\270\255\345\233\275\344\272\222\350\201\224\275\221\347"
+       "\273\234\345\217\221\345\261\225\347\212\266\345\206\265\347\273"
+       "\237\350\256\241\346\212\245\345\221\212", T_INVALID,
+    },
+    {"Chinese (Simplified), missing first non-leading byte",
+       "\344\270\255\345\233\275\344\272\222\350\201\224\347\221\347"
+       "\273\234\345\217\221\345\261\225\347\212\266\345\206\265\347\273"
+       "\237\350\256\241\346\212\245\345\221\212", T_INVALID,
     },
-    {"Chinese (Simplified), with errors",
-       "\344\270\255\345\344\272\222\350\224\347\275\221\347"
+    {"Chinese (Simplified), missing second non-leading byte",
+       "\344\270\255\345\233\275\344\272\222\350\201\224\347\275\347"
+       "\273\234\345\217\221\345\261\225\347\212\266\345\206\265\347\273"
+       "\237\350\256\241\346\212\245\345\221\212", T_INVALID,
+    },
+    {"Chinese (Simplified), truncated",
+       "\344\270\255\345\233\275\344\272\222\350\201\224\347\275\221\347"
        "\273\234\345\217\221\345\261\225\347\212\266\345\206\265\347\273"
-       "\237\350\256\241\346\212\245\345", 0,
+       "\237\350\256\241\346\212\245\345", T_INVALID,
     },
 };
 
@@ -151,13 +181,13 @@ int     main(int argc, char **argv)
 
        if (actual == tp->expected) {
            vstream_fprintf(VSTREAM_ERR, "input: >%s<, want and got: >%s<\n",
-                           tp->input, actual ? "valid" : "not valid");
+                           tp->input, valid_to_str(actual));
            vstream_fprintf(VSTREAM_ERR, "PASS %s\n", tp->name);
            pass++;
        } else {
            vstream_fprintf(VSTREAM_ERR, "input: >%s<, want: >%s<, got: >%s<\n",
-                           tp->input, tp->expected ? "valid" : "not valid",
-                           actual ? "valid" : "not valid");
+                           tp->input, valid_to_str(tp->expected),
+                           valid_to_str(actual));
            vstream_fprintf(VSTREAM_ERR, "FAIL %s\n", tp->name);
            fail++;
        }