Commit baad4295 baad429501ce8e3d2e5d2d00d71b660e396f8908 by Sergey Poznyakoff

Issue a deprecation warning if tls-required is used in pop3d or imap4d config

1 parent b5b49d26
......@@ -288,13 +288,23 @@ static int
cb_tls_required (void *data, mu_config_value_t *val)
{
int bv;
if (mu_cfg_assert_value_type (val, MU_CFG_STRING))
return 1;
if (mu_cfg_parse_boolean (val->v.string, &bv))
mu_error (_("Not a boolean value"));
else if (bv)
tls_mode = tls_required;
{
tls_mode = tls_required;
mu_diag_output (MU_DIAG_WARNING,
"the \"tls-required\" statement is deprecated, "
"use \"tls required\" instead");
}
else
mu_diag_output (MU_DIAG_WARNING,
"the \"tls-required\" statement is deprecated, "
"use \"tls\" instead");
return 0;
}
......
......@@ -183,7 +183,17 @@ cb_tls_required (void *data, mu_config_value_t *val)
if (mu_cfg_parse_boolean (val->v.string, &bv))
mu_error (_("Not a boolean value"));
else if (bv)
tls_mode = tls_required;
{
tls_mode = tls_required;
mu_diag_output (MU_DIAG_WARNING,
"the \"tls-required\" statement is deprecated, "
"use \"tls required\" instead");
}
else
mu_diag_output (MU_DIAG_WARNING,
"the \"tls-required\" statement is deprecated, "
"use \"tls\" instead");
return 0;
}
......