commit d9f74a8f71c80eb70ad37a68f8ba743b1779414c
Author: Sukhbir Singh <sukh...@torproject.org>
Date:   Thu May 12 17:51:44 2016 -0400

    Configure Riseup accounts automatically
---
 chrome/content/emailwizard.js | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/chrome/content/emailwizard.js b/chrome/content/emailwizard.js
index d38828e..9d88d70 100644
--- a/chrome/content/emailwizard.js
+++ b/chrome/content/emailwizard.js
@@ -90,18 +90,24 @@ if(!org.torbirdy.emailwizard) org.torbirdy.emailwizard = 
new function() {
       config.incoming.auth = 3;
       config.outgoing.auth = 3;
 
-      // We will deal with Gmail later because it makes it easier to handle
-      // OAuth2 with the manual configuration.
-      let emailDomain = email.split("@")[1];
-      if (emailDomain === "gmail.com") {
-        pub.isGmail = true;
-      }
-
       // Default the outgoing SMTP port.
       config.outgoing.port = 465;
 
       config.outgoing.hostname = "smtp.%EMAILDOMAIN%";
 
+      let emailDomain = email.split("@")[1];
+      // Gmail and Riseup settings.
+      switch (emailDomain) {
+        case "gmail.com":
+          // Gmail uses OAuth2, which we deal with later.
+          pub.isGmail = true;
+          break;
+        case "riseup.net":
+          config.incoming.hostname = "mail.%EMAILDOMAIN%";
+          config.outgoing.hostname = "mail.%EMAILDOMAIN%";
+          break;
+      }
+
       replaceVariables(config, realname, email, password);
       config.rememberPassword = rememberPassword && !!password;
 



_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to