Hot to setup outbound proxy for outgoing emails

km@cyjax.com April 26, 2018

Hello,

JIRA is running on an internal network and public connectivity is provided via a proxy. The following documentation states how to setup a proxy but it says it doesn't work if we are trying to connect JIRA to a Mail Server.

How can I make Jira to talk to a public mail server behind a proxy?


Regards

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2018

The KB you mentioned, How to Configure an Outbound HTTP and HTTPS Proxy for JIRA applications, is aware of the limitation of that method being only for http and https requests:

This Outbound Proxy configuration only works for HTTP and HTTPs request only. If you are trying to connect JIRA to a Mail Server (Gmail or Office365) or to an LDAP Server, this configuration will not work.

That method is using these java jvm configuration parameters to be able to forward these http requests through another address.

The way I would want to try approach this specific problem would be to first learn more about your proxy (type, version, configuration, etc).  Ideally, it would be great if we could setup some rule or configuration upon your proxy/router/firewall to allow Jira to make outbound connections directly over the specific ports used by the incoming/outgoing mail, such as 25, 465, 995 or whatever ports are used.    This might not be possible given your environment or network restrictions, but this would be a configuration that is actually external to Jira and could work.  Of course you would need to consult your network admin and/or the proxy admin to configure this.

Alternatively, when reviewing Oracle's documentation on properties, I came across the use of a SOCKS proxy settings.   From what I understand of this, if your proxy supports this SOCKS protocol, you could use this specific JVM setting to tell Jira to make it's network connection through this SOCKS proxy.   I don't have much experience with this specific option, but it looks like it might be feasible way to get around this problem.

Another alternative could be to alter the location of either Jira or the mail server (in networking sense) in order to allow these to communicate with each other.  I know this isn't always feasible, I'm just trying to think out loud here in regards to how to make it work.

Could you also let us know what kind of mail server you are trying to connect to?  Is this a popular service like office365 or gmail?  Or is this some other exchange or other mail server?

Robert Mota July 9, 2021

Hi,

We have the same issue.

In our case, Jira and Confluence instances are on AWS, and we have to use a proxy socks to talk to outlook.office365.com specialy on port 995 to read mail boxes.

This proxy socks is different than the SQUID proxy used for http / https.

We will try the configuration below to our JVM.
socksProxyHost
socksProxyPort (default: 1080)

Best regards

Suggest an answer

Log in or Sign up to answer