]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.6-20210422
authorWietse Venema <wietse@porcupine.org>
Thu, 22 Apr 2021 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Fri, 23 Apr 2021 01:40:45 +0000 (21:40 -0400)
34 files changed:
postfix/HISTORY
postfix/README_FILES/DB_README
postfix/README_FILES/LDAP_README
postfix/README_FILES/LMDB_README
postfix/README_FILES/MYSQL_README
postfix/README_FILES/PGSQL_README
postfix/README_FILES/SASL_README
postfix/README_FILES/SQLITE_README
postfix/README_FILES/TLS_README
postfix/RELEASE_NOTES
postfix/WISHLIST
postfix/conf/master.cf
postfix/html/DB_README.html
postfix/html/LDAP_README.html
postfix/html/LMDB_README.html
postfix/html/MYSQL_README.html
postfix/html/PGSQL_README.html
postfix/html/SASL_README.html
postfix/html/SQLITE_README.html
postfix/html/TLS_README.html
postfix/proto/DB_README.html
postfix/proto/LDAP_README.html
postfix/proto/LMDB_README.html
postfix/proto/MYSQL_README.html
postfix/proto/PGSQL_README.html
postfix/proto/SASL_README.html
postfix/proto/SQLITE_README.html
postfix/proto/TLS_README.html
postfix/src/global/config_known_tcp_ports.c
postfix/src/global/config_known_tcp_ports.ref
postfix/src/global/mail_version.h
postfix/src/util/Makefile.in
postfix/src/util/argv.h
postfix/src/util/argv_split_at.c [new file with mode: 0644]

index 581235eac16da83ddc2b36ea4d4e3d848ee436ac..803e2851b0027497fbf397fc0da207cb67e4ab77 100644 (file)
@@ -25531,3 +25531,19 @@ Apologies for any names omitted.
        Bugfix (bug introduced 20210102): panic in some postconf
        commands due to duplicate initialization of compatibility
        level comparison operators. File: global/compat_level.c.
+
+       Cleanup: stricter parsing of known_tcp_port settings. Files:
+       util/argv_split_at.c, util/argv.h, global/config_known_tcp_ports.c.
+
+20210420
+
+       Documentation: typofixes by Paul Menzel. File: RELEASE_NOTES.
+
+       Documentation: numeric IP address examples. File: conf/master.cf.
+
+       Documentation: added "-Wl,-R,/path/to/directory" hints to 
+       optional build instructions. Files: proto/DB_README.html,
+       proto/LDAP_README.html, proto/LMDB_README.html,
+       proto/MYSQL_README.html, proto/PGSQL_README.html,
+       proto/SASL_README.html, proto/SQLITE_README.html,
+       proto/TLS_README.html.
index 869218e4e4b7b7bb3e7097296548a1e0f747b259..2d0ac934710cda46b3168065eb57c748e7f9e78e 100644 (file)
@@ -65,6 +65,9 @@ something like:
         AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
     % make
 
+If your Berkeley DB shared library is in a directory that the RUN-TIME linker
+does not know about, add a "-Wl,-R,/path/to/directory" option after "-ldb".
+
 Solaris needs this:
 
     % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
index 6723356360a421f75de72bf72134cd5e21c52fa3..a6cb84e5ed2fadda77b8d49c868e01bfca1cd4ad 100644 (file)
@@ -54,6 +54,9 @@ this in the top level of your Postfix source tree should work:
     % make makefiles CCARGS="-I/usr/local/include -DHAS_LDAP" \
         AUXLIBS_LDAP="-L/usr/local/lib -lldap -L/usr/local/lib -llber"
 
+If your LDAP shared library is in a directory that the RUN-TIME linker does not
+know about, add a "-Wl,-R,/path/to/directory" option after "-lldap".
+
 Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_LDAP. With Postfix
 3.0 and later, the old AUXLIBS variable still supports building a statically-
 loaded LDAP database client, but only the new AUXLIBS_LDAP variable supports
index e63640f51c0a40f1883f75170ae400a4038e6cae..193880b5161f8fb45efdcd5f874540e7c0552aa0 100644 (file)
@@ -31,6 +31,9 @@ support, use something like:
         AUXLIBS_LMDB="-L/usr/local/lib -llmdb"
     % make
 
