[tor-commits] [torbirdy/develop] Configure Riseup accounts automatically

sukhbir at torproject.org sukhbir at torproject.org
Fri Nov 25 05:54:48 UTC 2016


commit d9f74a8f71c80eb70ad37a68f8ba743b1779414c
Author: Sukhbir Singh <sukhbir at 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;
 





More information about the tor-commits mailing list