]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.2.1 v2.2.1
authorWietse Venema <wietse@porcupine.org>
Tue, 15 Mar 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 21:11:42 +0000 (16:11 -0500)
61 files changed:
postfix/HISTORY
postfix/Makefile.in
postfix/README_FILES/INSTALL
postfix/README_FILES/IPV6_README
postfix/README_FILES/SMTPD_POLICY_README
postfix/conf/postfix-files
postfix/html/INSTALL.html
postfix/html/IPV6_README.html
postfix/html/SMTPD_POLICY_README.html
postfix/proto/INSTALL.html
postfix/proto/IPV6_README.html
postfix/proto/SMTPD_POLICY_README.html
postfix/src/anvil/Makefile.in
postfix/src/bounce/Makefile.in
postfix/src/cleanup/Makefile.in
postfix/src/discard/Makefile.in
postfix/src/dns/Makefile.in
postfix/src/error/Makefile.in
postfix/src/flush/Makefile.in
postfix/src/fsstone/Makefile.in
postfix/src/global/Makefile.in
postfix/src/global/db_common.c
postfix/src/global/mail_version.h
postfix/src/lmtp/Makefile.in
postfix/src/local/Makefile.in
postfix/src/master/Makefile.in
postfix/src/oqmgr/Makefile.in
postfix/src/pickup/Makefile.in
postfix/src/pipe/Makefile.in
postfix/src/postalias/Makefile.in
postfix/src/postalias/postalias.c
postfix/src/postcat/Makefile.in
postfix/src/postconf/Makefile.in
postfix/src/postdrop/Makefile.in
postfix/src/postfix/Makefile.in
postfix/src/postkick/Makefile.in
postfix/src/postlock/Makefile.in
postfix/src/postlog/Makefile.in
postfix/src/postmap/Makefile.in
postfix/src/postmap/postmap.c
postfix/src/postqueue/Makefile.in
postfix/src/postsuper/Makefile.in
postfix/src/proxymap/Makefile.in
postfix/src/qmgr/Makefile.in
postfix/src/qmqpd/Makefile.in
postfix/src/scache/Makefile.in
postfix/src/sendmail/Makefile.in
postfix/src/showq/Makefile.in
postfix/src/smtp/Makefile.in
postfix/src/smtpd/Makefile.in
postfix/src/smtpstone/Makefile.in
postfix/src/smtpstone/smtp-sink.c
postfix/src/spawn/Makefile.in
postfix/src/tls/Makefile.in
postfix/src/tls/tls_scache.c
postfix/src/tls/tls_scache.h
postfix/src/trivial-rewrite/Makefile.in
postfix/src/util/Makefile.in
postfix/src/util/dict_db.c
postfix/src/verify/Makefile.in
postfix/src/virtual/Makefile.in

index 0a545ce85b79449c0a7064fdec54d5c59b855403..926f0b02722982b7f17003a582a1b01db1e73dc5 100644 (file)
@@ -10457,3 +10457,31 @@ Apologies for any names omitted.
        is treated as its own MX host; there is no meaningful
        equivalent for NS access control. File: smtpd/smtpd_check.c.
 
