diff --git a/postfix/HISTORY b/postfix/HISTORY
index d413a089b..6515148ae 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -10881,7 +10881,19 @@ Apologies for any names omitted.
handling, is too much change for a stable release. File:
sendmail/sendmail.c.
+20060315
+
Workaround: the PCRE library reports an inappropriate error
code (invalid substring) when $number refers to a valid ()
expression that matches the null string. This caused fatal
run-time errors. File: dict_pcre.c.
+
+20060324
+
+ Bugfix: mis-placed parenthesis in SMTP before-filter error
+ test. A filter timeout was mis-reported as lost connection.
+ Found in code review. File: smtpd/smtpd_proxy.c.
+
+20060403
+ Bugfix: the pipe-to-command error message was lost when the
+ command could not be executed. File: global/pipe_command.c.
diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html
index 208c1f710..281407a87 100644
--- a/postfix/html/postconf.5.html
+++ b/postfix/html/postconf.5.html
@@ -8226,17 +8226,17 @@ of forged mail from worms or viruses.
- The sender domain matches $mydestination, $inet_interfaces or
-$proxy_interfaces, but the recipient is not listed in
+$proxy_interfaces, but the sender is not listed in
$local_recipient_maps, and $local_recipient_maps is not null.
-
- The sender domain matches $virtual_alias_domains but the recipient
+
- The sender domain matches $virtual_alias_domains but the sender
is not listed in $virtual_alias_maps.
- The sender domain matches $virtual_mailbox_domains but the
-recipient is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
+sender is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
is not null.
-
- The sender domain matches $relay_domains but the recipient is
+
- The sender domain matches $relay_domains but the sender is
not listed in $relay_recipient_maps, and $relay_recipient_maps is
not null.
diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5
index bd2f315f0..6e3f2832e 100644
--- a/postfix/man/man5/postconf.5
+++ b/postfix/man/man5/postconf.5
@@ -4705,17 +4705,17 @@ access restriction is specified. This can slow down an explosion
of forged mail from worms or viruses.
.IP \(bu
The sender domain matches $mydestination, $inet_interfaces or
-$proxy_interfaces, but the recipient is not listed in
+$proxy_interfaces, but the sender is not listed in
$local_recipient_maps, and $local_recipient_maps is not null.
.IP \(bu
-The sender domain matches $virtual_alias_domains but the recipient
+The sender domain matches $virtual_alias_domains but the sender
is not listed in $virtual_alias_maps.
.IP \(bu
The sender domain matches $virtual_mailbox_domains but the
-recipient is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
+sender is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
is not null.
.IP \(bu
-The sender domain matches $relay_domains but the recipient is
+The sender domain matches $relay_domains but the sender is
not listed in $relay_recipient_maps, and $relay_recipient_maps is
not null.
.PP
diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto
index 11b1fc17d..c758fee80 100644
--- a/postfix/proto/postconf.proto
+++ b/postfix/proto/postconf.proto
@@ -7172,17 +7172,17 @@ of forged mail from worms or viruses.
- The sender domain matches $mydestination, $inet_interfaces or
-$proxy_interfaces, but the recipient is not listed in
+$proxy_interfaces, but the sender is not listed in
$local_recipient_maps, and $local_recipient_maps is not null.
-
- The sender domain matches $virtual_alias_domains but the recipient
+
- The sender domain matches $virtual_alias_domains but the sender
is not listed in $virtual_alias_maps.
- The sender domain matches $virtual_mailbox_domains but the
-recipient is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
+sender is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
is not null.
-
- The sender domain matches $relay_domains but the recipient is
+
- The sender domain matches $relay_domains but the sender is
not listed in $relay_recipient_maps, and $relay_recipient_maps is
not null.
diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h
index 02cebc7fd..722d61199 100644
--- a/postfix/src/global/mail_version.h
+++ b/postfix/src/global/mail_version.h
@@ -20,8 +20,8 @@
* Patches change the patchlevel and the release date. Snapshots change the
* release date only.
*/
-#define MAIL_RELEASE_DATE "20060315"
-#define MAIL_VERSION_NUMBER "2.2.10-RC1"
+#define MAIL_RELEASE_DATE "20060403"
+#define MAIL_VERSION_NUMBER "2.2.10-RC2"
#define VAR_MAIL_VERSION "mail_version"
#ifdef SNAPSHOT
diff --git a/postfix/src/global/pipe_command.c b/postfix/src/global/pipe_command.c
index e091b6e77..39b707312 100644
--- a/postfix/src/global/pipe_command.c
+++ b/postfix/src/global/pipe_command.c
@@ -131,6 +131,7 @@
#include
#include
+#include
#include
#include
#include
@@ -345,7 +346,7 @@ static int pipe_command_wait_or_kill(pid_t pid, WAIT_STATUS_T *statusp, int sig,
int pipe_command(VSTREAM *src, VSTRING *why,...)
{
- char *myname = "pipe_comand";
+ char *myname = "pipe_command";
va_list ap;
VSTREAM *cmd_in_stream;
VSTREAM *cmd_out_stream;
@@ -421,6 +422,7 @@ int pipe_command(VSTREAM *src, VSTRING *why,...)
* parent can kill not just the child but also its offspring.
*/
case 0:
+ (void) msg_cleanup((MSG_CLEANUP_FN) 0);
set_ugid(args.uid, args.gid);
if (setsid() < 0)
msg_warn("setsid failed: %m");
@@ -462,8 +464,16 @@ int pipe_command(VSTREAM *src, VSTRING *why,...)
/*
* Process plumbing. If possible, avoid running a shell.
+ *
+ * As a safety for buggy libraries, we close the syslog socket.
+ * Otherwise we could leak a file descriptor that was created by a
+ * privileged process.
+ *
+ * XXX To avoid losing fatal error messages we open a VSTREAM and
+ * capture the output in the parent process.
*/
closelog();
+ msg_vstream_init(var_procname, VSTREAM_ERR);
if (args.argv) {
execvp(args.argv[0], args.argv);
msg_fatal("%s: execvp %s: %m", myname, args.argv[0]);
diff --git a/postfix/src/smtpd/smtpd_proxy.c b/postfix/src/smtpd/smtpd_proxy.c
index 861f72d29..4e17cf071 100644
--- a/postfix/src/smtpd/smtpd_proxy.c
+++ b/postfix/src/smtpd/smtpd_proxy.c
@@ -416,7 +416,7 @@ int smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...)
if (vstream_ftimeout(state->proxy)
|| vstream_ferror(state->proxy)
|| vstream_feof(state->proxy)
- || ((err = vstream_setjmp(state->proxy) != 0)
+ || ((err = vstream_setjmp(state->proxy)) != 0
&& smtpd_proxy_rdwr_error(state->proxy, err))) {
state->error_mask |= MAIL_ERROR_SOFTWARE;
state->err |= CLEANUP_STAT_PROXY;