dovecot-2.2: lmtp: Proxying now logs successful and failed deliv...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 16 10:13:56 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/20e8ed98357b
changeset: 17494:20e8ed98357b
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 16 13:12:40 2014 +0300
description:
lmtp: Proxying now logs successful and failed deliveries after DATA.

diffstat:

 src/lmtp/lmtp-proxy.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 50ede76b8d2b -r 20e8ed98357b src/lmtp/lmtp-proxy.c
--- a/src/lmtp/lmtp-proxy.c	Mon Jun 16 13:03:31 2014 +0300
+++ b/src/lmtp/lmtp-proxy.c	Mon Jun 16 13:12:40 2014 +0300
@@ -231,7 +231,7 @@
 }
 
 static void
-lmtp_proxy_conn_data(bool success ATTR_UNUSED, const char *reply, void *context)
+lmtp_proxy_conn_data(bool success, const char *reply, void *context)
 {
 	struct lmtp_proxy_recipient *rcpt = context;
 	struct lmtp_proxy_connection *conn = rcpt->conn;
@@ -246,6 +246,16 @@
 	rcpt->reply = p_strdup(conn->proxy->pool, reply);
 	rcpt->data_reply_received = TRUE;
 
+	if (!success) {
+		i_error("%s: Failed to send message to <%s> at %s:%u: %s",
+			conn->proxy->set.session_id, rcpt->address,
+			conn->set.host, conn->set.port, reply);
+	} else {
+		i_info("%s: Sent message to <%s> at %s:%u: %s",
+		       conn->proxy->set.session_id, rcpt->address,
+		       conn->set.host, conn->set.port, reply);
+	}
+
 	lmtp_proxy_try_finish(conn->proxy);
 }
 


More information about the dovecot-cvs mailing list