[evolution-data-server/gnome-3-24] Bug 783385 - Prefer SSL over STARTTLS for mail when both are set in GOA



commit 0a0bb3a067e2801fa4547afd60f381cdd65621a3
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jun 12 11:14:09 2017 +0200

    Bug 783385 - Prefer SSL over STARTTLS for mail when both are set in GOA

 .../module-gnome-online-accounts.c                 |   16 ++++++----------
 src/modules/google-backend/module-google-backend.c |    4 ++--
 2 files changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/src/modules/gnome-online-accounts/module-gnome-online-accounts.c 
b/src/modules/gnome-online-accounts/module-gnome-online-accounts.c
index 3e2cd3c..fafc33b 100644
--- a/src/modules/gnome-online-accounts/module-gnome-online-accounts.c
+++ b/src/modules/gnome-online-accounts/module-gnome-online-accounts.c
@@ -396,13 +396,11 @@ gnome_online_accounts_config_imap (EGnomeOnlineAccounts *extension,
                CAMEL_NETWORK_SETTINGS (settings),
                goa_mail_get_imap_user_name (goa_mail));
 
-       /* Prefer "use_tls" over "use_ssl" if both are set. */
+       /* Prefer "use_ssl" over "use_tls" if both are set. */
        camel_network_settings_set_security_method (
                CAMEL_NETWORK_SETTINGS (settings),
-               use_tls ?
-               CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT :
-               use_ssl ?
-               CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT :
+               use_ssl ? CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT :
+               use_tls ? CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT :
                CAMEL_NETWORK_SECURITY_METHOD_NONE);
 
        g_object_unref (network_address);
@@ -481,13 +479,11 @@ gnome_online_accounts_config_smtp (EGnomeOnlineAccounts *extension,
                CAMEL_NETWORK_SETTINGS (settings),
                gnome_online_accounts_get_smtp_auth (goa_mail));
 
-       /* Prefer "use_tls" over "use_ssl" if both are set. */
+       /* Prefer "use_ssl" over "use_tls" if both are set. */
        camel_network_settings_set_security_method (
                CAMEL_NETWORK_SETTINGS (settings),
-               use_tls ?
-               CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT :
-               use_ssl ?
-               CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT :
+               use_ssl ? CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT :
+               use_tls ? CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT :
                CAMEL_NETWORK_SECURITY_METHOD_NONE);
 
        g_object_unref (network_address);
diff --git a/src/modules/google-backend/module-google-backend.c 
b/src/modules/google-backend/module-google-backend.c
index 06280ff..0f4887f 100644
--- a/src/modules/google-backend/module-google-backend.c
+++ b/src/modules/google-backend/module-google-backend.c
@@ -54,8 +54,8 @@
 /* SMTP Configuration Details */
 #define GOOGLE_SMTP_BACKEND_NAME       "smtp"
 #define GOOGLE_SMTP_HOST               "smtp.googlemail.com"
-#define GOOGLE_SMTP_PORT               587
-#define GOOGLE_SMTP_SECURITY_METHOD    METHOD (STARTTLS_ON_STANDARD_PORT)
+#define GOOGLE_SMTP_PORT               465
+#define GOOGLE_SMTP_SECURITY_METHOD    METHOD (SSL_ON_ALTERNATE_PORT)
 
 /* Contacts Configuration Details */
 #define GOOGLE_CONTACTS_BACKEND_NAME   "google"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]