+If your LMDB shared library is in a directory that the RUN-TIME linker does not
+know about, add a "-Wl,-R,/path/to/directory" option after "-llmdb".
+
 Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_LMDB. With Postfix
 3.0 and later, the old AUXLIBS variable still supports building a statically-
 loaded LMDB database client, but only the new AUXLIBS_LMDB variable supports
index b8304c2212d4a7cb48c03bd1c6b440dac6fbcaaf..c6633a91893f94beb3dcb0ecf24ab8e9496b2e8e 100644 (file)
@@ -39,6 +39,9 @@ mysqlclient library (and libm) to AUXLIBS_MYSQL, for example:
         'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
         'AUXLIBS_MYSQL=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'
 
+If your MySQL shared library is in a directory that the RUN-TIME linker does
+not know about, add a "-Wl,-R,/path/to/directory" option after "-lmysqlclient".
+
 Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_MYSQL. With Postfix
 3.0 and later, the old AUXLIBS variable still supports building a statically-
 loaded MySQL database client, but only the new AUXLIBS_MYSQL variable supports
index 7f6323a54ac88d34e48410723abb6b24912b9724..ae9c3bff5622eaa54a4a07795a0ec1a03aaca014 100644 (file)
@@ -36,6 +36,9 @@ For example:
             'CCARGS=-DHAS_PGSQL -I/usr/local/include/pgsql' \
             'AUXLIBS_PGSQL=-L/usr/local/lib -lpq'
 
+If your PostgreSQL shared library is in a directory that the RUN-TIME linker
+does not know about, add a "-Wl,-R,/path/to/directory" option after "-lpq".
+
 Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_PGSQL. With Postfix
 3.0 and later, the old AUXLIBS variable still supports building a statically-
 loaded PostgreSQL database client, but only the new AUXLIBS_PGSQL variable
index d9561d7f354a1386d9b31008d8d21720cf2e5fa8..c0e42ad6787b17760ed2b9c8073e4aeb5d6455cd 100644 (file)
@@ -1344,6 +1344,10 @@ Cyrus SASL version 2.1.x
     % m\bma\bak\bke\be m\bma\bak\bke\bef\bfi\bil\ble\bes\bs C\bCC\bCA\bAR\bRG\bGS\bS=\b="\b"-\b-D\bDU\bUS\bSE\bE_\b_S\bSA\bAS\bSL\bL_\b_A\bAU\bUT\bTH\bH -\b-D\bDU\bUS\bSE\bE_\b_C\bCY\bYR\bRU\bUS\bS_\b_S\bSA\bAS\bSL\bL \\b\
         -\b-I\bI/\b/u\bus\bsr\br/\b/l\blo\boc\bca\bal\bl/\b/i\bin\bnc\bcl\blu\bud\bde\be/\b/s\bsa\bas\bsl\bl"\b" A\bAU\bUX\bXL\bLI\bIB\bBS\bS=\b="\b"-\b-L\bL/\b/u\bus\bsr\br/\b/l\blo\boc\bca\bal\bl/\b/l\bli\bib\bb -\b-l\bls\bsa\bas\bsl\bl2\b2"\b"
 
+    If your Cyrus SASL shared library is in a directory that the RUN-TIME
+    linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+    "-lsasl2".
+
 Cyrus SASL version 1.5.x
 
     % m\bma\bak\bke\be t\bti\bid\bdy\by # if you have left-over files from a previous build
index 324b305887da49d6c6e1c152f75320f305e444c2..3fb9757c5e58783fdf8e56c9230e3cec434f2a54 100644 (file)
@@ -26,6 +26,9 @@ For example:
          'CCARGS=-DHAS_SQLITE -I/usr/local/include' \
          'AUXLIBS_SQLITE=-L/usr/local/lib -lsqlite3 -lpthread'
 
+If your SQLite shared library is in a directory that the RUN-TIME linker does
+not know about, add a "-Wl,-R,/path/to/directory" option after "-lsqlite3".
+
 Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_SQLITE. With Postfix
 3.0 and later, the old AUXLIBS variable still supports building a statically-
 loaded SQLite database client, but only the new AUXLIBS_SQLITE variable
