From: Art Cancro Date: Wed, 12 Jul 2017 22:11:39 +0000 (-0400) Subject: New config option 'c_smtpclient_try_starttls' if nonzero outbound SMTP attempts START... X-Git-Tag: v939~529 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=44c9169c5f2c048cc9a7a35d562b6518e340fc8f New config option 'c_smtpclient_try_starttls' if nonzero outbound SMTP attempts STARTTLS if offered --- diff --git a/citadel/modules/smtp/serv_smtpclient.c b/citadel/modules/smtp/serv_smtpclient.c index 372dddbc4..937367943 100644 --- a/citadel/modules/smtp/serv_smtpclient.c +++ b/citadel/modules/smtp/serv_smtpclient.c @@ -237,7 +237,9 @@ int smtp_attempt_delivery(long msgid, char *recp, char *envelope_from) curl_easy_setopt(curl, CURLOPT_READDATA, &s); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); // tell libcurl we are uploading curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L); // Time out after 20 seconds - // curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY); athos-mn + if (CtdlGetConfigInt("c_smtpclient_try_starttls") != 0) { + curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY); // Attempt STARTTLS if offered + } curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); // curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_error_buffer);