Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Google Workspace SMTP relay 454 4.7.0: "Too many sign-in attempts, try again later"

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A multifunction printer, a scanner, an accounting system or a web application sends mail through Google Workspace's SMTP relay, smtp-relay.gmail.com. For a while it works. Then the log shows 454 4.7.0 and the messages stop leaving. Google's answer is temporary: try again later. What matters is why the sender is signing in so repeatedly, and what it takes to make it stop. Google's three actions are to keep connections open for several messages, to wait and retry with exponential backoff, and to check TLS, the registered IP address and the sign-in details.

Everything before the Fix section only reads.

What the error means

Google's page "Gmail SMTP errors and codes" lists two rows with code 454 and status 4.7.0. One reads "Too many sign-in attempts, try again later." The other reads "Cannot sign in due to a temporary system problem. Try again later." Each ends with a link to Google's page on SMTP relay service error messages.

That second page folds the two into one heading: "Cannot sign in due to a temporary problem or too many sign-in attempts (454 4.7.0)". Its explanation: "The server encountered a temporary sign-in problem or restricted repeated sign-in attempts on the connection."

The first digit of the code is 4. Google's page calls the error "a temporary (4xx) error" and tells the sender to queue the message and try again. This differs from 550 5.7.0 "Email relay denied", which is a permanent refusal covered in Google Workspace SMTP relay: email relay denied (5.7.0), and from 421 4.7.0 Connection expired, try reconnecting, covered in Gmail 421 4.7.0.

Google adds a note about where the error may show: "Error messages might not always appear." It lists reasons, such as sending servers that do not accept non-deliverable responses, or a sender that is a device, such as a printer or scanner, that cannot receive the notification. The page says that if the error messages have reached Google servers, they can be traced in email log search, and that a sender that keeps send logs can trace the error messages from its logs.

Likely causes

Google's page names three things to check, and each corresponds to a cause.

Cause What Google's page says Where it shows
A new connection and sign-in for every message "Don't open a new TCP connection and run AUTH for every message." The sender's send log shows one connection and one sign-in per message
Retrying at once after a temporary error "instead of immediately trying to sign in again in a loop" The send log shows repeated sign-in attempts in quick succession
The connection settings do not match what the relay accepts "Confirm that your mail server or device connects over TLS (port 587 with STARTTLS or port 465), that your sending public IP addresses are registered in the SMTP relay service setting" The port, the encryption and the IP address list in the Admin console
The sign-in details do not match an account "your EHLO or HELO domain and SMTP AUTH username and password match an active Google Workspace user on your registered domain" The username and the HELO or EHLO value the sender presents

A fourth item sits on Google's page on routing mail through the relay. It says that relay servers "support security methods that prevent DoS attacks" and that, to avoid impacting them, "we recommend that SMTP agents sending large amounts of mail reuse connections." That is the same fault as the first row, seen from the server's side.

Prove the cause before changing anything

Every step here reads and changes nothing.

  1. Write down the exact text of the error as the sender logs it, the time, and which system sent it. If the sender does not keep logs, the page says the message can be traced in email log search if it reached Google.

  2. Count the sign-ins. In the sender's log, see whether each message is sent over its own new connection with its own sign-in (AUTH). If every message signs in again, the first row of the table is the fault.

  3. Read the sender's connection settings. Google's page on routing mail through the relay says that with TLS, the server should point to smtp-relay.gmail.com on port 587, and that without TLS, it points to port 25, 465 or 587, in which case "you can't use SMTP authentication and must use IP address authentication." Write down the server name, the port and whether TLS is on.

  4. Read the relay setting in the Admin console. Go to Menu, then Apps, then Google Workspace, then Gmail, then Routing, and scroll to SMTP relay service. The setting shows the allowed senders, whether the authentication options "Only accept mail from the specified IP addresses" and "Require SMTP Authentication" are ticked, and the IP address list. Reading it requires the Gmail Settings administrator privilege. Compare the sender's public IP address with the list; the page says to "Use your own public IP address."

  5. Compare the sender's SMTP AUTH user name with a Google Workspace user on a registered domain, and the value it presents in HELO or EHLO with a domain of the organisation. Google's page on the relay says: "We recommend that servers present unique identifiers in the HELO or EHLO arguments during SMTP connections", for example the domain name or the server name, instead of generic identifiers such as localhost or smtp-relay.gmail.com.

  6. Rule out the limits, which have their own messages on the same page: "Daily SMTP relay limit exceeded for user", "Peak SMTP relay limit exceeded for customer" and "Your message has too many recipients". A 454 is not one of them.

