Too many login attempts error using Google SMTP with Jira server

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

Multiple mail messages go to the "Error Queue" under Administration > System > Mail Queue.

The below stack trace can be seen on atlassian-jira-outgoing-mail.log when debugging for Outgoing Mail is enabled through Administration > Logging & Profiling. Also, as described on this bug report, it might be necessary to manually enable protocol-level mail debugging through startup arguments.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 2015-08-24 08:43:21,234 ERROR [Google] Sending mailitem To='user@example.com' Subject='(ISSUE-1) Check mail throttling' From='null' FromName='John Doe (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='<JIRA.23457.6329402852030@Atlassian.JIRA>' MimeType='text/html' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@4a88836b' MessageId='null' ServiceRunner Mail Queue Service Error occurred in sending e-mail: To='user@example.com' Subject='(ISSUE-1) Check mail throttling' From='null' FromName='John Doe (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='<JIRA.23457.6329402852030@Atlassian.JIRA>' MimeType='text/html' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@4a88836b' MessageId='null' com.atlassian.mail.MailException: javax.mail.AuthenticationFailedException: 454 4.7.0 Too many login attempts, please try again later. y18sm18170739ywa.8 - gsmtp at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:201) at com.atlassian.mail.queue.SingleMailQueueItem.send(SingleMailQueueItem.java:44) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:57) at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:53) at com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory.runWithStaticBaseUrl(DefaultVelocityRequestContextFactory.java:127) at com.atlassian.jira.util.DefaultBaseUrl.runWithStaticBaseUrl(DefaultBaseUrl.java:41) at com.atlassian.jira.mail.JiraMailQueue.sendBuffer(JiraMailQueue.java:52) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:28) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66) at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75) at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53) at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: javax.mail.AuthenticationFailedException: 454 4.7.0 Too many login attempts, please try again later. y18sm18170739ywa.8 - gsmtp at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:823) at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:673) at javax.mail.Service.connect(Service.java:317) at javax.mail.Service.connect(Service.java:176) at javax.mail.Service.connect(Service.java:125) at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:172) ... 18 more

Diagnosis

  • Your instance has a Google SMTP server configured for Outgoing Mail;

  • There is a high volume of e-mails being sent constantly;

Cause

When JIRA tries to send multiple messages through an e-mail account using Google's SMTP server, it may exceed the sending limits, therefore the operation will be throttled until additional limit is available to the user (the limit is valid for a rolling window of 24 hours).

A suggestion for implementing better support to throttling mail servers in JIRA has already been filed. You can watch for updates in the below issue raised at our development-tracking platform.

JRASERVER-38806

Solution

Workaround

There are some ways to mitigate this problem:

  • Set up Sender Policy Framework (SPF) and DKIM records in Google Apps for your domain to conform with Google's bulk sender guidelines. This serverfault.com thread also has a quick guide on this;

  • Use the open source program PostFix for throttled SMTP relay. See this article to learn more about setting it up;

  • Services to increase the interval at which JIRA sends e-mails. This interval controls how frequently the mail queue is processed and could be used in conjunction with the other options to reduce the rate of outgoing mail;

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.