index 2926079c6a733b1fa07b0366b8250ec71f189381..315d9fbf6319e2f1f2d5eb92e53881e9b5876c62 100644 (file)
@@ -2440,6 +2440,10 @@ a\bap\bpp\bpr\bro\bop\bpr\bri\bia\bat\bte\be.\b.
         % m\bma\bak\bke\be m\bma\bak\bke\bef\bfi\bil\ble\bes\bs C\bCC\bCA\bAR\bRG\bGS\bS=\b="\b"-\b-D\bDU\bUS\bSE\bE_\b_T\bTL\bLS\bS -\b-I\bI/\b/u\bus\bsr\br/\b/l\blo\boc\bca\bal\bl/\b/i\bin\bnc\bcl\blu\bud\bde\be"\b" \\b\
             A\bAU\bUX\bXL\bLI\bIB\bBS\bS=\b="\b"-\b-L\bL/\b/u\bus\bsr\br/\b/l\blo\boc\bca\bal\bl/\b/l\bli\bib\bb -\b-l\bls\bss\bsl\bl -\b-l\blc\bcr\bry\byp\bpt\bto\bo"\b"
 
+    If your OpenSSL shared library is in a directory that the RUN-TIME linker
+    does not know about, add a "-Wl,-R,/path/to/directory" option after "-
+    lcrypto".
+
     On Solaris, specify the -R option as shown below:
 
         % m\bma\bak\bke\be t\bti\bid\bdy\by # if you have left-over files from a previous build
index 4f09c16e2a1468e9011ba97c7a7c30029d91534e..d96997d68809134e0e7060fa80275e889d7ff2d9 100644 (file)
@@ -30,7 +30,7 @@ Major changes with snapshot 20210220
 
 Postfix version 3.6 deprecates terminology that implies white is
 better than black. Instead, Postfix prefers 'allowlist', 'denylist',
-and variations on those words. 
+and variations on those words.
 
 Set "respectful_logging = no" in main.cf to keep using the old
 behavior (parameter names and logging).
@@ -89,7 +89,7 @@ no" permanent in main.cf, for example:
 To stop the reminder, configure the respectful_logging parameter to
 "yes" or "no", or configure "compatibility_level = 3.6".
 
-Major changes with snapshot 20220109
+Major changes with snapshot 20210109
 ====================================
 
 Starting with Postfix version 3.6, the "latest" compatibility level
@@ -218,7 +218,7 @@ Incompatible change with snapshot 20200705
 ==========================================
 
 The minimum OpenSSL version is 1.1.1, which will reach the end
-of life by 20203-09-11. 
+of life by 2023-09-11.
 
 The default digest has changed from md5 to sha256 (Postfix 3.6 with
 compatibility_level >= 3). With a lower compatibility_level setting,
@@ -232,7 +232,7 @@ Incompatible change with snapshot 20200531
 ==========================================
 
 Postfix delivery agents now log an explicit record when delegating
-delivery to a different Postfix delivery agent. 
+delivery to a different Postfix delivery agent.
 
 For example, with "best_mx_transport = local", an SMTP delivery
 agent will now log when a recipient will be delivered locally. This
index 757bb98028063071ba488315dfce0633f16fedf1..30b15c9621f31be1c34b0730473696be6538441b 100644 (file)
@@ -1,5 +1,7 @@
 Wish list:
 
+       Add verp=+= to the qmgr "from=" logging.
+
        Make smtpd_relay_before_recipient_restrictions settable
        in smtpd_checks tests.
 
index 30c3458e6d92b32ce6331009f6b5b9a2d4f47bd0..68543440f1a42edc9970801f9aa20c7f2b462ce0 100644 (file)
@@ -14,6 +14,8 @@ smtp      inet  n       -       n       -       -       smtpd
 #smtpd     pass  -       -       n       -       -       smtpd
 #dnsblog   unix  -       -       n       -       0       dnsblog
 #tlsproxy  unix  -       -       n       -       0       tlsproxy
+# Choose one: enable submission for loopback clients only, or for any client.
+#127.0.0.1:submission inet n -   n       -       -       smtpd
 #submission inet n       -       n       -       -       smtpd
 #  -o syslog_name=postfix/submission
 #  -o smtpd_tls_security_level=encrypt
@@ -26,6 +28,8 @@ smtp      inet  n       -       n       -       -       smtpd
 #  -o smtpd_recipient_restrictions=
 #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
 #  -o milter_macro_daemon_name=ORIGINATING
