dovecot-2.2: lmtp: Don't write extra ([]) to Received: line for ...

dovecot at dovecot.org dovecot at dovecot.org
Thu Aug 8 22:37:53 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/9aa9944bd96e
changeset: 16683:9aa9944bd96e
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Aug 08 22:37:35 2013 +0300
description:
lmtp: Don't write extra ([]) to Received: line for mails via UNIX socket.

diffstat:

 src/lmtp/commands.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 5dbea45eecb8 -r 9aa9944bd96e src/lmtp/commands.c
--- a/src/lmtp/commands.c	Wed Aug 07 19:47:17 2013 +0300
+++ b/src/lmtp/commands.c	Thu Aug 08 22:37:35 2013 +0300
@@ -910,7 +910,8 @@
 	}
 
 	str_printfa(str, "Received: from %s", client->lhlo);
-	if ((host = net_ip2addr(&client->remote_ip)) != NULL)
+	host = net_ip2addr(&client->remote_ip);
+	if (host[0] != '\0')
 		str_printfa(str, " ([%s])", host);
 	str_printfa(str, "\r\n\tby %s ("PACKAGE_NAME") with LMTP id %s",
 		    client->my_domain, client->state.session_id);


More information about the dovecot-cvs mailing list