str_append(cap_str, " LITERAL+");
}
- if (client_is_tls_enabled(client) && !client->connection_tls_secured)
+ if (client_is_tls_enabled(client) && !client->connection_tls_secured &&
+ !client->haproxy_terminated_tls)
str_append(cap_str, " STARTTLS");
if (is_login_cmd_disabled(client))
str_append(cap_str, " LOGINDISABLED");
void client_cmd_starttls(struct client *client)
{
- if (client->connection_tls_secured) {
+ if (client->connection_tls_secured || client->haproxy_terminated_tls) {
client->v.notify_starttls(client, FALSE, "TLS is already active.");
return;
}
str_append(str, capability_string);
if (client_is_tls_enabled(&client->common) &&
- !client->common.connection_tls_secured)
+ !client->common.connection_tls_secured &&
+ !client->common.haproxy_terminated_tls)
str_append(str, "STLS\r\n");
if (client->common.set->auth_allow_cleartext ||
client->common.connection_secured)
}
if (client_is_tls_enabled(client) &&
- !client->connection_tls_secured)
+ !client->connection_tls_secured &&
+ !client->haproxy_terminated_tls)
smtp_server_reply_ehlo_add(reply, "STARTTLS");
if (!exotic_backend ||
(backend_caps & SMTP_CAPABILITY_PIPELINING) != 0)