]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: Don't write extra ([]) to Received: line for mails via UNIX socket.
authorTimo Sirainen <tss@iki.fi>
Thu, 8 Aug 2013 19:37:35 +0000 (22:37 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 8 Aug 2013 19:37:35 +0000 (22:37 +0300)
src/lmtp/commands.c

index 8d8baa0b359fb68334f3a27fd4d4bbc8e807d2ab..b3f288564693c6d5b5512572638e994ad560a654 100644 (file)
@@ -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);