+# Choose one: enable smtps for loopback clients only, or for any client.
+#127.0.0.1:smtps inet n  -       n       -       -       smtpd
 #smtps     inet  n       -       n       -       -       smtpd
 #  -o syslog_name=postfix/smtps
 #  -o smtpd_tls_wrappermode=yes
index f1ba9d30b59e54ca3810b89544251b0ec40d2eb2..6cfd24f948de8f499ae83c58792be962a838aa01 100644 (file)
@@ -100,6 +100,10 @@ source code, use something like: </p>
 </pre>
 </blockquote>
 
+<p> If your Berkeley DB shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-ldb". </p>
+
 <p> Solaris needs this: </p>
 
 <blockquote>
index e2f1bd23f8d5661dc18bfec5dbfc4d18073bd371..fae15b914bde840e84552287202b0cc56d34b8df 100644 (file)
@@ -96,6 +96,10 @@ your Postfix source tree should work: </p>
 </pre>
 </blockquote>
 
+<p> If your LDAP shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lldap". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of <a href="LDAP_README.html">AUXLIBS_LDAP</a>.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded LDAP database client, but only the new
index 3ac031cc506917d36ca1ff8692308910852596cb..caf554304b7036c19eb7ceb5581c65fb4cfccd70 100644 (file)
@@ -55,6 +55,10 @@ build Postfix with LMDB support, use something like: </p>
 </pre>
 </blockquote>
 
+<p> If your LMDB shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-llmdb". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of <a href="LMDB_README.html">AUXLIBS_LMDB</a>.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded LMDB database client, but only the new
index 48622cfd3cb216a431a6569d5a7a412519a39e91..8ac3826e49cdb602acf8304fb3c5c3fcea088184 100644 (file)
@@ -62,6 +62,10 @@ make -f Makefile.init makefiles \
 </pre>
 </blockquote>
 
+<p> If your MySQL shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lmysqlclient". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of <a href="MYSQL_README.html">AUXLIBS_MYSQL</a>.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded MySQL database client, but only the new
index cb9c8a5cc1f7957257e2e4f965cb29e9c1ff5a49..98741395a9231923932a7849ff0e7d0f8a79b8d6 100644 (file)
@@ -57,6 +57,10 @@ the location of the libpq library file. </p>
 </pre>
 </blockquote>
 
+<p> If your PostgreSQL shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lpq". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of <a href="PGSQL_README.html">AUXLIBS_PGSQL</a>.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded PostgreSQL database client, but only
index 1f4bfdf4a7999599fd403e26b5858954dcdef539..8fe305110018047d3db2f2433cd88c68efad89c8 100644 (file)
@@ -2127,6 +2127,10 @@ definitions: </p>
     -I/usr/local/include/sasl" AUXLIBS="-L/usr/local/lib -lsasl2"</strong>
 </pre>
 
+<p> If your Cyrus SASL shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lsasl2". </p>
+
 </dd>
 
 <dt>Cyrus SASL version 1.5.x</dt>
index fe721358cf8360a130499b55ea896e61273a52f3..f850d50a7f87579b196e9ca71b80f36f19add352 100644 (file)
@@ -48,6 +48,10 @@ make -f Makefile.init makefiles \
 </pre>
 </blockquote>
 
+<p> If your SQLite shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lsqlite3". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of <a href="SQLITE_README.html">AUXLIBS_SQLITE</a>.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded SQLite database client, but only the new
index 4c8762f80d52820ca3b30a16033758d0570f86ff..248b5e2e46ecb4827b29932dbde2564f29502e4c 100644 (file)
@@ -3182,6 +3182,10 @@ are in directory <tt>/usr/local/lib</tt>:  </p>
 </pre>
 </blockquote>
 
+<p> If your OpenSSL shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lcrypto". </p>
+
 <p> On Solaris, specify the <tt>-R</tt> option as shown below:
 
 <blockquote>
index 79c04a5e20240c3ce98224067a979bf350715e3e..cca3e2b626672290785878ec06afa8c004ed7fe2 100644 (file)
@@ -100,6 +100,10 @@ source code, use something like: </p>
 </pre>
 </blockquote>
 
+<p> If your Berkeley DB shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-ldb". </p>
+
 <p> Solaris needs this: </p>
 
 <blockquote>
