Postfix 2.0.5 fixes minor problems.
- The SMTP server's hard and soft error limits were off by one.
With "smtpd_hard_error_limit = 1", Postfix will now disconnect
after the first error, instead of the second one.
- The proxymap server could deadlock when the mydestination parameter
setting included a proxymapped lookup table.
- Some little fixes to documentation.
Prereq: "2.0.4"
diff -cr /tmp/postfix-2.0.4/src/global/mail_version.h ./src/global/mail_version.h
*** /tmp/postfix-2.0.4/src/global/mail_version.h Wed Feb 19 15:59:53 2003
--- ./src/global/mail_version.h Sat Mar 1 14:20:20 2003
***************
*** 20,29 ****
* Patches change the patchlevel and the release date. Snapshots change the
* release date only, unless they include the same bugfix as a patch release.
*/
! #define MAIL_RELEASE_DATE "20030219"
#define VAR_MAIL_VERSION "mail_version"
! #define DEF_MAIL_VERSION "2.0.4"
extern char *var_mail_version;
/*
--- 20,29 ----
* Patches change the patchlevel and the release date. Snapshots change the
* release date only, unless they include the same bugfix as a patch release.
*/
! #define MAIL_RELEASE_DATE "20030301"
#define VAR_MAIL_VERSION "mail_version"
! #define DEF_MAIL_VERSION "2.0.5"
extern char *var_mail_version;
/*
diff -cr /tmp/postfix-2.0.4/HISTORY ./HISTORY
*** /tmp/postfix-2.0.4/HISTORY Thu Feb 20 10:26:34 2003
--- ./HISTORY Thu Feb 27 20:05:02 2003
***************
*** 7656,7661 ****
--- 7656,7680 ----
did not eliminate virtual expansion duplicates with the
same original recipient. File: cleanup/cleanup_out_recipient.c.
+ 20030223
+
+ Bugfix: smtpd_hard/soft_error_limit off-by-one error, so
+ that the real limit was one larger than the specified value.
+ File: smtpd/smtpd.c, smtpd/smtpd_chat.c.
+
+ 20030226
+
+ Safety: proxymap server defense against potential deadlock
+ when some library routine wants to open a proxied table.
+ Instead, proxymap opens the requested table directly. File:
+ proxymap/proxymap.c.
+
+ 20030227
+
+ Bugfix: added mynetworks to the list of proxy_read_maps
+ parameter settings that are pre-authorized to use proxied
+ table lookups. File: global/mail_params.h.
+
Open problems:
Low: after successful delivery, per-queue window += 1/window,
diff -cr /tmp/postfix-2.0.4/README_FILES/FILTER_README ./README_FILES/FILTER_README
*** /tmp/postfix-2.0.4/README_FILES/FILTER_README Thu Jan 23 14:07:51 2003
--- ./README_FILES/FILTER_README Wed Feb 26 11:01:53 2003
***************
*** 343,351 ****
# cleanup service (defined further below).
#
smtp inet n - n - - smtpd
! -o cleanup_service=pre-cleanup
pickup fifo n - n 60 1 pickup
! -o cleanup_service=pre-cleanup
#
# ------------------------------------------------------------------
#
--- 343,351 ----
# cleanup service (defined further below).
#
smtp inet n - n - - smtpd
! -o cleanup_service_name=pre-cleanup
pickup fifo n - n 60 1 pickup
! -o cleanup_service_name=pre-cleanup
#
# ------------------------------------------------------------------
#
diff -cr /tmp/postfix-2.0.4/RELEASE_NOTES ./RELEASE_NOTES
*** /tmp/postfix-2.0.4/RELEASE_NOTES Wed Feb 19 16:29:50 2003
--- ./RELEASE_NOTES Sat Mar 1 14:20:07 2003
***************
*** 24,29 ****
--- 24,38 ----
date. Snapshots change only the release date, unless they include
the same bugfixes as a patch release.
+ Incompatible changes with Postfix version 2.0.5 (released 20030301)
+ ===================================================================
+
+ The smtpd_hard_error_limit and smtpd_soft_error_limit values now
+ behave as documented, that is, smtpd_hard_error_limit=1 causes
+ Postfix to disconnect upon the first client error. Previously,
+ there was an off-by-one error causing Postfix to change behavior
+ after smtpd_hard/soft_error_limit+1 errors.
+
Incompatible changes with Postfix version 2.0.4 (released 20030219)
===================================================================
diff -cr /tmp/postfix-2.0.4/conf/transport ./conf/transport
*** /tmp/postfix-2.0.4/conf/transport Thu Dec 19 20:35:07 2002
--- ./conf/transport Fri Feb 28 13:28:36 2003
***************
*** 101,108 ****
# dependent. In the case of SMTP, specify host:service for a
# non-default server port, and use [host] or [host]:port in
# order to disable MX (mail exchanger) DNS lookups. The []
! # form can also be used with IP addresses instead of host-
! # names.
#
# A null transport and null nexthop result means "do not
# change": use the delivery transport and nexthop informa-
--- 101,108 ----
# dependent. In the case of SMTP, specify host:service for a
# non-default server port, and use [host] or [host]:port in
# order to disable MX (mail exchanger) DNS lookups. The []
! # form is required when you specify an IP address instead of
! # a hostname.
#
# A null transport and null nexthop result means "do not
# change": use the delivery transport and nexthop informa-
diff -cr /tmp/postfix-2.0.4/html/proxymap.8.html ./html/proxymap.8.html
*** /tmp/postfix-2.0.4/html/proxymap.8.html Sat Jan 25 17:48:24 2003
--- ./html/proxymap.8.html Thu Feb 27 20:20:29 2003
***************
*** 29,38 ****
tions" errors. The solution:
virtual_alias_maps =
! proxy:mysql:/etc/postfix/virtual.cf
The total number of connections is limited by the
! number of proxymap server server processes.
The proxymap server implements the following requests:
--- 29,38 ----
tions" errors. The solution:
virtual_alias_maps =
! proxy:mysql:/etc/postfix/virtual_alias.cf
The total number of connections is limited by the
! number of proxymap server processes.
The proxymap server implements the following requests:
diff -cr /tmp/postfix-2.0.4/html/transport.5.html ./html/transport.5.html
*** /tmp/postfix-2.0.4/html/transport.5.html Thu Dec 19 20:33:40 2002
--- ./html/transport.5.html Fri Feb 28 13:28:36 2003
***************
*** 102,109 ****
dependent. In the case of SMTP, specify host:service for a
non-default server port, and use [host] or [host]:port in
order to disable MX (mail exchanger) DNS lookups. The []
! form can also be used with IP addresses instead of host-
! names.
A null transport and null nexthop result means "do not
change": use the delivery transport and nexthop informa-
--- 102,109 ----
dependent. In the case of SMTP, specify host:service for a
non-default server port, and use [host] or [host]:port in
order to disable MX (mail exchanger) DNS lookups. The []
! form is required when you specify an IP address instead of
! a hostname.
A null transport and null nexthop result means "do not
change": use the delivery transport and nexthop informa-
diff -cr /tmp/postfix-2.0.4/html/virtual.8.html ./html/virtual.8.html
*** /tmp/postfix-2.0.4/html/virtual.8.html Tue Jan 7 14:48:13 2003
--- ./html/virtual.8.html Sun Mar 2 20:17:22 2003
***************
*** 17,24 ****
This delivery agent only delivers mail. Other features
such as mail forwarding, out-of-office notifications,
! etc., must be configured via virtual maps or via similar
! lookup mechanisms.
MAILBOX LOCATION
The mailbox location is controlled by the virtual_mail-
--- 17,24 ----
This delivery agent only delivers mail. Other features
such as mail forwarding, out-of-office notifications,
! etc., must be configured via virtual_alias maps or via
! similar lookup mechanisms.
MAILBOX LOCATION
The mailbox location is controlled by the virtual_mail-
diff -cr /tmp/postfix-2.0.4/man/man5/transport.5 ./man/man5/transport.5
*** /tmp/postfix-2.0.4/man/man5/transport.5 Thu Dec 19 20:35:08 2002
--- ./man/man5/transport.5 Fri Feb 28 13:28:36 2003
***************
*** 102,108 ****
dependent. In the case of SMTP, specify \fIhost\fR:\fIservice\fR for a
non-default server port, and use [\fIhost\fR] or [\fIhost\fR]:\fIport\fR
in order to disable MX (mail exchanger) DNS lookups. The [] form
! can also be used with IP addresses instead of hostnames.
A null \fItransport\fR and null \fInexthop\fR result means "do
not change": use the delivery transport and nexthop information
--- 102,108 ----
dependent. In the case of SMTP, specify \fIhost\fR:\fIservice\fR for a
non-default server port, and use [\fIhost\fR] or [\fIhost\fR]:\fIport\fR
in order to disable MX (mail exchanger) DNS lookups. The [] form
! is required when you specify an IP address instead of a hostname.
A null \fItransport\fR and null \fInexthop\fR result means "do
not change": use the delivery transport and nexthop information
diff -cr /tmp/postfix-2.0.4/man/man8/proxymap.8 ./man/man8/proxymap.8
*** /tmp/postfix-2.0.4/man/man8/proxymap.8 Sat Jan 25 17:48:23 2003
--- ./man/man8/proxymap.8 Thu Feb 27 20:20:28 2003
***************
*** 33,42 ****
.sp
virtual_alias_maps =
.ti +4
! proxy:mysql:/etc/postfix/virtual.cf
.sp
The total number of connections is limited by the number of
! proxymap server server processes.
.PP
The proxymap server implements the following requests:
.IP "\fBPROXY_REQ_OPEN\fI maptype:mapname flags\fR"
--- 33,42 ----
.sp
virtual_alias_maps =
.ti +4
! proxy:mysql:/etc/postfix/virtual_alias.cf
.sp
The total number of connections is limited by the number of
! proxymap server processes.
.PP
The proxymap server implements the following requests:
.IP "\fBPROXY_REQ_OPEN\fI maptype:mapname flags\fR"
diff -cr /tmp/postfix-2.0.4/man/man8/virtual.8 ./man/man8/virtual.8
*** /tmp/postfix-2.0.4/man/man8/virtual.8 Tue Jan 7 14:48:12 2003
--- ./man/man8/virtual.8 Sun Mar 2 20:17:21 2003
***************
*** 20,26 ****
This delivery agent only delivers mail. Other features such as
mail forwarding, out-of-office notifications, etc., must be
! configured via virtual maps or via similar lookup mechanisms.
.SH MAILBOX LOCATION
.na
.nf
--- 20,26 ----
This delivery agent only delivers mail. Other features such as
mail forwarding, out-of-office notifications, etc., must be
! configured via virtual_alias maps or via similar lookup mechanisms.
.SH MAILBOX LOCATION
.na
.nf
diff -cr /tmp/postfix-2.0.4/proto/transport ./proto/transport
*** /tmp/postfix-2.0.4/proto/transport Thu Dec 19 20:33:40 2002
--- ./proto/transport Fri Feb 28 13:28:22 2003
***************
*** 90,96 ****
# dependent. In the case of SMTP, specify \fIhost\fR:\fIservice\fR for a
# non-default server port, and use [\fIhost\fR] or [\fIhost\fR]:\fIport\fR
# in order to disable MX (mail exchanger) DNS lookups. The [] form
! # can also be used with IP addresses instead of hostnames.
#
# A null \fItransport\fR and null \fInexthop\fR result means "do
# not change": use the delivery transport and nexthop information
--- 90,96 ----
# dependent. In the case of SMTP, specify \fIhost\fR:\fIservice\fR for a
# non-default server port, and use [\fIhost\fR] or [\fIhost\fR]:\fIport\fR
# in order to disable MX (mail exchanger) DNS lookups. The [] form
! # is required when you specify an IP address instead of a hostname.
#
# A null \fItransport\fR and null \fInexthop\fR result means "do
# not change": use the delivery transport and nexthop information
diff -cr /tmp/postfix-2.0.4/src/global/mail_params.h ./src/global/mail_params.h
*** /tmp/postfix-2.0.4/src/global/mail_params.h Sun Jan 12 11:41:21 2003
--- ./src/global/mail_params.h Mon Mar 3 17:07:03 2003
***************
*** 1317,1323 ****
" $" VAR_SEND_CANON_MAPS \
" $" VAR_RCPT_CANON_MAPS \
" $" VAR_RELOCATED_MAPS \
! " $" VAR_TRANSPORT_MAPS
extern char *var_proxy_read_maps;
/*
--- 1317,1324 ----
" $" VAR_SEND_CANON_MAPS \
" $" VAR_RCPT_CANON_MAPS \
" $" VAR_RELOCATED_MAPS \
! " $" VAR_TRANSPORT_MAPS \
! " $" VAR_MYNETWORKS
extern char *var_proxy_read_maps;
/*
diff -cr /tmp/postfix-2.0.4/src/proxymap/proxymap.c ./src/proxymap/proxymap.c
*** /tmp/postfix-2.0.4/src/proxymap/proxymap.c Sat Jan 25 16:04:42 2003
--- ./src/proxymap/proxymap.c Thu Feb 27 20:06:01 2003
***************
*** 27,36 ****
/* .sp
/* virtual_alias_maps =
/* .ti +4
! /* proxy:mysql:/etc/postfix/virtual.cf
/* .sp
/* The total number of connections is limited by the number of
! /* proxymap server server processes.
/* .PP
/* The proxymap server implements the following requests:
/* .IP "\fBPROXY_REQ_OPEN\fI maptype:mapname flags\fR"
--- 27,36 ----
/* .sp
/* virtual_alias_maps =
/* .ti +4
! /* proxy:mysql:/etc/postfix/virtual_alias.cf
/* .sp
/* The total number of connections is limited by the number of
! /* proxymap server processes.
/* .PP
/* The proxymap server implements the following requests:
/* .IP "\fBPROXY_REQ_OPEN\fI maptype:mapname flags\fR"
***************
*** 330,335 ****
--- 330,347 ----
}
}
vstream_fflush(client_stream);
+ }
+
+ /* dict_proxy_open - intercept remote map request from inside library */
+
+ DICT *dict_proxy_open(const char *map, int open_flags, int dict_flags)
+ {
+ if (msg_verbose)
+ msg_info("dict_proxy_open(%s, 0%o, 0%o) called from internal routine",
+ map, open_flags, dict_flags);
+ while (strncmp(map, PROXY_COLON, PROXY_COLON_LEN) == 0)
+ map += PROXY_COLON_LEN;
+ return (dict_open(map, open_flags, dict_flags));
}
/* post_jail_init - initialization after privilege drop */
diff -cr /tmp/postfix-2.0.4/src/smtpd/smtpd.c ./src/smtpd/smtpd.c
*** /tmp/postfix-2.0.4/src/smtpd/smtpd.c Wed Jan 15 08:28:54 2003
--- ./src/smtpd/smtpd.c Sat Mar 1 19:32:12 2003
***************
*** 990,995 ****
--- 990,996 ----
int prev_rec_type;
int first = 1;
VSTRING *why = 0;
+ int saved_err;
/*
* Sanity checks. With ESMTP command pipelining the client can send DATA
***************
*** 1150,1161 ****
/*
* Cleanup. The client may send another MAIL command.
*/
chat_reset(state, var_smtpd_hist_thrsh);
mail_reset(state);
rcpt_reset(state);
if (why)
vstring_free(why);
! return (state->err);
}
/* rset_cmd - process RSET */
--- 1151,1163 ----
/*
* Cleanup. The client may send another MAIL command.
*/
+ saved_err = state->err;
chat_reset(state, var_smtpd_hist_thrsh);
mail_reset(state);
rcpt_reset(state);
if (why)
vstring_free(why);
! return (saved_err);
}
/* rset_cmd - process RSET */
***************
*** 1469,1475 ****
}
for (;;) {
! if (state->error_count > var_smtpd_hard_erlim) {
state->reason = "too many errors";
state->error_mask |= MAIL_ERROR_PROTOCOL;
smtpd_chat_reply(state, "421 Error: too many errors");
--- 1471,1477 ----
}
for (;;) {
! if (state->error_count >= var_smtpd_hard_erlim) {
state->reason = "too many errors";
state->error_mask |= MAIL_ERROR_PROTOCOL;
smtpd_chat_reply(state, "421 Error: too many errors");
***************
*** 1529,1535 ****
* things went wrong. Don't complain about clients that go away without
* sending QUIT.
*/
! if (state->reason && state->where && strcmp(state->where, SMTPD_AFTER_DOT))
msg_info("%s after %s from %s[%s]",
state->reason, state->where, state->name, state->addr);
--- 1531,1539 ----
* things went wrong. Don't complain about clients that go away without
* sending QUIT.
*/
! if (state->reason && state->where
! && (strcmp(state->where, SMTPD_AFTER_DOT)
! || strcmp(state->reason, "lost connection")))
msg_info("%s after %s from %s[%s]",
state->reason, state->where, state->name, state->addr);
diff -cr /tmp/postfix-2.0.4/src/smtpd/smtpd_chat.c ./src/smtpd/smtpd_chat.c
*** /tmp/postfix-2.0.4/src/smtpd/smtpd_chat.c Thu Nov 14 08:30:19 2002
--- ./src/smtpd/smtpd_chat.c Sun Feb 23 17:59:12 2003
***************
*** 157,163 ****
* sleep-on-anything slows down clients that make an excessive number of
* errors within a session.
*/
! if (state->error_count > var_smtpd_soft_erlim)
sleep(delay = (state->error_count > var_smtpd_err_sleep ?
state->error_count : var_smtpd_err_sleep));
else if (STR(state->buffer)[0] == '4' || STR(state->buffer)[0] == '5')
--- 157,163 ----
* sleep-on-anything slows down clients that make an excessive number of
* errors within a session.
*/
! if (state->error_count >= var_smtpd_soft_erlim)
sleep(delay = (state->error_count > var_smtpd_err_sleep ?
state->error_count : var_smtpd_err_sleep));
else if (STR(state->buffer)[0] == '4' || STR(state->buffer)[0] == '5')
diff -cr /tmp/postfix-2.0.4/src/virtual/virtual.c ./src/virtual/virtual.c
*** /tmp/postfix-2.0.4/src/virtual/virtual.c Sat Jan 4 20:04:24 2003
--- ./src/virtual/virtual.c Sun Mar 2 20:15:46 2003
***************
*** 14,20 ****
/*
/* This delivery agent only delivers mail. Other features such as
/* mail forwarding, out-of-office notifications, etc., must be
! /* configured via virtual maps or via similar lookup mechanisms.
/* MAILBOX LOCATION
/* .ad
/* .fi
--- 14,20 ----
/*
/* This delivery agent only delivers mail. Other features such as
/* mail forwarding, out-of-office notifications, etc., must be
! /* configured via virtual_alias maps or via similar lookup mechanisms.
/* MAILBOX LOCATION
/* .ad
/* .fi