From: Timo Sirainen Date: Thu, 8 Aug 2013 19:37:35 +0000 (+0300) Subject: lmtp: Don't write extra ([]) to Received: line for mails via UNIX socket. X-Git-Tag: 2.2.6~141 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39622d42aa198b19fb77d203e78a2418de68f740;p=thirdparty%2Fdovecot%2Fcore.git lmtp: Don't write extra ([]) to Received: line for mails via UNIX socket. --- diff --git a/src/lmtp/commands.c b/src/lmtp/commands.c index 8d8baa0b35..b3f2885646 100644 --- a/src/lmtp/commands.c +++ b/src/lmtp/commands.c @@ -910,7 +910,8 @@ static const char *client_get_added_headers(struct client *client) } 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);