index 5dc205bd8709e22e3104280815bab56c8ee1c98d..a105ff6d5a719df362823b2aa617487cbbabf042 100644 (file)
@@ -96,6 +96,10 @@ your Postfix source tree should work: </p>
 </pre>
 </blockquote>
 
+<p> If your LDAP shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lldap". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_LDAP.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded LDAP database client, but only the new
index 726e415f7e9132df08748321f955cd825985928b..a9794cca6aee9b7f37d047eeeb9358bbabd52bc4 100644 (file)
@@ -55,6 +55,10 @@ build Postfix with LMDB support, use something like: </p>
 </pre>
 </blockquote>
 
+<p> If your LMDB shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-llmdb". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_LMDB.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded LMDB database client, but only the new
index 0a1221e50156872361cd78a40cdbffb6dca9f6d4..fc7bdc99799cb390b7aa7b6b5dc6b13dba587df3 100644 (file)
@@ -62,6 +62,10 @@ make -f Makefile.init makefiles \
 </pre>
 </blockquote>
 
+<p> If your MySQL shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lmysqlclient". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_MYSQL.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded MySQL database client, but only the new
index 7658a9b5cc57e4a455803dc2d71d76127de828aa..61445ba4e8ca8d0d4448eef910d472a9c5b8d302 100644 (file)
@@ -57,6 +57,10 @@ the location of the libpq library file. </p>
 </pre>
 </blockquote>
 
+<p> If your PostgreSQL shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lpq". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_PGSQL.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded PostgreSQL database client, but only
index 404c2c978281062fd3b21ec51b0b0067ff18f09f..89a9162a6a046e954093235037ed2d56a561935c 100644 (file)
@@ -2127,6 +2127,10 @@ definitions: </p>
     -I/usr/local/include/sasl" AUXLIBS="-L/usr/local/lib -lsasl2"</strong>
 </pre>
 
+<p> If your Cyrus SASL shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lsasl2". </p>
+
 </dd>
 
 <dt>Cyrus SASL version 1.5.x</dt>
index 3c21579af7b3aba6fd4c39fd185c06b9dfd338a4..97f14d8e22ff3142fc0e5d2b77924ff9bfa740a6 100644 (file)
@@ -48,6 +48,10 @@ make -f Makefile.init makefiles \
 </pre>
 </blockquote>
 
+<p> If your SQLite shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lsqlite3". </p>
+
 <p> Postfix versions before 3.0 use AUXLIBS instead of AUXLIBS_SQLITE.
 With Postfix 3.0 and later, the old AUXLIBS variable still supports
 building a statically-loaded SQLite database client, but only the new
index e86caad20f76faf8d17628dae1e16329c8537e4d..a58595768d84bde92360b1e90eef07b1b6766978 100644 (file)
@@ -3182,6 +3182,10 @@ are in directory <tt>/usr/local/lib</tt>:  </p>
 </pre>
 </blockquote>
 
+<p> If your OpenSSL shared library is in a directory that the RUN-TIME
+linker does not know about, add a "-Wl,-R,/path/to/directory" option after
+"-lcrypto". </p>
+
 <p> On Solaris, specify the <tt>-R</tt> option as shown below:
 
 <blockquote>
