My company's firewall only allow http and https connections.

To access internet, I have to specify the proxy before connecting the internet:

export http_proxy=http://my-company.com
export https_proxy=http://my-company.com

That's the current situation.

My question is how can I use Gnus to access Gmail's IMAP server through? What's the setup? Has anyone actually done this?

I've no problem to connect Gmail's IMAP server without proxy.

I did some investigation, looks Gnus is using openssl to connect to the Gnus.

so the first step is ask openssl to use proxy (because Gnus is using openssl) but I've not succeeded yet.

  • Not sure exactly what the question is, but if you're running into issues with Gnus and Gmail you might want to experiment with using something like isync.sourceforge.net/mbsync.html to synchronize your mail to a local Maildir and then using Gnus with the Maildir.
    – shosti
    Commented Sep 24, 2014 at 7:25
  • 1
    Do you mean you can only access gmail via HTTP(S) and not IMAP because of the firewall you're behind? In that case, you can't. Although you could setup another IMAP / proxy somewhere else which is accessible from your location.
    – remvee
    Commented Sep 24, 2014 at 7:55
  • 1
    my company has a firewall which allow only http and https traffic, but I want to use Gnus to access IMAP.
    – chen bin
    Commented Sep 24, 2014 at 11:08
  • Maybe this will help: zderadicka.eu/accessing-imapsmtp-via-https-proxy
    – mpontus
    Commented Sep 24, 2014 at 19:01
  • @chenbin you should edit your question to reflect what the problem really is -- that you are trying to get through a firewall.
    – Eric Brown
    Commented Sep 24, 2014 at 23:21

2 Answers 2


I don't think that's specifically Emacs-related. Your problem seems to be that you only have access to ports 80/443, and Gmail doesn't provide IMAP access over those: they only have 993 open for IMAP/SSL

See https://support.google.com/mail/troubleshooter/1668960 for reference

So unless you can bypass your proxy (by means of an external gateway for example), you're out of luck.


Unless your mail provider provides IMAP/SMTP access on ports 80/443, you are out of luck. No email client can be tuned to give access to a port that is being blocked by a firewall.

When I am in these circumstances, I use a VPN such as OpenVPN (e.g. with a third party service provider) that CAN be accessed over these ports.

Then, you can tunnel all of your traffic (including e.g. ports 993/465) through port 443 and get the access that you desire.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.