Which ports does the JIRA e-mail functionality require?

I have a JIRA 6.3.15 installed on an Ubuntu 14.04 in a VirtualBox VM. The host system for VirtualBox also is an Ubuntu 14.04. I configured JIRA to use SSL, set up a custom HTTPS port in JIRA's server.xml file, added a forwarding rule for that port in the VM configuration and opened the port in the host's firewall. All of this works fine.

 

Now I'd like to have JIRA send notification e-mails. I added an SMTP server to the JIRA configuration. This also works fine as long as I have the host system's firewall turned off (i.e. accept all incoming packets). But when the host firewall's default action for incoming packets is set to „Drop“, sending out e-mails from JIRA inside the VM over SMTP fails. The connection test fails with an UnknownHostException.

The host firewall's default actions for outgoing and forwarded packets is „Accept“.

 

So apparently some port for incoming packets needs to be opened in the host system for the JIRA e-mail functionality to work. Could anyone point me to which port this is? I have already tried 465 as both destination and source port without success, and I couldn't find any documentation on this.

 

 

5 answers

1 accepted

OK, I found it: First of all, the issue was not JIRA-specific, but just any DNS lookup from the guest or host failed. The root cause of this was the host firewall missing rules to accept all incoming packets belonging or related to already established connections. This applies to all ports, not just 53, as port 53 is the incoming port on the DNS server, but the DNS server's answer can reach my server (aka the DNS lookup client) at any port.

0 votes
Timothy Chin Community Champion Feb 05, 2015

Have you confirmed which ports your SMTP uses? The default 465.

Yes, I have. Also, just to be sure, I set it to 465 explicitly. This is why I already tried opening port 465 in the host systems' firewall (unsuccessfully).

0 votes
Chris Fuller Atlassian Team Feb 05, 2015

The connection test fails with an UnknownHostException.

http://docs.oracle.com/javase/7/docs/api/java/net/UnknownHostException.html

In other words, the DNS lookup failed.  The system running JIRA cannot resolve the DNS you have supplied for the SMTP server.  This probably means that the system running JIRA either does not have its networking set up properly or that traffic to TCP 53 and UDP 53 are not making it through.  Try running "nslookup whatever.your.smtp.server.is" from the machine running JIRA.

 

True, any DNS lookup from the guest fails when the host's firewall is active. Even though port 53 is opened in the host's firewall for TCP and UDP and apparently 53 also is the right port. This is the nslookup result when setting the host firewall's defualt action to "Accept":

~$ nslookup google.com
Server:        x.x.x.x
Address:    x.x.x.x#53

Non-authoritative answer:
Name:    google.com
Address: 173.194.112.132
...

But I guess this is a topic for a different forum. wink

Thank you so far!

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

24,787 views 2 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you