index 070a5e8ea48c8bad5869cb0e0436e02977e78e86..84f66e81032c2f6a0ca032cd4e2f48a57f798640 100644 (file)
@@ -77,7 +77,7 @@ void    config_known_tcp_ports(const char *source, const char *settings)
     for (cpp = associations->argv; *cpp != 0; cpp++) {
        char   *temp = concatenate(" ", *cpp, " ", (char *) 0);
 
-       association = argv_split(temp, "=");
+       association = argv_split_at(temp, '=');
        myfree(temp);
 
        if (association->argc == 0) {
@@ -156,6 +156,13 @@ static struct test_case test_cases[] = {
         /* warning */ "",
         /* export */ "lmtp=24 smtp=25 smtps=465 submissions=465"
     },
+    {"equal-equal",
+        /* config */ "smtp = 25, smtps == submissions = 465, lmtp = 24",
+        /* warning */ "config_known_tcp_ports: warning: equal-equal: "
+       "in \" smtps == submissions = 465\": missing service name before "
+       "\"=\"\n",
+        /* export */ "lmtp=24 smtp=25 smtps=465 submissions=465"
+    },
     {"port test 1",
         /* config */ "smtps = submission =",
         /* warning */ "config_known_tcp_ports: warning: port test 1: "
index d2bc8339d80cea9234738c0c0997667a102ded2f..5a35677f0c351af033cb9d8de6a32ec3515155cf 100644 (file)
@@ -1,7 +1,8 @@
 config_known_tcp_ports: good: PASS
+config_known_tcp_ports: equal-equal: PASS
 config_known_tcp_ports: port test 1: PASS
 config_known_tcp_ports: port test 2: PASS
 config_known_tcp_ports: port test 3: PASS
 config_known_tcp_ports: service name test 1: PASS
 config_known_tcp_ports: service name test 2: PASS
-config_known_tcp_ports: PASS=6 FAIL=0
+config_known_tcp_ports: PASS=7 FAIL=0
index dbf6fa7699a75a79c0eaea80cc87ce7f38ec00e2..f5967bf1271b53c863f541b9f79ac2a62800e6d9 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      "20210419"
+#define MAIL_RELEASE_DATE      "20210422"
 #define MAIL_VERSION_NUMBER    "3.6"
 
 #ifdef SNAPSHOT
index c187969782aa23a37bd267044201d891d2e4d2a1..449eae4601cc0d2a407490e277b39e8fa3510733 100644 (file)
@@ -42,7 +42,7 @@ SRCS  = alldig.c allprint.c argv.c argv_split.c attr_clnt.c attr_print0.c \
        extpar.c dict_inline.c casefold.c dict_utf8.c strcasecmp_utf8.c \
        split_qnameval.c argv_attr_print.c argv_attr_scan.c dict_file.c \
        msg_logger.c logwriter.c unix_dgram_connect.c unix_dgram_listen.c \
-       byte_mask.c known_tcp_ports.c
+       byte_mask.c known_tcp_ports.c argv_split_at.c
 OBJS   = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        attr_print64.o attr_print_plain.o attr_scan0.o attr_scan64.o \
        attr_scan_plain.o auto_clnt.o base64_code.o basename.o binhash.o \
@@ -86,7 +86,7 @@ OBJS  = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        extpar.o dict_inline.o casefold.o dict_utf8.o strcasecmp_utf8.o \
        split_qnameval.o argv_attr_print.o argv_attr_scan.o dict_file.o \
        msg_logger.o logwriter.o unix_dgram_connect.o unix_dgram_listen.o \
-       byte_mask.o known_tcp_ports.o
+       byte_mask.o known_tcp_ports.o argv_split_at.o
 # MAP_OBJ is for maps that may be dynamically loaded with dynamicmaps.cf.
 # When hard-linking these, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ),
 # otherwise it sets the PLUGIN_* macros.
@@ -1049,6 +1049,16 @@ argv_split.o: stringops.h
 argv_split.o: sys_defs.h
 argv_split.o: vbuf.h
 argv_split.o: vstring.h
+argv_split_at.o: argv.h
+argv_split_at.o: argv_split_at.c
+argv_split_at.o: check_arg.h
+argv_split_at.o: msg.h
+argv_split_at.o: mymalloc.h
+argv_split_at.o: split_at.h
+argv_split_at.o: stringops.h
+argv_split_at.o: sys_defs.h
+argv_split_at.o: vbuf.h
+argv_split_at.o: vstring.h
 argv_splitq.o: argv.h
 argv_splitq.o: argv_splitq.c
 argv_splitq.o: check_arg.h
@@ -1977,6 +1987,8 @@ load_file.o: vbuf.h
 load_file.o: vstream.h
 load_file.o: warn_stat.h
 load_lib.o: load_lib.c
+load_lib.o: load_lib.h
+load_lib.o: msg.h
 load_lib.o: sys_defs.h
 logwriter.o: check_arg.h
 logwriter.o: iostuff.h
index f7ce699569e79dbccea6f9da779bb7ab3a802dc0..1e3b4670542081c51983b2a3066dfa4e9c1629c2 100644 (file)
@@ -39,6 +39,10 @@ extern ARGV *argv_splitq(const char *, const char *, const char *);
 extern ARGV *argv_splitq_count(const char *, const char *, const char *, ssize_t);
 extern ARGV *argv_splitq_append(ARGV *, const char *, const char *, const char *);
 
+extern ARGV *argv_split_at(const char *, int);
+extern ARGV *argv_split_at_count(const char *, int, ssize_t);
+extern ARGV *argv_split_at_append(ARGV *, const char *, int);
+
 #define ARGV_FAKE_BEGIN(fake_argv, arg) { \
        ARGV fake_argv; \
        char *__fake_argv_args__[2]; \
diff --git a/postfix/src/util/argv_split_at.c b/postfix/src/util/argv_split_at.c
new file mode 100644 (file)
index 0000000..fcdb4ff
--- /dev/null
@@ -0,0 +1,124 @@
+/*++
+/* NAME
+/*     argv_split_at 3
+/* SUMMARY
+/*     string array utilities
+/* SYNOPSIS
+/*     #include <argv.h>
+/*
+/*     ARGV    *argv_split_at(string, sep)
+/*     const char *string;
+/*     int     sep;
+/*
+/*     ARGV    *argv_split_at_count(string, sep, count)
+/*     const char *string;
+/*     int     sep;
+/*     ssize_t count;
+/*
+/*     ARGV    *argv_split_at_append(argv, string, sep)
+/*     ARGV    *argv;
+/*     const char *string;
+/*     int     sep;
+/* DESCRIPTION
+/*     argv_split_at() splits \fIstring\fR into fields using a
+/*     single separator specified in \fIsep\fR. The result is a
+/*     null-terminated string array.
+/*
+/*     argv_split_at_count() is like argv_split_at() but stops
+/*     splitting input after at most \fIcount\fR -1 times and
+/*     leaves the remainder, if any, in the last array element.
+/*     It is an error to specify a count < 1.
+/*
+/*     argv_split_at_append() performs the same operation as
+/*     argv_split_at(), but appends the result to an existing
+/*     string array.
+/* SEE ALSO
+/*     split_at(), trivial string splitter.
+/* DIAGNOSTICS
+/*     Fatal errors: memory allocation problem.
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*
+/*     Wietse Venema
+/*     Google, Inc.
+/*     111 8th Avenue
+/*     New York, NY 10011, USA
+/*--*/
+
+/* System libraries. */
+
+#include <sys_defs.h>
+#include <string.h>
+
+/* Application-specific. */
+
+#include <mymalloc.h>
+#include <stringops.h>
+#include <argv.h>
+#include <msg.h>
+#include <split_at.h>
+
+/* argv_split_at - split string into field array */
+
+ARGV   *argv_split_at(const char *string, int sep)
+{
+    ARGV   *argvp = argv_alloc(1);
+    char   *saved_string = mystrdup(string);
+    char   *bp = saved_string;
+    char   *arg;
+
+    while ((arg = split_at(bp, sep)) != 0) {
+       argv_add(argvp, bp, (char *) 0);
+       bp = arg;
+    }
+    argv_add(argvp, bp, (char *) 0);
+    argv_terminate(argvp);
+    myfree(saved_string);
+    return (argvp);
+}
+
+/* argv_split_at_count - split string into field array */
+
+ARGV   *argv_split_at_count(const char *string, int sep, ssize_t count)
+{
+    ARGV   *argvp = argv_alloc(1);
+    char   *saved_string = mystrdup(string);
+    char   *bp = saved_string;
+    char   *arg;
+
+    if (count < 1)
+       msg_panic("argv_split_at_count: bad count: %ld", (long) count);
+    while (count-- > 1 && (arg = split_at(bp, sep)) != 0) {
+       argv_add(argvp, bp, (char *) 0);
+       bp = arg;
+    }
+    argv_add(argvp, bp, (char *) 0);
+    argv_terminate(argvp);
+    myfree(saved_string);
+    return (argvp);
+}
+
+/* argv_split_at_append - split string into field array, append to array */
+
+ARGV   *argv_split_at_append(ARGV *argvp, const char *string, int sep)
+{
+    char   *saved_string = mystrdup(string);
+    char   *bp = saved_string;
+    char   *arg;
+
+    while ((arg = split_at(bp, sep)) != 0) {
+       argv_add(argvp, bp, (char *) 0);
+       bp = arg;
+    }
+    argv_add(argvp, bp, (char *) 0);
+    argv_terminate(argvp);
+    myfree(saved_string);
+    return (argvp);
+}