+20050310
+
+       Bugfix: the AIX and SUN compilers rightfully complained
+       about non-portable code in the "new" LDAP/SQL client. File:
+       global/db_common.c.
+
+       Workaround: some systems no longer recognize "tail +2" as
+       valid command syntax. Instead they require "improved" syntax
+       that is not valid on several other systems that Postfix
+       builds on.  So we have to stop using the tail command.
+       Files: Makefile.in, src/*/Makefile.in.
+
+20050312
+
+       Bugfix: the TLS session cache cleaning code didn't always
+       delete the right entry. Problem found by Victor Duchovni,
+       more problems found by Wietse. File: tls/tls_scache.c.
+
+20050314
+
+       Portability: Berkeley DB changed API from version 2.5 to
+       2.6. Rob Foehl. File: util/dict_db.c.
+
+20050315
+
+       Bugfix: when <unistd.h> is included, read is a reserved
+       identifier. File: smtpstone/smtp-source.c.
+
index 22b3fa19dd66f1a3028b058601522ad913e457c7..fde9ca2a25fd885ddfa9d8129e9f19bcf98ec899 100644 (file)
@@ -20,7 +20,7 @@ makefiles Makefiles:
         (set -e; echo "[$$i]"; cd $$i; rm -f Makefile; \
         $(MAKE) -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
        done;
-       rm -f Makefile; (tail +2 conf/makedefs.out; cat Makefile.in) >Makefile
+       rm -f Makefile; (cat conf/makedefs.out Makefile.in) >Makefile
 
 update printfck tests:
        set -e; for i in $(DIRS); do \
index 94bea91962687f5041f2b7187a176ecd4257ea1a..ae994309bbc11e0b7857016656ebab64dbf81f37 100644 (file)
@@ -67,7 +67,7 @@ path.
     % export MANPATH; MANPATH="`pwd`/man:$MANPATH"
     % setenv MANPATH "`pwd`/man:$MANPATH"
 
-Of particular interest is the postconf(5) manual page that lists all the 300+
+Of particular interest is the postconf(5) manual page that lists all the 400+
 configuration parameters. The HTML version of this text makes it easy to
 navigate around.
 
@@ -302,15 +302,6 @@ a group:
 
     Note: there should be no whitespace before "postfix:".
 
-  * Make sure there is a "postfix" alias in /etc/aliases, or whatever the
-    pathname of your aliases file is; the command "postconf alias_maps" will
-    tell you.
-
-        /etc/aliases:
-            postfix: root
-
-    Note: there should be no whitespace before "postfix:".
-
   * Create a group "postdrop" with a group id that is not used by any other
     user account. Not even by the postfix user account. My group file entry
     looks like:
@@ -609,16 +600,29 @@ and/or dial-up networks.
 
 1\b10\b0.\b.8\b8 -\b- C\bCr\bre\bea\bat\bte\be t\bth\bhe\be a\bal\bli\bia\bas\bse\bes\bs d\bda\bat\bta\bab\bba\bas\bse\be
 
-Finally, if you haven't used Sendmail prior to using Postfix, you will have to
-build the alias database with one of the following commands:
+Postfix uses a Sendmail-compatible aliases(5) table to redirect mail for local
+(8) recipients. Typically, this information is kept in two files: in a text
+file /etc/aliases and in an indexed file /etc/aliases.db. The command "postconf
+alias_maps" will tell you the exact location of the text file.
+
+First, be sure to update the text file with aliases for root, postmaster and
+"postfix" that forward mail to a real person. Postfix has a sample aliases file
+/etc/postfix/aliases that you can adapt to local conditions.
+
+    /etc/aliases:
+        root: you
+        postmaster: root
+        postfix: root
+        bin: root
+        etcetera...
+
+Note: there should be no whitespace before the ":".
+
+Finally, build the indexed aliases file with one of the following commands:
 
     # newaliases
     # sendmail -bi
 
-Be sure to set up aliases for root and postmaster that forward mail to a real
-person. Postfix has a sample aliases file /etc/postfix/aliases that you can
-adapt to local conditions.
-
 1\b11\b1 -\b- T\bTo\bo c\bch\bhr\bro\boo\bot\bt o\bor\br n\bno\bot\bt t\bto\bo c\bch\bhr\bro\boo\bot\bt
 
 Postfix daemon processes can be configured (via master.cf) to run in a chroot
index 62b0c34053ba625545241fd6f538c8ded13df06e..30b6da631505abf1355a0e6bb269ec02610e2b5b 100644 (file)
@@ -69,7 +69,7 @@ configuration work with Postfix.
         /etc/postfix/main.cf:
             # You must stop/start Postfix after changing this parameter.
             inet_protocols = ipv4       (DEFAULT: enable IPv4 only)
-            inet_protocols = all        (enable both IPv4 and IPv6)
+            inet_protocols = all        (enable IPv4, and IPv6 if supported)
             inet_protocols = ipv4, ipv6 (enable both IPv4 and IPv6)
             inet_protocols = ipv6       (enable IPv6 only)
 
index a76a773accbcc8c605b4e6a6f0f1c2c9e3978275..4cdca8b4b60290c7d139869000dc49bff4d65023 100644 (file)
@@ -86,8 +86,11 @@ Notes:
     Postfix 2.2 and later, it specifies the actual message size when the client
     sends the END-OF-DATA command.
 
-  * The "sasl_*" attributes specify information about how the client was
-    authenticated via SASL.
+  * The "sasl_*" attributes (Postfix 2.2 and later) specify information about
+    how the client was authenticated via SASL.
+
+  * The "ccert_*" attributes (Postfix 2.2 and later) specify information about
+    how the client was authenticated via TLS.
 
 The following is specific to SMTPD delegated policy requests:
 
@@ -97,10 +100,6 @@ The following is specific to SMTPD delegated policy requests:
     VRFY or ETRN; these are the SMTP protocol states where the Postfix SMTP
     server makes an OK/REJECT/HOLD/etc. decision.
 
-  * The "ccert_*" attributes specify information from the client TLS
-    certificate. This information is presented only if the client certificate
-    was successfully verified.
-
 The policy server replies with any action that is allowed in a Postfix SMTPD
 access(5) table. Example:
 
index e8d614a7865c0be0d5e264d3ab195acc498b14f9..3d8516ee1d06f484157d8f395d05e8257c5d642e 100644 (file)
@@ -225,6 +225,8 @@ $readme_directory/ADDRESS_VERIFICATION_README:f:root:-:644
 $readme_directory/BACKSCATTER_README:f:root:-:644
 $readme_directory/BASIC_CONFIGURATION_README:f:root:-:644
 $readme_directory/BUILTIN_FILTER_README:f:root:-:644
+$readme_directory/CDB_README:f:root:-:644
+$readme_directory/CONNECTION_CACHE_README:f:root:-:644
 $readme_directory/CONTENT_INSPECTION_README:f:root:-:644
 $readme_directory/DATABASE_README:f:root:-:644
 $readme_directory/DB_README:f:root:-:644
@@ -270,6 +272,8 @@ $html_directory/ADDRESS_VERIFICATION_README.html:f:root:-:644
 $html_directory/BACKSCATTER_README.html:f:root:-:644
 $html_directory/BASIC_CONFIGURATION_README.html:f:root:-:644
 $html_directory/BUILTIN_FILTER_README.html:f:root:-:644
+$html_directory/CDB_README.html:f:root:-:644
+$html_directory/CONNECTION_CACHE_README.html:f:root:-:644
 $html_directory/CONTENT_INSPECTION_README.html:f:root:-:644
 $html_directory/CYRUS_README.html:f:root:-:644
 $html_directory/DATABASE_README.html:f:root:-:644
index 185fb37b6494a83a48c1765fad0630640c293f46..c27703e51cc37a0fd4d80434beaaa20903a1917a 100644 (file)
@@ -126,7 +126,7 @@ be sure to use an absolute path.  </p>
 </blockquote>
 
 <p> Of particular interest is the <a href="postconf.5.html">postconf(5)</a> manual page that
-lists all the 300+ configuration parameters. The HTML version of
+lists all the 400+ configuration parameters. The HTML version of
 this text makes it easy to navigate around.  </p>
 
 <p> All Postfix source files have their own built-in manual page.
@@ -447,19 +447,6 @@ My password and group file entries look like this: </p>
 
 <p> Note: there should be no whitespace before "postfix:". </p>
 
-<li> <p> Make sure there is a "postfix" alias in /etc/aliases,
-or whatever the pathname of your aliases file is; the
-command "postconf <a href="postconf.5.html#alias_maps">alias_maps</a>" will tell you. </p>
-
-<blockquote>
-<pre>
-/etc/aliases:
-    postfix: root
-</pre>
-</blockquote>
-
-<p> Note: there should be no whitespace before "postfix:". </p>
-
 <li> <p> Create a group "postdrop" with a group id that is not used
 by any other user account. Not even by the postfix user account.
 My group file entry looks like:
@@ -905,9 +892,32 @@ firewalled and/or dial-up networks. </p>
 
 <h3>10.8 - Create the aliases database</h3>
 
-<p> Finally, if you haven't used Sendmail prior to using Postfix, you
-will have to build the alias database with one of the following
-commands: </p>
+<p> Postfix uses a Sendmail-compatible <a href="aliases.5.html">aliases(5)</a> table to redirect
+mail for <a href="local.8.html">local(8)</a> recipients.  Typically, this information is kept
+in two files: in a text file /etc/aliases and in an indexed file
+/etc/aliases.db.  The command "postconf <a href="postconf.5.html#alias_maps">alias_maps</a>" will tell you
+the exact location of the text file.  </p>
+
+<p> First, be sure to update the text file with aliases for root,
+postmaster and "postfix" that forward mail to a real person.  Postfix
+has a sample aliases file /etc/postfix/aliases that you can adapt
+to local conditions.  </p>
+
+<blockquote>
+<pre>
+/etc/aliases:
+    root: you
+    postmaster: root
+    postfix: root
+    bin: root
+    <i>etcetera...</i>
+</pre>
+</blockquote>
+
+<p> Note: there should be no whitespace before the ":". </p>
+
+<p> Finally, build the indexed aliases file with one of the
+following commands: </p>
 
 <blockquote>
 <pre>
@@ -916,10 +926,6 @@ commands: </p>
 </pre>
 </blockquote>
 
-<p> Be sure to set up aliases for root and postmaster that forward
-mail to a real person. Postfix has a sample aliases file
-/etc/postfix/aliases that you can adapt to local conditions. </p>
-
 <h2><a name="hamlet">11 - To chroot or not to chroot</a></h2>
 
 <p> Postfix daemon processes can be configured (via master.cf) to
index e53746e6826bcbb7ea0f83a05737088b7fa9d0ba..fdc41aa5ac3c8b17ea96930118a849e96795b267 100644 (file)
@@ -111,7 +111,7 @@ will use when it makes network connections.  </p>
 /etc/postfix/main.cf:
     # You must stop/start Postfix after changing this parameter.
     <a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv4       (DEFAULT: enable IPv4 only)
-    <a href="postconf.5.html#inet_protocols">inet_protocols</a> = all        (enable both IPv4 and IPv6)
+    <a href="postconf.5.html#inet_protocols">inet_protocols</a> = all        (enable IPv4, and IPv6 if supported)
     <a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv4, ipv6 (enable both IPv4 and IPv6)
     <a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv6       (enable IPv6 only)
 </pre>
index 7279933a2d3acc7cc5f989338d94a81ca8675613..18d5bc225d7cf4c4577c771d4c030821208ec1f3 100644 (file)
@@ -128,9 +128,14 @@ size=12345
     command.
     </p>
 
-    <li> <p> The "sasl_*" attributes specify information about how
-    the client was authenticated via SASL. </p>
+    <li> <p> The "sasl_*" attributes (Postfix 2.2 and later) specify
+    information about how the client was authenticated via SASL.
+    </p>
+
+    <li> <p> The "ccert_*" attributes (Postfix 2.2 and later) specify
+    information about how the client was authenticated via TLS.
+    </p>
+
 </ul>
 
 <p> The following is specific to SMTPD delegated policy requests:
@@ -146,10 +151,6 @@ size=12345
     the Postfix SMTP server makes an OK/REJECT/HOLD/etc. decision.
     </p>
 
-    <li> <p> The "ccert_*" attributes specify information from the
-    client TLS certificate. This information is presented only
-    if the client certificate was successfully verified. </p>
-
 </ul>
 
 <p> The policy server replies with any action that is allowed in a
index fe706d2cf4b221b4c6710cd9e89a31f458a12dc8..62bbc6661bf3328cfd7a2437a8ef469a9d87bb38 100644 (file)
@@ -126,7 +126,7 @@ be sure to use an absolute path.  </p>
 </blockquote>
 
 <p> Of particular interest is the postconf(5) manual page that
-lists all the 300+ configuration parameters. The HTML version of
+lists all the 400+ configuration parameters. The HTML version of
 this text makes it easy to navigate around.  </p>
 
 <p> All Postfix source files have their own built-in manual page.
@@ -447,19 +447,6 @@ My password and group file entries look like this: </p>
 
 <p> Note: there should be no whitespace before "postfix:". </p>
 
-<li> <p> Make sure there is a "postfix" alias in /etc/aliases,
-or whatever the pathname of your aliases file is; the
-command "postconf alias_maps" will tell you. </p>
-
-<blockquote>
-<pre>
-/etc/aliases:
-    postfix: root
-</pre>
-</blockquote>
-
-<p> Note: there should be no whitespace before "postfix:". </p>
-
 <li> <p> Create a group "postdrop" with a group id that is not used
 by any other user account. Not even by the postfix user account.
 My group file entry looks like:
@@ -905,9 +892,32 @@ firewalled and/or dial-up networks. </p>
 
 <h3>10.8 - Create the aliases database</h3>
 
-<p> Finally, if you haven't used Sendmail prior to using Postfix, you
-will have to build the alias database with one of the following
-commands: </p>
+<p> Postfix uses a Sendmail-compatible aliases(5) table to redirect
+mail for local(8) recipients.  Typically, this information is kept
+in two files: in a text file /etc/aliases and in an indexed file
+/etc/aliases.db.  The command "postconf alias_maps" will tell you
+the exact location of the text file.  </p>
+
+<p> First, be sure to update the text file with aliases for root,
+postmaster and "postfix" that forward mail to a real person.  Postfix
+has a sample aliases file /etc/postfix/aliases that you can adapt
+to local conditions.  </p>
+
+<blockquote>
+<pre>
+/etc/aliases:
+    root: you
+    postmaster: root
+    postfix: root
+    bin: root
+    <i>etcetera...</i>
+</pre>
+</blockquote>
+
+<p> Note: there should be no whitespace before the ":". </p>
+
+<p> Finally, build the indexed aliases file with one of the
+following commands: </p>
 
 <blockquote>
 <pre>
@@ -916,10 +926,6 @@ commands: </p>
 </pre>
 </blockquote>
 
-<p> Be sure to set up aliases for root and postmaster that forward
-mail to a real person. Postfix has a sample aliases file
-/etc/postfix/aliases that you can adapt to local conditions. </p>
-
 <h2><a name="hamlet">11 - To chroot or not to chroot</a></h2>
 
 <p> Postfix daemon processes can be configured (via master.cf) to
index 3be396387ddb4af18bfbe81c37d0ffb89b53d98e..7344b4abbbf91a391d0b516d135795eae72cc381 100644 (file)
@@ -111,7 +111,7 @@ will use when it makes network connections.  </p>
 /etc/postfix/main.cf:
     # You must stop/start Postfix after changing this parameter.
     inet_protocols = ipv4       (DEFAULT: enable IPv4 only)
-    inet_protocols = all        (enable both IPv4 and IPv6)
+    inet_protocols = all        (enable IPv4, and IPv6 if supported)
     inet_protocols = ipv4, ipv6 (enable both IPv4 and IPv6)
     inet_protocols = ipv6       (enable IPv6 only)
 </pre>
index 4c7315a3d2c419e98fe8096025f900c5ea9d2771..dade4b8fc29b1beabdc190bbea7e67e7fcfa8359 100644 (file)
@@ -128,9 +128,14 @@ size=12345
     command.
     </p>
 
-    <li> <p> The "sasl_*" attributes specify information about how
-    the client was authenticated via SASL. </p>
+    <li> <p> The "sasl_*" attributes (Postfix 2.2 and later) specify
+    information about how the client was authenticated via SASL.
+    </p>
+
+    <li> <p> The "ccert_*" attributes (Postfix 2.2 and later) specify
+    information about how the client was authenticated via TLS.
+    </p>
+
 </ul>
 
 <p> The following is specific to SMTPD delegated policy requests:
@@ -146,10 +151,6 @@ size=12345
     the Postfix SMTP server makes an OK/REJECT/HOLD/etc. decision.
     </p>
 
-    <li> <p> The "ccert_*" attributes specify information from the
-    client TLS certificate. This information is presented only
-    if the client certificate was successfully verified. </p>
-
 </ul>
 
 <p> The policy server replies with any action that is allowed in a
index 911e49ef319163c982a5a82188e961402b785f39..5e4035fb1bfe790fc4b01e20fbba71dc807dbfa1 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 64c4c4b5cfd8fd7dbfb76da3a73e50307c106006..7c802a6da8015167dca3849f9226ad8ed81ce18e 100644 (file)
@@ -20,7 +20,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index d2d4025bb63c01e1e7ac1ac0732b690f7bf04deb..233baab1677a4d314853a18bfb7f4df0bd1b4d3b 100644 (file)
@@ -24,7 +24,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index d59a3cf51a928c74d2d8c339b53ccdbdc7e00da1..9f87480a1144bfa4e9268fd454985be4635f4a23 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 4ce89ec9481be759384719c2d0c121ba845ae9f5..d18adf4507a140b6d25e6388e5bd39482e8cc651 100644 (file)
@@ -19,7 +19,7 @@ INC_DIR       = ../../include
 all: $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 166f7084d59971ddefe7b148beb7f443de0d0c8f..8bacb92b9d47c51f0ba43e67efa14f20ce45a12d 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 2092d48e5e34123ed11aa998fdc0543df0d6e1eb..21603b9e885e0e1d8f1342d65620b6da19f06395 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index a7f491a62bf3daa798136b65a6a487a71e99f847..a04617a03a98759bc1a00ec288e4948e5233a8ee 100644 (file)
@@ -15,7 +15,7 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 all:   $(PROG)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 fsstone: fsstone.o $(LIBS)
        $(CC) $(CFLAGS) -o $@ fsstone.o $(LIBS) $(SYSLIBS)
index 1ff165321835086fa74a0dfbc350da0b37cb75b5..e15cbca8be3b09d25604676bc0ec0b6aa32e9f1d 100644 (file)
@@ -98,7 +98,7 @@ MAKES =
 all: $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index c694caa1a2d78e9a3267e539a11ab9d06a94432c..1522711d92ffd14a56e23962d1208579d0166842 100644 (file)
@@ -300,8 +300,12 @@ int db_common_expand(void *ctxArg, const char *format, const char *value,
     if (VSTRING_LEN(result) > 0)
        VSTRING_ADDCH(result, ',');
 
-#define QUOTE_VAL(d, q, v, buf) \
-    (q ? q(d, v, buf) : vstring_strcat(buf, v))
+#define QUOTE_VAL(d, q, v, buf) do { \
+       if (q) \
+           q(d, v, buf); \
+       else \
+           vstring_strcat(buf, v); \
+    } while (0)
 
     /*
      * Replace all instances of %s with the address to look up. Replace
index 7f13ed803a4cf3775e2336ab8ab6930f49422b16..8c1a6f86d099baca3fc6f83f9d58da52b40edf6d 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20050309"
-#define MAIL_VERSION_NUMBER    "2.2.0"
+#define MAIL_RELEASE_DATE      "20050315"
+#define MAIL_VERSION_NUMBER    "2.2.1"
 
 #define VAR_MAIL_VERSION       "mail_version"
 #ifdef SNAPSHOT
index 416ce71ed8dc38cb1eef52cd0ac5798cc874d6ca..24aad7250e128f0b1a533f72650a0ff7455ca9a2 100644 (file)
@@ -20,7 +20,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 36feee0d1a5d988c2b779a6a85c4a99dc15ae427..fb439cde6a6720fbdd4fd9893e662b3fd19e48d3 100644 (file)
@@ -22,7 +22,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 1b4ba914543f09b6e80927b99031f1e59d0304c0..d21f674c8a034d93c921ea79f91137914e1d079f 100644 (file)
@@ -25,7 +25,7 @@ BIN_DIR       = ../../libexec
 all:   $(PROG) $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
index 2a78eba16add858cfb374c85792f3795ed6a535b..509875b755b3974bbb38e37dc6f909eeaf57e372 100644 (file)
@@ -20,7 +20,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 57282f9acf6dfc57d143d805305c4e4d111e0fb2..5e74360295e77c4aec44cf9e651c7ea22e971745 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index affdcd9e5991bcb2cb8a3cc9601dd9894248dab4..6a676ed8f4fb98f2f672c91fb9ba7079d5c1c34a 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 217e98e4734d31824d036e0b989de37d13d4845a..2e414ad780eed6ff1e35e875c4b57a74c26c3c3f 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 update: ../../bin/$(PROG)
 
index a29b4e75fecfffc8270e889be2c0f29a3da3ad0d..2fa055b111330a6c05882bd437b3172ffdfb2df6 100644 (file)
@@ -582,7 +582,7 @@ static void postalias_seq(const char *map_type, const char *map_name)
 
 static NORETURN usage(char *myname)
 {
-    msg_fatal("usage: %s [-Nfinorvw] [-c config_dir] [-d key] [-q key] [map_type:]file...",
+    msg_fatal("usage: %s [-Nfinoprsvw] [-c config_dir] [-d key] [-q key] [map_type:]file...",
              myname);
 }
 
index 2d9fd3464aefa44300609fa2e99e0dd012c4c6bd..4cce48332d868ba5cfdef7439e30ee276fc73730 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index b7f93e86ec35cfec5cff825370aeee660f3a1abb..069f951b088e2ef58f808813a173544927b77114 100644 (file)
@@ -26,7 +26,7 @@ $(PROG): $(OBJS) $(LIBS)
         ./$(PROG) -d) |egrep -v '^(myhostname|mydomain|mynetworks) ' >$@
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 06f79c548a6299f567f79c5e67b172a33219b310..6ddcf835edbb6e24272e9b3e6546ee16371e2c94 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 31615b51bb0e7e0e7bf62954045d66af00e6d220..dad1be2c3059eac8dc3b154b66e424ecf08d2800 100644 (file)
@@ -17,7 +17,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index a5cc48b047fe17a1afb244847cc4cd403a04f228..568edf654eee159b1a00f05638e7e19c29595a28 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 071fe26aa8a09bc970b7077f3326775e4c9f867e..48853df79196876144f92e8ea5728a760c7f54ef 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 586aa61097adb434882a1ceaaaa68716b8d0c903..64f32b5d4ad9334eb01db96586d07efcd5c0914f 100644 (file)
@@ -17,7 +17,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 3f0798af68d1ea9e3c998743810cdba7c9971813..7761292e48aed532a55bfaa22abb21051457647a 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 update: ../../bin/$(PROG)
 
index a033a02f5bafd7d863b36461c5e47d059830e42d..ef6ebcda65470687aa2bcbf691d375145cc8bef2 100644 (file)
@@ -529,7 +529,7 @@ static void postmap_seq(const char *map_type, const char *map_name)
 
 static NORETURN usage(char *myname)
 {
-    msg_fatal("usage: %s [-Nfinorvw] [-c config_dir] [-d key] [-q key] [map_type:]file...",
+    msg_fatal("usage: %s [-Nfinoprsvw] [-c config_dir] [-d key] [-q key] [map_type:]file...",
              myname);
 }
 
index 98ba568f74bfec485c16855aebcd9a62efb30439..f3a523b5e62367bc5f68b3479a88df23033423bb 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 1930af83d0f614ccae34b4dc2274bdafdf7aa231..df0dfa08ab0013dd218adfa298f7e9142b6abf04 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 96c3b65b03c54cd8ca425ae618e2a9a493c71403..deb28075c4c7aeaf0cfab5b68e66652f845ca57b 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 0a7e2caadcedeb1da41b3811021d713a453c1c4c..91f19f17690a8b6c34ac6273ab5d96445af681ba 100644 (file)
@@ -22,7 +22,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index e1b3250a2ed593b2414743a41ad2907805642c88..b610438404ce76787ed7df12e3857a5f79057b00 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 4d54015b43f0b690a834cbd9d1d3d8403f409d41..9ce8504943dbc88181fa833574844b13ab5b8f3b 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 751db318a679d9d42ae961edeb74bc7716b5233d..364e6a15aedfa1afd897127ce027329e4475e197 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 66ed58fdc9fb762d418816b5c12d146e50946789..285d77adc0e953a6b9557639d3bc174349fddda9 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 79b8aeead41e12e492fdd77cc9fc87bbe8e809c8..16cae7bd2d9c38df638aae7a39d70d0272e02b02 100644 (file)
@@ -21,7 +21,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index ea4aba91307afc25d105491785978e9d489cb350..88a8dbe9b06a759d1f19b409010506ab8b520b00 100644 (file)
@@ -22,7 +22,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 7091a797a48aea310314786ff53effd60a05c55c..e05b1bc02971fd4a175058830d925d6201b710ac 100644 (file)
@@ -15,7 +15,7 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 all:   $(PROG)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 smtp-sink: smtp-sink.o $(LIBS)
        $(CC) $(CFLAGS) -o $@ smtp-sink.o $(LIBS) $(SYSLIBS)
index c7336c9a7abc7c22c2b1c2da8a951d0d736ea74a..090a66ff75c711bd7ace15b1a068be575096857c 100644 (file)
@@ -132,7 +132,7 @@ typedef struct SINK_STATE {
     VSTREAM *stream;
     VSTRING *buffer;
     int     data_state;
-    int     (*read) (struct SINK_STATE *);
+    int     (*read_fn) (struct SINK_STATE *);
     int     rcpts;
 } SINK_STATE;
 
@@ -220,7 +220,7 @@ static void data_response(SINK_STATE *state)
     state->data_state = ST_CR_LF;
     smtp_printf(state->stream, "354 End data with <CR><LF>.<CR><LF>");
     smtp_flush(state->stream);
-    state->read = data_read;
+    state->read_fn = data_read;
 }
 
 /* data_event - delayed response to DATA command */
