The XFORWARD specification of the ADDR attribute did not
agree with the actual on-the-wire protocol. The spec has
been updated. File: proto/XFORWARD_README.html.
+
+20081006
+
+ Further refinements to the handling of remote client
+ attributes. Introduced a dummy "we have forwarded client
+ info" record, to eliminate the need for the backwards
+ incompatible queue file change that was introduced 20081003.
+ Files: smtpd/smtpd.c, cleanup/cleanup_envelope.c,
+ *qmgr/qmgr_message.c.
+
+ Hardened the proxymap client, in case it ever ends up in
+ a set-gid program. File: global/dict_proxy.c.
When increasing the number of SMTP server processes is not practical, you can
improve Postfix server responsiveness by eliminating unnecessary work. When
Postfix spends less time per SMTP session, the same number of SMTP server
-processes can service more clients.
+processes can service more clients in the same amount of time.
* Eliminate non-functional RBL lookups (blocklists that are no longer in
operation). These lookups can degrade performance. Postfix logs a warning
the $client_hostname attribute now correctly expands into "unknown"
instead of the empty string.
-There is a minor change in the way that XFORWARD attributes are
-stored in queue files. These attributes are used to propagate remote
-client information through an SMTP-based content filter. If you
-don't use such filters, then the following incompatibility does not
-affect your system.
-
-If you downgrade from this Postfix version to an older version while
-you still have new local submissions in the mail queue, the older
-Postfix cleanup server may log "spurious null attribute value"
-warnings when it processes queue files from the newer Postfix
-version. The older cleanup server will ignore the null-valued
-attributes. Thus, no harm will be done.
-
Incompatibility with snapshot 20080814
======================================
<p> When increasing the number of SMTP server processes is not
practical, you can improve Postfix server responsiveness by eliminating
unnecessary work. When Postfix spends less time per SMTP session, the
-same number of SMTP server processes can service more clients. </p>
+same number of SMTP server processes can service more clients in the
+same amount of time. </p>
<ul>
<p> When increasing the number of SMTP server processes is not
practical, you can improve Postfix server responsiveness by eliminating
unnecessary work. When Postfix spends less time per SMTP session, the
-same number of SMTP server processes can service more clients. </p>
+same number of SMTP server processes can service more clients in the
+same amount of time. </p>
<ul>
state->errs |= CLEANUP_STAT_BAD;
return;
}
-#if 0
- /* Zero-length values are place holders for unavailable values. */
if (*attr_value == 0) {
msg_warn("%s: spurious null attribute value for \"%s\" -- ignored",
state->queue_id, attr_name);
return;
}
-#endif
if ((junk = rec_attr_map(attr_name)) != 0) {
mapped_buf = attr_value;
mapped_type = junk;
return;
}
}
- /* Zero-length values are place holders for non-existent values. */
- if (*attr_value)
- nvtable_update(state->attr, attr_name, attr_value);
+ nvtable_update(state->attr, attr_name, attr_value);
cleanup_out(state, type, buf, len);
return;
} else {
int server_flags;
int status;
const char *service;
- char *relative_path;
+ char *chroot_path;
char *kludge = 0;
char *prefix;
CLNT_STREAM **pstream;
map, DICT_TYPE_PROXY);
if (*pstream == 0) {
- relative_path = concatenate(MAIL_CLASS_PRIVATE "/",
+ chroot_path = concatenate("/" MAIL_CLASS_PRIVATE "/",
service, (char *) 0);
- if (access(relative_path, F_OK) == 0)
- prefix = MAIL_CLASS_PRIVATE;
+ if (access(chroot_path, F_OK) == 0)
+ prefix = "/" MAIL_CLASS_PRIVATE;
else
prefix = kludge = concatenate(var_queue_dir, "/",
MAIL_CLASS_PRIVATE, (char *) 0);
var_ipc_ttl_limit);
if (kludge)
myfree(kludge);
- myfree(relative_path);
+ myfree(chroot_path);
}
/*
#define MAIL_ATTR_LOG_CLIENT_PORT "log_client_port" /* client port */
#define MAIL_ATTR_LOG_HELO_NAME "log_helo_name" /* SMTP helo name */
#define MAIL_ATTR_LOG_PROTO_NAME "log_protocol_name" /* SMTP/ESMTP/QMQP */
-#define MAIL_ATTR_LOG_ORIGIN "log_message_origin" /* name[addr]:port */
+#define MAIL_ATTR_LOG_CLIENT_DUMMY "log_client_dummy" /* none of the above */
#define MAIL_ATTR_ACT_CLIENT "client"/* client name addr */
#define MAIL_ATTR_ACT_CLIENT_NAME "client_name" /* client name */
#define MAIL_ATTR_ACT_FORWARD_CLIENT_NAME "forward_client_name"
#define MAIL_ATTR_PROTO_STATE "protocol_state" /* MAIL/RCPT/... */
+
+ /*
+ * Local submissions do not provide an origin record.
+ */
+#define MAIL_ATTR_LOG_ORIGIN "log_message_origin" /* name[addr]:port */
#define MAIL_ATTR_ORG_NONE "unknown" /* origin unknown */
#define MAIL_ATTR_ORG_LOCAL "local" /* local submission */
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20081005"
+#define MAIL_RELEASE_DATE "20081006"
#define MAIL_VERSION_NUMBER "2.6"
#ifdef SNAPSHOT
myfree(message->client_helo);
message->client_helo = mystrdup(value);
have_log_client_attr = 1;
+ } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_DUMMY) == 0) {
+ have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_SASL_METHOD) == 0) {
if (message->sasl_method == 0)
message->sasl_method = mystrdup(value);
myfree(message->client_helo);
message->client_helo = mystrdup(value);
have_log_client_attr = 1;
+ } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_DUMMY) == 0) {
+ have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_SASL_METHOD) == 0) {
if (message->sasl_method == 0)
message->sasl_method = mystrdup(value);
*/
rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
MAIL_ATTR_ACT_CLIENT_NAME, state->name);
+ /* XXX Backwards compatibility: include IPv6: prefix. */
rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
MAIL_ATTR_ACT_CLIENT_ADDR, state->rfc_addr);
rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
MAIL_ATTR_ACT_CLIENT_PORT, state->port);
rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%u",
MAIL_ATTR_ACT_CLIENT_AF, state->addr_family);
+ rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
+ MAIL_ATTR_ACT_PROTO_NAME, state->protocol);
}
/* qmqpd_copy_recipients - copy message recipients */
/* XXX Backwards compatibility: include IPv6: prefix. */
rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
MAIL_ATTR_LOG_CLIENT_ADDR, state->xforward.rfc_addr);
+ rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
+ MAIL_ATTR_LOG_ORIGIN, state->xforward.namaddr);
rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
MAIL_ATTR_LOG_CLIENT_PORT, state->xforward.port);
if (state->xforward.helo_name)
} else {
/* Local submission. See also qmgr_message_read(). */
rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
- MAIL_ATTR_LOG_CLIENT_ADDR, MAIL_ATTR_VAL_NONEXIST);
+ MAIL_ATTR_LOG_CLIENT_DUMMY, "dummy");
}
+ } else {
+ rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
+ MAIL_ATTR_LOG_ORIGIN, state->namaddr);
}
- /*
- * Logging attribute for the Postfix 2.3+ cleanup server.
- */
- rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
- MAIL_ATTR_LOG_ORIGIN, FORWARD_NAMADDR(state));
-
/*
* Attributes with actual client information. These are used by
* the smtpd Milter client for policy decisions. Mail that is