dovecot-2.2: lmtp proxy: Include session ID string in timeout re...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Aug 30 22:05:17 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/bde62f77c65a
changeset: 15000:bde62f77c65a
user: Timo Sirainen <tss at iki.fi>
date: Tue Aug 28 13:23:37 2012 +0300
description:
lmtp proxy: Include session ID string in timeout reply text.
diffstat:
src/lmtp/commands.c | 1 +
src/lmtp/lmtp-proxy.c | 10 ++++++----
src/lmtp/lmtp-proxy.h | 2 +-
3 files changed, 8 insertions(+), 5 deletions(-)
diffs (64 lines):
diff -r db9fcdacba90 -r bde62f77c65a src/lmtp/commands.c
--- a/src/lmtp/commands.c Sun Aug 26 19:23:48 2012 +0300
+++ b/src/lmtp/commands.c Tue Aug 28 13:23:37 2012 +0300
@@ -304,6 +304,7 @@
if (client->proxy == NULL) {
client->proxy = lmtp_proxy_init(client->set->hostname,
dns_client_socket_path,
+ client->state.session_id,
client->output);
if (client->state.mail_body_8bitmime)
args = " BODY=8BITMIME";
diff -r db9fcdacba90 -r bde62f77c65a src/lmtp/lmtp-proxy.c
--- a/src/lmtp/lmtp-proxy.c Sun Aug 26 19:23:48 2012 +0300
+++ b/src/lmtp/lmtp-proxy.c Tue Aug 28 13:23:37 2012 +0300
@@ -33,7 +33,7 @@
struct lmtp_proxy {
pool_t pool;
- const char *mail_from, *my_hostname;
+ const char *mail_from, *my_hostname, *session_id;
const char *dns_client_socket_path;
ARRAY_DEFINE(connections, struct lmtp_proxy_connection *);
@@ -56,7 +56,7 @@
struct lmtp_proxy *
lmtp_proxy_init(const char *my_hostname, const char *dns_client_socket_path,
- struct ostream *client_output)
+ const char *session_id, struct ostream *client_output)
{
struct lmtp_proxy *proxy;
pool_t pool;
@@ -69,6 +69,7 @@
proxy->my_hostname = p_strdup(pool, my_hostname);
proxy->client_output = client_output;
proxy->dns_client_socket_path = p_strdup(pool, dns_client_socket_path);
+ proxy->session_id = p_strdup(pool, session_id);
i_array_init(&proxy->rcpt_to, 32);
i_array_init(&proxy->connections, 32);
return proxy;
@@ -264,8 +265,9 @@
const char *line;
line = t_strdup_printf(ERRSTR_TEMP_REMOTE_FAILURE
- " (timeout while waiting for reply to %s)",
- lmtp_client_state_to_string(conn->client));
+ " (timeout while waiting for reply to %s) <%s>",
+ lmtp_client_state_to_string(conn->client),
+ conn->proxy->session_id);
lmtp_client_fail(conn->client, line);
}
diff -r db9fcdacba90 -r bde62f77c65a src/lmtp/lmtp-proxy.h
--- a/src/lmtp/lmtp-proxy.h Sun Aug 26 19:23:48 2012 +0300
+++ b/src/lmtp/lmtp-proxy.h Tue Aug 28 13:23:37 2012 +0300
@@ -15,7 +15,7 @@
struct lmtp_proxy *
lmtp_proxy_init(const char *my_hostname, const char *dns_client_socket_path,
- struct ostream *client_output);
+ const char *session_id, struct ostream *client_output);
void lmtp_proxy_deinit(struct lmtp_proxy **proxy);
/* Set the "MAIL FROM:" line, including <> and options */
More information about the dovecot-cvs
mailing list