# Add Proxy Support

**URL:** <https://community.getmailspring.com/t/add-proxy-support/185>\
**Category:** Feature Suggestions\
**Tags:** hard-mode, help-wanted, proxy, candidate, major, network\
**Created:** [January 22, 2021, 7:27pm UTC](https://community.getmailspring.com/t/add-proxy-support/185 "2021-01-22T19:27:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeMouse92](https://community.getmailspring.com/user_avatar/community.getmailspring.com/codemouse92/32/2359_2.png) [@CodeMouse92](https://community.getmailspring.com/u/CodeMouse92)\
**Post date:** [January 22, 2021, 7:27pm UTC](https://community.getmailspring.com/t/add-proxy-support/185/1 "2021-01-22T19:27:11Z")

</div>

Mailspring’s sync engine doesn’t currently pick up system proxy settings, especially on Windows and Linux, but it should. This makes it unusable when used behind a proxy, including with Tor (Socks5) and behind Corporate proxies.

![](https://community.getmailspring.com/uploads/default/original/1X/5d4c3092b5fc22255dc3cfc09e298474da294191.png)

> <https://github.com/Foundry376/Mailspring/issues/235>
>
> Hi team,
> There is a possibility to add a proxy option?
> Thanks in advance
> Luis Cacho

> **Duplicate Issues**
>
> [SMTP error when OpenVPN [Proxy] is connected · Issue #352 · Foundry376/Mailspring · GitHub](https://github.com/Foundry376/Mailspring/issues/352)
> 
> [Problems running the snap package on openSUSE TW · Issue #459 · Foundry376/Mailspring · GitHub](https://github.com/Foundry376/Mailspring/issues/459)
> 
> [How to set the Imap, Pop3 or Smtp via HTTP or SOCKS proxy? · Issue #543 · Foundry376/Mailspring · GitHub](https://github.com/Foundry376/Mailspring/issues/543)
> 
> [Feature Request: Need proxy function · Issue #1820 · Foundry376/Mailspring · GitHub](https://github.com/Foundry376/Mailspring/issues/1820)

---

<div class="post-metadata">

**Author:** ![bengotow](https://community.getmailspring.com/user_avatar/community.getmailspring.com/bengotow/32/14_2.png) [@bengotow](https://community.getmailspring.com/u/bengotow)\
**Post date:** [January 22, 2021, 7:27pm UTC](https://community.getmailspring.com/t/add-proxy-support/185/2 "2021-01-22T19:27:47Z")

</div>

The overall problem is that “proxy” means a lot of different things (SOCKS, proxies only for HTTP traffic, etc.) Chromium has a /ton/ of code for proxy autodiscovery across platforms (like tens of thousands of lines of code, which is wild…) and I’ve been hoping that Electron will expose an API for reading the auto-discovered proxy settings, which would allow us to apply them to the C++ sync engine easily. Unfortunately I asked about this again recently and the response wasn’t too promising:

[![image](https://community.getmailspring.com/uploads/default/original/1X/178c98b760e4e58fe5fcb6bd0e86e29841438a91.png)](https://user-images.githubusercontent.com/1037212/59888105-a933eb00-938b-11e9-920f-cb02fc3da07c.png)

Even the `curl` page about proxies talks about a whole bunch of different topics ([https://ec.haxx.se/usingcurl-proxies.html](https://ec.haxx.se/usingcurl-proxies.html)). I think we could probably support SOCKS and HTTPS `CONNECT` proxies (where the certificates and SSL are not broken by the proxy), but it’s a gonna be a lot of work 😬

* * *

(Originally posted by **[bengotow](https://github.com/bengotow)** on GitHub.)

---

<div class="post-metadata">

**Author:** ![luizlinux](https://community.getmailspring.com/user_avatar/community.getmailspring.com/luizlinux/32/274_2.png) [@luizlinux](https://community.getmailspring.com/u/luizlinux)\
**Post date:** [January 22, 2021, 7:28pm UTC](https://community.getmailspring.com/t/add-proxy-support/185/3 "2021-01-22T19:28:16Z")

</div>

First of all, thank you for the feedback Ben. Better late than ever, right?

Like you said, proxies might mean a lot of different things to different people.  
In that case, how about taking the [MVP](https://en.wikipedia.org/wiki/Minimum_viable_product) route and aim to provide http proxy support at first, then implement the other types of proxies later on?

Taking the MVP way, I would start out by implementing http proxy support at first, with all data required [proxy address, port, username and password] being manually inputed by the user.  
Later on I would add support for discovery, environment methods, scripts and other authentication methods.

Thanks.

* * *

(Originally posted by **[luizlinux](https://github.com/luizlinux)** on GitHub.)

---

<div class="post-metadata">

**Author:** ![luizlinux](https://community.getmailspring.com/user_avatar/community.getmailspring.com/luizlinux/32/274_2.png) [@luizlinux](https://community.getmailspring.com/u/luizlinux)\
**Post date:** [January 22, 2021, 10:47pm UTC](https://community.getmailspring.com/t/add-proxy-support/185/4 "2021-01-22T22:47:54Z")

</div>

As suggested by Jason on GitHub, I’m replying to the issue so the moderators can make an effort to reassign the post to me.

Thanks for not letting this die.

---

<div class="post-metadata">

**Author:** ![zicklag](https://community.getmailspring.com/user_avatar/community.getmailspring.com/zicklag/32/537_2.png) [@zicklag](https://community.getmailspring.com/u/zicklag)\
**Post date:** [February 3, 2021, 7:36pm UTC](https://community.getmailspring.com/t/add-proxy-support/185/5 "2021-02-03T19:36:19Z")

</div>

Why do we need internet access when the app starts up? It says it is trying to get to [getmailspring.com](http://getmailspring.com), but should that actually be necessary? SMTP and IMAP traffic don’t actually go through HTTP anyway, so could it be possible to not require that HTTP communication anyway?

Do I need to have a mailspring account to use it or something along those lines?

---

<div class="post-metadata">

**Author:** ![CodeMouse92](https://community.getmailspring.com/user_avatar/community.getmailspring.com/codemouse92/32/2359_2.png) [@CodeMouse92](https://community.getmailspring.com/u/CodeMouse92)\
**Post date:** [February 3, 2021, 7:38pm UTC](https://community.getmailspring.com/t/add-proxy-support/185/6 "2021-02-03T19:38:03Z")

</div>

Hi @zicklag,

Yes, Mailspring ID is required at this time. We’re considering making it optional in a later release.

> [@What is a Mailspring ID?](https://community.getmailspring.com/t/what-is-a-mailspring-id/239):
>
> What is a Mailspring ID and why do I need one? How is it different from my email address?

(Also, OMW, hi!! Long time no chat!)

---

<div class="post-metadata">

**Author:** ![everyx](https://community.getmailspring.com/user_avatar/community.getmailspring.com/everyx/32/3380_2.png) [@everyx](https://community.getmailspring.com/u/everyx)\
**Post date:** [September 25, 2021, 12:54am UTC](https://community.getmailspring.com/t/add-proxy-support/185/8 "2021-09-25T00:54:11Z")

</div>

For people who use Gmail in China like me, this proxy support is very much needed, hope it will come true soon 😀

---

<div class="post-metadata">

**Author:** ![everyx](https://community.getmailspring.com/user_avatar/community.getmailspring.com/everyx/32/3380_2.png) [@everyx](https://community.getmailspring.com/u/everyx)\
**Post date:** [December 18, 2021, 6:15am UTC](https://community.getmailspring.com/t/add-proxy-support/185/9 "2021-12-18T06:15:58Z")

</div>

Any update for this? the proxy should apply to mailspring itself and IMAP/SMPT/POP connect. I’m from China, and I can not add my Gmail account to mailspring, because it’s blocked, I try to use proxychains, but it doesn’t work.

---

<div class="post-metadata">

**Author:** ![Alexhhhc](https://community.getmailspring.com/user_avatar/community.getmailspring.com/alexhhhc/32/4171_2.png) [@Alexhhhc](https://community.getmailspring.com/u/Alexhhhc)\
**Post date:** [January 2, 2022, 3:42am UTC](https://community.getmailspring.com/t/add-proxy-support/185/10 "2022-01-02T03:42:30Z")

</div>

Me too!Or we’d choose transparent proxy(although it sometimes feels like a kick on the ass)

---

<div class="post-metadata">

**Author:** ![RichardYann](https://community.getmailspring.com/user_avatar/community.getmailspring.com/richardyann/32/6608_2.png) [@RichardYann](https://community.getmailspring.com/u/RichardYann)\
**Post date:** [February 1, 2023, 9:25am UTC](https://community.getmailspring.com/t/add-proxy-support/185/11 "2023-02-01T09:25:13Z")

</div>

+1  
Or anyone has some alternative methods？

---

<div class="post-metadata">

**Author:** ![Akagi201](https://community.getmailspring.com/user_avatar/community.getmailspring.com/akagi201/32/8552_2.png) [@Akagi201](https://community.getmailspring.com/u/Akagi201)\
**Post date:** [March 29, 2024, 9:09am UTC](https://community.getmailspring.com/t/add-proxy-support/185/12 "2024-03-29T09:09:34Z")

</div>

+1 Is there any workaround method for now?  
I used clashx enhanced mod, but doesn’t work when sending a email

---

<div class="post-metadata">

**Author:** ![Mattias](https://community.getmailspring.com/user_avatar/community.getmailspring.com/mattias/32/4315_2.png) [@Mattias](https://community.getmailspring.com/u/Mattias)\
**Post date:** [May 27, 2024, 6:56pm UTC](https://community.getmailspring.com/t/add-proxy-support/185/13 "2024-05-27T18:56:45Z")

</div>

+1

I started to use [Portmaster](https://safing.io/features/) as firewall which let’s you choose a secure DNS provider that is different from your ISP one. And it blocks trackers and mallware. I am a bit surprised that Mailspring does recognizes the DNS settings from portmaster (I am on opensuse/linux) and just fails to connect to a office 365 account with:

```auto
***
*** Mailspring Sync 
*** An exception occurred during program execution: 
*** {"debuginfo":"https://login.microsoftonline.com/common/oauth2/v2.0/token","key":"Couldn't resolve host name","retryable":true,"what":"std::exception"}
***

```

Connecting to my personal email account hosted elsewhere works, so it seems specifically for O365? It seems it cannot use the DNS to reach the microsoft website.

When using a VPN, is also does not want to connect:

```auto
***
*** Mailspring Sync 
*** An exception occurred during program execution: 
*** {"debuginfo":"syncFolderUIDRange - fetchMessagesByUID (heavy)","key":"ErrorConnection","retryable":true,"what":"std::exception"}
***

```

Other email clients that works with office 365 and oauth2 like Evolution do work in combination with Portmaster. So it seems the issue is related to the implementation of Office 365 in Mailspring or not?