An example, labelled as an illustration: a scanner at a clinic sends each scanned document as a separate message. Its log shows a new connection, a sign-in and one message, repeated a few hundred times in a morning. The first row of the table applies: every message signs in again.

Fix

Google's page on the 454 error gives three actions. The first two are changes to the sending system; the third is a check that includes one change in the Admin console.

Changes to the sending system

These are descriptions of Google's page, not steps.

  • Reuse open connections. Google's page says not to open a new TCP connection and run AUTH for every message. It says: "Keep existing SMTP connections to smtp-relay.gmail.com open (connections can stay open for up to 10 minutes) and send RSET followed by MAIL FROM to send additional messages over the same signed-in session."
  • Back off after a temporary error. The page says to set up the mail server or sending application "to queue the deferred message and try again with exponential backoff instead of immediately trying to sign in again in a loop."
  • Match the connection settings. The page says to confirm that the server connects over TLS (port 587 with STARTTLS or port 465), that the sending public IP addresses are registered in the SMTP relay service setting, and that the EHLO or HELO domain and the SMTP AUTH user name and password match an active Google Workspace user on the registered domain.

Register the sender's public IP address

This applies only when step 4 of the proof section showed that the sender's public IP address is not in the list.

Write down the current SMTP relay service setting in full: its name, the allowed senders choice, the authentication boxes that are ticked, every IP address or range with its Enable box, whether Require TLS encryption is ticked, and the time.

Disruptive step: the next step changes the SMTP relay service setting of the whole organisation, and every device and application that relays through smtp-relay.gmail.com uses it. Google says changes "can take up to 24 hours". If the setting is wrong, relayed mail from other systems can be refused. Keep the IP range as small as possible: Google says "For security reasons, we recommend that you keep the IP range as small as possible." This step does not tick or clear any authentication box. Google's page says the box "Only accept mail from the specified IP addresses" makes the system accept only messages sent from the IP addresses you specify, so ticking it is a bigger change than adding one address; our own advice is not to tick it as part of this step.

In the Admin console, go to Menu, then Apps, then Google Workspace, then Gmail, then Routing. Under SMTP relay service, click Edit on the existing setting. Click Add, enter a description and the public IP address in IPv4 or IPv6 format, tick the Enable box, click Save on the entry, and click Save on the setting. Google says the setting can be added, edited and deleted "at the top-level organization only."

Disruptive step: the undo is a second change to the same live setting, and the same change delay of up to 24 hours applies to it. Until it has applied, the added address is still accepted.

To undo it: open the same setting again with Edit. Clear the Enable box of the entry you added; the entry stays in the list, disabled. Set the ticked boxes and the Enable state of every other entry back to what you wrote down, and click Save.

Confirm the fix

  • Wait for the delay Google states: changes to the setting can take up to 24 hours.
  • Send a test message from the sender and read its log. If the sender now reuses a connection, the log should show one sign-in followed by further messages sent after RSET.
  • Check that no new 454 4.7.0 answer arrives over a working day. If one arrives, trace it in email log search, which Google's page says can trace errors that reached its servers.
  • Check that the deferred messages left the sender's queue after the retry.

What to watch afterwards

  • Volume. Google's page on routing mail through the relay gives limits: each user can send up to 10,000 messages in a 24-hour period, and "There is a 100-recipient limit per SMTP transaction for smtp-relay.gmail.com." A different error appears at those limits.
  • Connection caching. The page says that relay servers support security methods that prevent DoS attacks, and recommends that senders of large amounts of mail reuse connections.
  • The unique HELO or EHLO value on every sender, as in step 5.
  • A changed public IP address. If the network's public address changes, the list in the relay setting no longer contains the sender; the proof section's step 4 is the check.
  • Mail loops. The relay is "intended for on-premise devices and applications that generate outbound email sent with Google SMTP servers" and not for mail that originates from Gmail.

Risks and limits

The changing step edits a setting that every relaying device uses, so the old setting must be written down first and the change takes up to 24 hours to apply.

The 454 answer is temporary, and Google's instruction for the retry is exponential backoff. Third-party devices and applications are the supplier's to configure: Google's page on printers, scanners and apps says "Google doesn't support issues with third-party devices or apps."

Sources