client_raw_user_create(client);
client_generate_session_id(client);
client->my_domain = client->set->hostname;
- client->state.lhlo = "missing";
+ client->lhlo = i_strdup("missing");
DLLIST_PREPEND(&clients, client);
clients_count++;
if (client->fd_in != client->fd_out)
net_disconnect(client->fd_out);
client_state_reset(client);
+ i_free(client->lhlo);
pool_unref(&client->state_pool);
pool_unref(&client->pool);
};
struct client_state {
- const char *lhlo;
const char *session_id;
const char *mail_from;
ARRAY_DEFINE(rcpt_to, struct mail_recipient);
struct mail_user *raw_mail_user;
const char *my_domain;
+ char *lhlo;
pool_t state_pool;
struct client_state state;
client_send_line(client, "250-ENHANCEDSTATUSCODES");
client_send_line(client, "250 PIPELINING");
- client->state.lhlo = p_strdup(client->state_pool, str_c(domain));
+ i_free(client->lhlo);
+ client->lhlo = i_strdup(str_c(domain));
return 0;
}
if (rcpt_to != NULL)
str_printfa(str, "Delivered-To: <%s>\r\n", rcpt_to);
- str_printfa(str, "Received: from %s", client->state.lhlo);
+ str_printfa(str, "Received: from %s", client->lhlo);
if ((host = net_ip2addr(&client->remote_ip)) != NULL)
str_printfa(str, " ([%s])", host);
str_printfa(str, "\r\n\tby %s ("PACKAGE_NAME") with LMTP id %s",