Problem with SMTP mail setup


I have a server configured with Confluence, Jira and Bitbucket.  We have an open relay server set up.  It does not require or accept a user/password.  The server is capable of sending mail from the Jira application.  Confluence and Bitbucket get a 421 error when attempting to send mail.  Here is a log extract from on of the attempts.


at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at com.atlassian.confluence.web.filter.DebugFilter.doFilter(
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.AbstractHttp11Processor.process(
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
at org.apache.tomcat.util.threads.TaskThread$
Caused by: javax.mail.MessagingException: Could not connect to SMTP host:, port: 2525, response: 421
at com.sun.mail.smtp.SMTPTransport.openServer(
at com.sun.mail.smtp.SMTPTransport.protocolConnect(
at javax.mail.Service.connect(
at javax.mail.Service.connect(
at javax.mail.Service.connect(
at com.atlassian.confluence.jmx.JmxSMTPMailServer.doSendWithMessageIdSupport(
... 363 more


1 answer

0 vote

A 421 means the service is not available.  My best guess is that it's not configured to accept email from your Bitbucket or Confluence servers.

Hello Nic,


Thanks for your answer.  The mail server is set up to relay.  We restrict IP addresses that are able to relay from the mail server.  Our entire network is allowed to rerlay.  Jira, Bitbucket and Confluence are all on the same server that is in our network.  Jira does connect and relay mail.  The other applications do not.  The server does not have ability to restrict access based on an application.  It only restricts based upon the sending IP address.

Ok, you'll need to investigate your mail server logs to find out why it is refusing the connection.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,850 views 1 5
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