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.
+
(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 \
% 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.
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:
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
/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)
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:
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:
$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
$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
</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.
<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:
<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>
</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
/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>
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:
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
</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.
<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:
<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>
</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
/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>
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:
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
$(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)
$(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)
$(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)
$(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)
all: $(LIB)
Makefile: Makefile.in
- (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+ (cat ../../conf/makedefs.out $?) >$@
test: $(TESTPROG)
$(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)
$(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)
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)
all: $(LIB)
Makefile: Makefile.in
- (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+ (cat ../../conf/makedefs.out $?) >$@
test: $(TESTPROG)
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
* 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
$(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)
$(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)
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)
$(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)
$(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)
$(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)
$(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)
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);
}
$(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)
./$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
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);
}
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
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)
VSTREAM *stream;
VSTRING *buffer;
int data_state;
- int (*read) (struct SINK_STATE *);
+ int (*read_fn) (struct SINK_STATE *);
int rcpts;
} SINK_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 */
if (msg_verbose)
msg_info(".");
dot_response(state);
- state->read = command_read;
+ state->read_fn = command_read;
state->data_state = ST_ANY;
break;
}
return;
case 0:
- if (state->read(state) < 0) {
+ if (state->read_fn(state) < 0) {
if (msg_verbose)
msg_info("disconnect");
disconnect(state);
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)
$(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)
all: $(LIB)
Makefile: Makefile.in
- (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+ (cat ../../conf/makedefs.out $?) >$@
test: $(TESTPROG)
/* 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
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
*/
/*
- * 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 */
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 *);
$(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)
all: $(LIB)
Makefile: Makefile.in
- (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+ (cat ../../conf/makedefs.out $?) >$@
test: $(TESTPROG)
#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
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:
$(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)
$(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)