@@ -302,7 +302,7 @@ static int data_read(SINK_STATE *state)
            if (msg_verbose)
                msg_info(".");
            dot_response(state);
-           state->read = command_read;
+           state->read_fn = command_read;
            state->data_state = ST_ANY;
            break;
        }
@@ -535,7 +535,7 @@ static void read_event(int unused_event, char *context)
            return;
 
        case 0:
-           if (state->read(state) < 0) {
+           if (state->read_fn(state) < 0) {
                if (msg_verbose)
                    msg_info("disconnect");
                disconnect(state);
@@ -584,7 +584,7 @@ static void connect_event(int unused_event, char *context)
        state = (SINK_STATE *) mymalloc(sizeof(*state));
        state->stream = vstream_fdopen(fd, O_RDWR);
        state->buffer = vstring_alloc(1024);
-       state->read = command_read;
+       state->read_fn = command_read;
        state->data_state = ST_ANY;
        smtp_timeout_setup(state->stream, var_tmout);
        if (pretend_pix)
index 06b0d8234e596e40458f018570194f7cfbc3763e..a755e3610b233cd2e8047648e91f7640e8ae6642 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 0ef0419d42ed9a59fb9ff20c91cd0531e99bd6cf..d524015fa42dc3d6570f96fef155ce576abcb7d5 100644 (file)
@@ -25,7 +25,7 @@ MAKES =
 all: $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index e3144e865459dc616de27d9517f40c092b8bf66c..c00789cc37641f2e900790baaf442a4c970a0ac9 100644 (file)
 /*     tls_scache_update() updates the specified TLS session cache
 /*     with the specified session information.
 /*
-/*     tls_scache_sequence() iterates over the specified TLS
-/*     session cache and either returns the first or next entry
-/*     that matches the session timeout, OpenSSL version and flags
-/*     restrictions, or returns no data.  Entries that don't
-/*     satisfy the requirements
-/*     are silently deleted.  Specify TLS_SCACHE_SEQUENCE_NOTHING
+/*     tls_scache_sequence() iterates over the specified TLS session
+/*     cache and looks up the first or next entry. If that entry
+/*     matches the session timeout, OpenSSL version and flags
+/*     restrictions, tls_scache_sequence() saves the entry by
+/*     updating the result parameters; otherwise it deletes the
+/*     entry and does not update the result parameters.  Specify
+/*     TLS_SCACHE_SEQUENCE_NOTHING
 /*     as the third and last argument to disable OpenSSL version
 /*     and flags restrictions, and to disable saving of cache
 /*     entry content or cache entry ID information.  This is useful
@@ -450,7 +451,9 @@ int     tls_scache_sequence(TLS_SCACHE *cp, int first_next,
     const char *member;
     const char *value;
     char   *saved_cursor;
-    int     seq_status;
+    int     found_entry;
+    int     keep_entry;
+    char   *saved_member;
 
     /*
      * XXX Deleting entries while enumerating a map can he tricky. Some map
@@ -464,52 +467,63 @@ int     tls_scache_sequence(TLS_SCACHE *cp, int first_next,
      */
 
     /*
-     * Find the first or next database entry.
-     */
-    seq_status = dict_seq(cp->db, first_next, &member, &value);
+     * Find the first or next database entry. Activate the passivated entry
+     * and check the version, time stamp and flags information. Schedule the
+     * entry for deletion if it is bad or too old.
+     * 
+     * Save the member (cache id) so that it will not be clobbered by the
+     * tls_scache_lookup() call below.
+     */
+    found_entry = (dict_seq(cp->db, first_next, &member, &value) == 0);
+    if (found_entry) {
+       keep_entry = tls_scache_decode(cp, member, value, strlen(value),
+                                      openssl_version, flags,
+                                      out_openssl_version,
+                                      out_flags, out_session);
+       if (keep_entry && out_cache_id)
+           *out_cache_id = mystrdup(member);
+       saved_member = mystrdup(member);
+    }
 
     /*
      * Delete behind. This is a no-op if an expired cache entry was updated
-     * in the mean time.
+     * in the mean time. Use the saved lookup criteria so that the "delete
+     * behind" operation works as promised.
      */
-    if (cp->flags & TLS_SCACHE_FLAG_DEL_CURSOR) {
-       cp->flags &= ~TLS_SCACHE_FLAG_DEL_CURSOR;
+    if (cp->flags & TLS_SCACHE_FLAG_DEL_SAVED_CURSOR) {
+       cp->flags &= ~TLS_SCACHE_FLAG_DEL_SAVED_CURSOR;
        saved_cursor = cp->saved_cursor;
        cp->saved_cursor = 0;
-       tls_scache_lookup(cp, saved_cursor, TLS_SCACHE_ANY_OPENSSL_VSN,
-                         TLS_SCACHE_ANY_FLAGS, (long *) 0, (int *) 0,
+       tls_scache_lookup(cp, saved_cursor, cp->saved_openssl_version,
+                         cp->saved_flags, (long *) 0, (int *) 0,
                          (VSTRING *) 0);
        myfree(saved_cursor);
-    } else {
-       if (cp->saved_cursor)
-           myfree(cp->saved_cursor);
-       cp->saved_cursor = 0;
     }
 
     /*
-     * Did we find a first or next database entry?
-     */
-    if (seq_status != 0)
-       return (0);                             /* End of list reached */
-
-    /*
-     * Safety against client requests to delete the current first/next entry.
+     * Otherwise, clean up if this is not the first iteration.
      */
-    cp->saved_cursor = mystrdup(member);
+    else {
+       if (cp->saved_cursor)
+           myfree(cp->saved_cursor);
+       cp->saved_cursor = 0;
+    }
 
     /*
-     * Activate the passivated cache entry and check the version and time
-     * stamp information. Schedule it for deletion if it is bad or too old.
+     * Protect the current first/next entry against explicit or implied
+     * client delete requests, and schedule a bad or expired entry for
+     * deletion. Save the lookup criteria so that the "delete behind"
+     * operation will work as promised.
      */
-    if (tls_scache_decode(cp, member, value, strlen(value), openssl_version,
-                         flags, out_openssl_version, out_flags,
-                         out_session) == 0) {
-       cp->flags |= TLS_SCACHE_FLAG_DEL_CURSOR;
-    } else {
-       if (out_cache_id)
-           *out_cache_id = mystrdup(member);
+    if (found_entry) {
+       cp->saved_cursor = saved_member;
+       if (keep_entry == 0) {
+           cp->flags |= TLS_SCACHE_FLAG_DEL_SAVED_CURSOR;
+           cp->saved_openssl_version = openssl_version;
+           cp->saved_flags = flags;
+       }
     }
-    return (1);
+    return (found_entry);
 }
 
 /* tls_scache_delete - delete session from cache */
index 2c828e9cc35223f279357243705c067193d8233f..2e51d2803bc1c7db700830017604c245fc5fe72a 100644 (file)
@@ -27,9 +27,11 @@ typedef struct {
     int     log_level;                 /* smtp(d)_tls_log_level */
     int     timeout;                   /* smtp(d)_tls_session_cache_timeout */
     char   *saved_cursor;              /* cursor cache ID */
+    long    saved_openssl_version;     /* cursor OpenSSL version */
+    int     saved_flags;               /* cursor lookup flags */
 } TLS_SCACHE;
 
-#define TLS_SCACHE_FLAG_DEL_CURSOR     (1<<0)
+#define TLS_SCACHE_FLAG_DEL_SAVED_CURSOR       (1<<0)
 
 extern TLS_SCACHE *tls_scache_open(const char *, const char *, int, int);
 extern void tls_scache_close(TLS_SCACHE *);
index b2dc22a75f01edd8d361881903a2d63d8346f538..dfe21f6e2e7e39e351a326443f9c7d6ed13ff8b4 100644 (file)
@@ -21,7 +21,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index f27c6d2f8c4c281d251160040b1190b114e74ccb..ea4c68980491e9f261a1d14de4345674580b6b69 100644 (file)
@@ -110,7 +110,7 @@ INC_DIR     = ../../include
 all: $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index cf0bbefb37126307d92c56784f74a3ac83ebfd8e..1a0f3165c4a3d1606a7e5c7b5f80ee602071c35c 100644 (file)
 #define DONT_CLOBBER                   DB_NOOVERWRITE
 #endif
 
+#if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR < 6)
+#define DICT_DB_CURSOR(db, curs)       (db)->cursor((db), NULL, (curs))
+#else
+#define DICT_DB_CURSOR(db, curs)       (db)->cursor((db), NULL, (curs), 0)
+#endif
+
 #ifndef DB_FCNTL_LOCKING
 #define DB_FCNTL_LOCKING               0
 #endif
@@ -400,7 +406,7 @@ static int dict_db_sequence(DICT *dict, int function,
     switch (function) {
     case DICT_SEQ_FUN_FIRST:
        if (dict_db->cursor == 0)
-           db->cursor(db, NULL, &(dict_db->cursor), 0);
+           DICT_DB_CURSOR(db, &(dict_db->cursor));
        db_function = DB_FIRST;
        break;
     case DICT_SEQ_FUN_NEXT:
index 25e8859ab1525f190470318c1d09ba5ed48c34ad..39215f5435e29857ebccbd83496ee4f78c89185a 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 60c562e72c5d0f89c2fba55ac7bf88be267974b1..d0e7bca7d879a381c3409a2e803397a855cd8bf3 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)