incoming mail server exception

Hi I am getting below exception while configuring mailbox to jira.


Unable to connect to the server at <exchange server host name> due to the following exception: Connection refused



2 answers

0 votes

That means your JIRA server cannot get a connection to the mail server.

Check the network allows the connection, that the mail server is running on the server and ports given, and that your credentials are correct.

Hi Nic,


Thanks for your reply , i am able to ping Exchange server from JIRA server and also I am able to login to mailbox with given credentials.

Good start, but you need to test the whole connection.  Ping tests a port and a service, and only really tests the route and that the server is running with something that responds to ping.   You're using a totally different service - mail.

So, you need to test that.  Ask your Exchange administrators for the port number they have chosen to run POP3 or IMAP on for you (more recent Exchange servers have those turned off in favour of the inferior MAPI protocol which is non-standard and not supportable, so you must have got one of them enabled to use with JIRA.  I'd recommend secure-imap)

Thank you so much @Nic Brough [Adaptavist] , for your response ,


I had a discussion with my Exchange Administrator , and they are not ready to enable POP or IMAP protocol for just jira-mailbox. they are currently using SMTP protocol to send and receive the email.

They are telling that if we will change protocol from SMTP to IMAP or POP this will change whole organization structure and security.


so is there any workaround we can do here?


your help will be much appreciated.



You need POP or IMAP to provide an "inbox".

SMTP is for transferring mail, it is NOT an inbox and cannot be used for receiving mail.

To use snail-mail as an example, in the real world, a human writes a letter (the body of an email), puts a name and address on it (the email address), and gives it to someone to deliver it, such as the Post Office (SMTP).  The carrier reads the address, moves the letter to the nearest depot and eventually sends someone out, carrying the letter, over to the delivery address.  That's all SMTP.

Once they get there, two things might happen. 

  1.  There's a mailbox.  The mail goes into it and lies there until the recipient picks it up.  This is POP or IMAP (or MAPI)
  2.  The recipient might be standing on the doorstep, ready to get the mail by hand.  In electronic terms, that is a system that can receive emails directly from SMTP without a mailbox.  It's clunky, insecure and useless for an end user, so no-one does it.  If you wanted to do this in JIRA, you'd have to write a POP/IMAP email inbox system inside it, which is not what it is for.

So, what your Exchange admins have told you is wrong on a couple of counts.

  1. They are not using SMTP to receive mail.  Transfer it, yes, but not receive it.
  2. Exchange server does offer IMAP and POP mailboxes.  You do not have to change your entire organisation to enable it for one mailbox. 

Check with Network team laugh laugh There is actually a error code received in response for any connection refused.


You should be easily able to identify the cause seeing the error code. 

thanks sumit ,

i am able to ping the exchange server from JIRA server. but still getting same error.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

811 views 3 9
Read article

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