Google Workspace · SMTP relay · 550 5.7.0
Google Workspace SMTP Relay: Fix 550 5.7.0 ‘Mail Relay Denied’ (IP, HELO and Allowed Senders)
smtp-relay.gmail.com) is the admin-managed door for printers, scanners, servers and apps — it checks your IP address or your SMTP login, not a user’s mailbox. The Gmail SMTP server (smtp.gmail.com) is the per-user door — it checks one user’s login and caps at 2,000 messages a day. If you are pointing a device at smtp.gmail.com and getting a login error (535 5.7.80 or 534 5.7.90), that is a different problem with a different fix — see the comparison table below before you touch the relay setting.The fast answer
550 5.7.0 “Mail relay denied” means Google cannot match your connection to your Workspace organisation. Google’s own error list gives the cause in one sentence: the mail “is being sent from a domain or IP address which isn’t registered in your Workspace account.” Fix it in the Admin console, in this order:
- Register the sending IP. Admin console → Apps → Google Workspace → Gmail → Routing → SMTP relay service → “Only accept mail from the specified IP addresses”, and add the public IP your device or server actually sends from — not its private LAN address.
- Or switch on SMTP authentication instead. Tick “Require SMTP Authentication” and give the device a real Workspace user’s address and password (over TLS, port 587). This is the fix when the IP keeps changing.
- Fix the HELO name and the sender. Your server must introduce itself with a real name from your own domain — not
localhost— and the envelope sender (MAIL FROM) must be an address in one of your domains. Google reads both to identify you. - Set Allowed senders to the narrowest option that works — “Only registered Apps users in my domains” for user mail, “Only addresses in my domains” for apps and printers sending from addresses that are not real users. “Any addresses” is Google’s own “not recommended” option.
- Wait. Google says relay changes can take up to 24 hours to apply. Do not re-test every five minutes and conclude the fix failed.
What you are looking at, in plain words
The SMTP relay service is Google’s door for things that are not people. A printer that scans to email, a server that sends order confirmations, an app that sends password resets, an on-premise Exchange server routing outbound mail through Google — these cannot sign in to Gmail as a user, so Google lets an administrator vouch for them instead. The administrator opens one setting in the Admin console and says: mail may come from these IP addresses, or from these senders, authenticated this way. Google then relays that mail to anyone, inside or outside your organisation. Google calls this its recommended option for devices and apps, and its most secure one — with IP authentication, nothing on the device holds a user’s password.
550 5.7.0 is Google saying it cannot vouch for you. The full text, from Google’s own SMTP error list, reads: “Email relay denied ip-address. Invalid credentials for relay for one of the domains in: domain-name (as obtained from HELO and (E)MAIL FROM). Email is being sent from a domain or IP address which isn’t registered in your Workspace account.” Read that slowly, because it names the three things Google checked: the IP address of the connection, the HELO name your server introduced itself with, and the MAIL FROM envelope sender. One of them did not match anything in your Workspace account, so Google refused to pass the mail on. Retrying will not help — 550 is a permanent refusal, and the same connection will get the same answer until the registration is fixed.
Two look-alike errors are not this error. “550 5.7.1 Invalid credentials for relay” means the IP you registered does not match the domain the mail claims to be from — same setting, different mismatch, different fix (Step 3). “550 5.7.0 Email sending denied”, with no “invalid credentials” line at all, is Google’s third 5.7.0 variant: its own error list gives no cause for it beyond a pointer to the relay error page, so treat it as a separate case in the ladder, not as the same failure. And if the code is 550 5.4.5 or 450 4.2.1, you have hit a sending limit, not a registration problem — the relay accepted who you are and refused how much you sent.
| Door | Server and ports | How Google knows it is you | Limit Google publishes | Use it for |
|---|---|---|---|---|
| SMTP relay service (recommended for devices) | smtp-relay.gmail.com — 25, 465 or 587; 587 with TLS | Admin-registered IP address, or SMTP authentication with a Workspace user | 10,000 messages and 10,000 unique recipients per user per 24 hours; 100 recipients per SMTP transaction | Printers, scanners, servers, apps — anything sending from your domain that is not a person signing in |
| Gmail SMTP server | smtp.gmail.com — 465 (SSL) or 587 (TLS) | One Workspace user’s full address + app password (or OAuth) | 2,000 messages per day | A single user’s mail client or app that can sign in as that user |
| Restricted Gmail SMTP server | aspmx.l.google.com — port 25 only | No authentication; device IP allowlisted in Gmail settings | Google Workspace per-user limits apply | Only mail to Gmail or Google Workspace addresses — it cannot send to the outside world at all |
One more boundary, from Google’s own relay page: the relay is for mail that originates outside Gmail. Do not use it to relay mail that originates from Gmail itself — for example, routing Gmail mail out to a third-party gateway and back through Google to deliver it. Google says it gives “best effort” support only for that pattern, because it can cause mail loops, excessive quota use and increased security risk. If your setup looks like that, the relay is the wrong tool and the 5.7.0 is the least of the problems it will cause.
Step 0 — Prove which part is failing
Do this before you change any setting. The bounce text names the failed check, and the three failures have three different fixes — changing the wrong one wastes a day, because each Admin console change can take up to 24 hours to apply.
- Get the full bounce text, not just the code. Open the bounce or the sending server’s log and copy the whole 550 line. There are three variants to tell apart: “Email relay denied … Invalid credentials for relay for one of the domains in: domain-name (as obtained from HELO and (E)MAIL FROM)” — the registration failure this guide fixes; “550 5.7.1 Invalid credentials for relay” — the registered IP does not match the sending domain (Step 3); and bare “550 5.7.0 Email sending denied” — no cause given, handled separately in the ladder. If the code is 550 5.4.5 or 450 4.2.1 instead, stop: that is a limit, not a registration failure, and the fix is in the ladder, not in Steps 1–4.
- Confirm which server the device is actually talking to. Check the device or app’s SMTP settings: the hostname must be
smtp-relay.gmail.com. If it sayssmtp.gmail.com, you are at the wrong door — that server answers login failures with 535 5.7.80 (“Username and Password not accepted”) or 534 5.7.90 (“Application-specific password required”), never with 550 5.7.0, and no relay setting will fix it. Our Gmail 535 5.7.800 guide covers that door; our companion guide on Workspace Gmail not accepting your password for SMTP or IMAP covers the Workspace side of it. - Find the public IP your mail actually leaves from. From the sending server itself — not from your laptop — check the outward-facing address (for example,
curl -4 https://ifconfig.meon the server, or ask your network administrator). Write it down. This is the address Google sees, and it is the address that must be in the relay setting. The private address on the device’s network settings (192.168.x.x, 10.x.x.x) is useless here: Google never sees it, and registering it fixes nothing. If the server sits behind NAT, a VPN, or a cloud provider that changes the egress IP, the address you find today may not be the address Google sees tomorrow — that is the commonest reason a relay that worked yesterday stops today, and Step 2 covers the durable fix. - Read the HELO name and the envelope sender off the same log. The bounce itself quotes them: “as obtained from HELO and (E)MAIL FROM”. Note exactly what your server said for HELO — if it is
localhost, an internal hostname such asmail-01.internal, orsmtp-relay.gmail.comitself, that is a suspect before you look anywhere else. Note the MAIL FROM address too: it must be an address in one of your Workspace domains. Anoreply@address on a domain you do not own, or an empty envelope sender, will fail under the narrow Allowed senders options even with a perfectly registered IP. - Check whether the relay setting exists at all. In the Admin console, go to Apps → Google Workspace → Gmail → Routing and look for the SMTP relay service setting. If there is no setting, nothing else matters — there is no registration for Google to match against, and Step 1 is the fix. Note also that you can only add, edit or delete this setting at the top-level organisation, and only with the Gmail Settings administrator privilege; if you are an administrator of a child organisation unit only, you will see the setting but cannot change it.
Step 1 — Configure the relay setting in the Admin console
Everything in this guide lives in one setting. Create it if it does not exist; fix it if it does.
- Open the setting. In the Google Admin console, go to Menu → Apps → Google Workspace → Gmail → Routing. Scroll to SMTP relay service and click Configure. If the setting is already configured, click Edit (or Add another rule if you need a second rule for a different set of senders).
- Choose Allowed senders — the narrowest option that works. Google offers three, and the choice is a security decision, not a convenience one:
- Only registered Apps users in my domains — the sender must be a Google Workspace user in one of your domains. Choose this if every sender is a real user account.
- Only addresses in my domains — the sender does not have to be a Workspace user, but the address must contain your primary domain (subdomains are allowed). Choose this for printers, scanners and apps that send from addresses such as
[email protected]or[email protected]that belong to no user. Google says this option is useful exactly for third-party or custom applications. - Any addresses (not recommended) — the sender can be any address, including addresses outside your domain. Google labels this “not recommended” because it makes you more vulnerable to abuse, from malicious software on your users’ devices or from incorrect SMTP settings. Do not pick it to make the error go away: it trades a visible failure for an open relay, and if you do use it while sending from a domain you do not own, or with an empty envelope-from, Google requires SMTP authentication or your own domain in HELO — and silently rewrites the envelope sender to
postmaster@your-domain.
- Choose the authentication method — one or both. Tick at least one of the two boxes: “Only accept mail from the specified IP addresses” (Step 2) or “Require SMTP Authentication” (Step 2’s alternative). You may tick both — a connection that passes either one is accepted. Note the hard rule Google states: without TLS encryption you cannot use SMTP authentication at all, and must use IP address authentication.
- Decide on TLS. Tick Require TLS encryption if your device supports it — and it should. Google’s warning is blunt: if your server does not support TLS and you tick this box, messages not sent over an encrypted connection are rejected. An old device that cannot do TLS must use IP authentication on port 25, 465 or 587 without TLS, and must not have this box ticked.
- Save — and then wait. Click Save. Google says changes can take up to 24 hours but typically happen more quickly. That is the only timing Google publishes for this setting: there is no faster number, and no way to force it. Do not judge the fix until the change has had time to apply; re-testing in the first hour and changing something else is how a correct fix gets undone.
Step 2 — Register the IP, or switch to SMTP authentication
This is the fix for most 550 5.7.0 failures: the IP Google sees is not the IP in the setting. There are two ways to pass this check, and you only need one of them to work.
- Register the public IP (the IP-authentication route). In the relay setting, under “Only accept mail from the specified IP addresses”, click Add, enter a description and the IP address or range in IPv4 or IPv6 format, and click Save. Use your own public IP address — the one you found in Step 0, step 3. Google allows up to 65,536 IP addresses in one range, but its own advice is to keep the range as small as possible for security: register the exact egress IP, not a whole subnet, unless the egress genuinely moves inside that range. Check the Enable box is ticked for the entry — a disabled entry does not count.
- If the IP keeps changing, stop chasing it. A server behind NAT with a dynamic public IP, a cloud VM whose egress IP changes on restart, or a device that sometimes sends over IPv6 and sometimes over IPv4 will keep breaking IP authentication. The durable fix is to tick Require SMTP Authentication instead (or as well): the device then authenticates with a Workspace user’s full email address and password over a TLS connection, and the IP no longer matters. Google’s own printer and scanner page says the same thing in plainer words — dynamic IP addresses may require authentication, and a static IP may be needed for IP-based auth. Do not register a wide range to cover a moving IP: that is the same open door as “Any addresses”, just drawn wider.
- Use SMTP authentication correctly. Authentication requires a TLS connection — port 587 with STARTTLS or port 465 — and the username must be the full Workspace address of a real user (for example
[email protected]), with that user’s password. That user must be assigned a Google Workspace licence that allows Gmail, and if the account has 2-Step Verification turned on, the device needs an app password, not the account password. A dedicated Workspace user created only for this purpose is the tidy choice: it keeps one device’s credentials out of a person’s mailbox, and lets you revoke the relay without touching anyone’s sign-in. Note that Google no longer supports less secure apps — a device that tries to sign in with a plain username and password against the relay without TLS will fail, and that is by design. - Check for the IPv6 trap. The relay setting accepts IPv4 and IPv6 entries, and Google matches the address the connection actually arrives from. If you registered the IPv4 address but the server prefers IPv6 when it connects, Google sees an unregistered IPv6 address and answers 550 5.7.0. Either register both addresses, or force the device to connect over IPv4. The bounce text quotes the IP Google saw — compare it character for character with the entry in the setting before assuming the entry is wrong.
Step 3 — Fix the HELO name and the envelope sender
Even with the right IP registered, Google still has to identify which domain the mail belongs to — and it reads that from two places: the HELO (or EHLO) greeting and the MAIL FROM envelope sender. Google’s relay error page says it plainly: “Please ensure that the sending client uses an appropriate value for both the HELO command; ideally, the fully qualified domain name (FQDN) of the sending device, and that the SMTP sender (MAIL FROM:) identifies the send address properly”.
- Set a real HELO/EHLO hostname. On the sending server or device, set the hostname it announces to a fully qualified name in one of your Workspace domains — for example
mail.example.comor the server’s own name under your domain. Google’s relay page recommends servers present unique identifiers in HELO or EHLO, and names the two generic values to avoid:localhostandsmtp-relay.gmail.com. A server that saysEHLO localhost, or an internal cloud name such asip-10-0-0-5.ec2.internal, gives Google nothing it can link to your account — and Google’s error list has a dedicated rejection for it (501 5.5.4, “HELO/EHLO argument invalid”, or “Empty HELO/EHLO argument not allowed”). - Make MAIL FROM an address in your own domain. The envelope sender — the address in the SMTP
MAIL FROM:command, which is usually not the address shown in the From: header — must be an address on a domain registered in your Workspace account, and must match the Allowed senders option you chose in Step 1. If you chose “Only addresses in my domains”, a MAIL FROM on any other domain fails, even from a registered IP. Check this in the sending app’s settings: the “sender” or “from address” field is often the From: header, not the envelope sender, and the two can differ — the bounce quotes the envelope sender, so trust the bounce over the settings screen. - Fix the 550 5.7.1 “Invalid credentials for relay” variant here. That error means the IP you registered does not match the domain the mail claims to be from. Google’s own fix is one of two things: configure the server to use SMTP authentication to identify the sending domain, or present one of your domain names in the HELO or EHLO command. In practice that means: either turn on SMTP authentication (Step 2, step 3) so Google knows the domain from the login, or fix the HELO name (step 1 above) so Google can read the domain from the greeting. Registering more IPs will not fix this one — the IP is fine; the domain identification is not.
- Mind the empty envelope sender. Bounce messages and out-of-office replies are sent with an empty envelope sender (
MAIL FROM: <>). If you use the “Any addresses” option and send such mail, Google’s own note says to use SMTP authentication or present your domain in HELO — otherwise Google cannot identify the sending domain at all. The relay also does not support multiple envelope recipients with a null envelope sender. If your system sends automated bounces through the relay, SMTP authentication is the reliable route for them.
Step 4 — Point the device at smtp-relay.gmail.com
The Admin console half is done. Now the device half: the server, printer or app must actually connect to the relay, on a port Google accepts, with the encryption the setting expects.
- Set the server and port. Host:
smtp-relay.gmail.com. Port: 587 if you are using TLS (the right choice in almost every case); 465 is also accepted with TLS, and without TLS Google accepts ports 25, 465 or 587. Google states the split on the relay page — TLS → 587; no TLS → 25, 465 or 587 — and its printer/scanner/app page lists the same three ports (25, 465 or 587) for the relay — but without TLS you cannot use SMTP authentication, only IP authentication. If your network blocks outbound port 587, that is a firewall fact to fix on your side, not a Google setting: 465 is the fallback for a TLS-capable device. - Match the encryption to the setting. If you ticked “Require TLS encryption” in Step 1, the device must connect with TLS or Google rejects the mail. If the device cannot do TLS, untick that box — but then you must use IP authentication, and the IP registration in Step 2 has to be exact. The commonest self-inflicted failure here is a device set to “no encryption” against a setting that requires TLS, or a device set to TLS against a server that never completes the handshake. Google’s error list has a specific code for the first of those two failures (530 5.7.0, “Must issue a STARTTLS command first”).
- Set the connection the way the server expects. For an on-premise mail server, the relay host is the smart host / relay host: in Postfix, for example, that is
relayhost = [smtp-relay.gmail.com]:587in the main configuration, with TLS enabled and, if you use SMTP authentication, the Workspace credentials in the password map. For Exchange, the send connector’s smart host is the fully qualified domain namesmtp-relay.gmail.com. The exact clicks differ by product and Google does not document third-party products — use the vendor’s documentation for the clicks, and this guide’s values for the fields. Do not copy a configuration that points atsmtp.gmail.comand change only the hostname: the authentication and the limits are different, and asmtp.gmail.comconfiguration carried over unchanged will authenticate as a user against a relay that expects an IP or a relay login. - Keep connections open instead of re-authenticating every message. Google’s relay error page advises reusing open SMTP connections across messages rather than opening a new connection and running AUTH for every message — connections to the relay can stay open for up to 10 minutes — and sending RSET followed by MAIL FROM for each further message. A device that logs in again for every single message can trip Google’s temporary sign-in limits (454 4.7.0, “too many sign-in attempts”), which looks like a relay failure but is a connection-hygiene failure. If your device sends in bursts, this is the step that stops the second wave of failures after the first one is fixed.
Step 5 — Check SPF and DKIM for the sending domain
The relay will now accept your mail — but acceptance is not delivery. Mail that leaves through Google still has to pass the authentication checks the recipient’s server runs, and Google’s own sender guidelines require every sender to authenticate with SPF or DKIM. A relay fix that leaves authentication broken trades a 550 5.7.0 for a 550 5.7.26 or 5.7.27 on the other side.
- Check SPF authorises Google. Your domain’s SPF record must include Google’s sending servers — the standard entry is
include:_spf.google.com— because the mail leaves through Google’s servers, not through your device’s IP. If your SPF record lists only your own server’s IP, mail relayed through Google fails SPF at the recipient. Our Google Workspace SPF, DKIM and DMARC guide for Cloudflare shows the exact record; the same record value applies on any DNS host. If SPF already fails, our Gmail 550 5.7.26 unauthenticated guide explains what the recipient sees. - Turn on DKIM for the domain in Workspace. DKIM signing is a Workspace setting, not a relay setting: generate the DKIM key in the Admin console and publish the TXT record it gives you. Once DKIM is on for the domain, outgoing mail from that domain — including mail sent through the relay — is signed with your domain’s key, which is what lets the recipient verify the mail really came from you. If DKIM is off, relayed mail goes out unsigned and depends on SPF alone.
- Keep DMARC in view, but do not fix it here. DMARC alignment is what ties SPF and DKIM to the From: address the recipient sees. A relay setup that sends from an address whose domain has no DMARC record, or a record that does not align, will still be rejected by Gmail for bulk mail (550 5.7.40 for a missing DMARC record). That is a DNS fix, not a relay fix — our DMARC aggregate report guide shows how to read what is actually happening, and the p=none to p=quarantine guide covers tightening the policy once the reports are clean.
Prove it worked
Do not trust a settings screen — a saved relay setting and a registered IP are not a working relay. Prove each part separately, in this order:
Still not working? Work this ladder in order
- “550 5.7.1 Invalid credentials for relay”. The IP is registered, but it does not match the domain the mail claims to be from. Use SMTP authentication to identify the sending domain, or present one of your domain names in HELO/EHLO. Registering more IPs will not fix this — it is a domain-identification failure, not an IP failure.
- Bare “550 5.7.0 Email sending denied”, no “invalid credentials” line. Google’s own error list gives no cause for this variant beyond a pointer to the relay error page, so there is no official text to decode. Check the two things secondary write-ups associate with it: that the sending account is enabled (not suspended or disabled) and that it is registered in your Workspace domain. If both are true and the error persists, use Email log search in the Admin console — Google says relay errors that reached its servers can be traced there — and raise it with Google Workspace support with the log entry in hand.
- “Email relay denied … temporarily suspended due to abuse”. That is the second 5.7.0 variant in Google’s error list, and it is not a settings problem: the sending account has been temporarily suspended for abuse. No relay change clears it. Check Google’s spam policy in Gmail and the abuse notification Google sends to your super administrators, and stop the mail that triggered it before asking for the suspension to be lifted.
- 550 5.4.5 or 450 4.2.1 — a limit, not a denial. “Daily SMTP relay limit exceeded for user” (550 5.4.5) means one sender passed 10,000 messages in 24 hours; “Peak SMTP relay limit exceeded for customer” (450 4.2.1) is temporary and means the organisation hit its peak rate — Google says to wait and let it clear. “Your message has too many recipients” means one transaction carried more than 100 recipients: split it across transactions. None of these is fixed by re-registering the IP. Our Gmail 550 5.4.5 daily sending limits guide covers the limit family in full.
- 454 4.7.0 — too many sign-in attempts, or a temporary problem. Google’s relay error page gives three remedies: reuse open SMTP connections across messages instead of logging in for every message (connections can stay open for up to 10 minutes), retry with exponential backoff instead of hammering sign-in in a loop, and verify the TLS, IP allowlist and SMTP authentication settings all agree. This is a temporary (4xx) error — queuing and retrying is correct; changing the relay setting in response is not.
- It worked yesterday and stopped today. The setting did not change itself — something on your side did. Check, in order: the public egress IP (a new NAT mapping, a restarted cloud VM, a failover to a second internet line, or an IPv6/IPv4 flip); whether someone saved a change to the relay setting (which then needs up to 24 hours to apply); whether the SMTP authentication account’s password changed or its app password was revoked; and whether the account hit its 10,000-a-day relay limit. The bounce quotes the IP Google saw — if it is not the IP in the setting, you have found it.
- Mail loops (554 5.4.6, “message exceeded 50 hops”). The message passed through more than 50 mail servers, which almost always means a routing loop — very often mail that originates from Gmail being routed out and back through the relay. Google warns against exactly this pattern and gives it best-effort support only. Fix the routing so Gmail-originated mail does not pass through the relay, rather than widening the relay setting to accommodate the loop.
- The device cannot do TLS at all. Then use IP authentication without TLS: ports 25, 465 or 587, no SMTP authentication, IP registered exactly, and the “Require TLS encryption” box unticked — the relay still sends to anyone, inside or outside your organisation. The restricted Gmail SMTP server (
aspmx.l.google.com, port 25) is the separate Gmail-only fallback: it delivers only to Gmail and Workspace addresses, and its IP must be allowlisted with SPF covering it.
Mistakes that make it worse
| Mistake | What happens |
|---|---|
| Registering the device’s private LAN address (192.168.x.x, 10.x.x.x) | Google never sees that address, so the registration matches nothing and the 550 5.7.0 stays exactly as it was. |
| Picking “Any addresses” to make the error go away | You trade a visible refusal for an open relay: anyone on a registered IP can now send as any address, and Google says this makes you more vulnerable to abuse. Use the narrowest option that works. |
| Leaving HELO as localhost or an internal hostname | Google cannot link the connection to your domain, and its error list has a dedicated rejection (501 5.5.4) for an invalid or empty HELO argument. |
| Fixing the relay when the device points at smtp.gmail.com | The relay setting is never consulted for smtp.gmail.com logins — the error there is 535 5.7.80 or 534 5.7.90, and the fix is the login, not the relay. |
| Changing two settings at once, minutes apart | Relay changes take up to 24 hours to apply, so you can no longer tell which change fixed it — or which one broke it. One change, one wait, one test. |
| Registering a wide IP range to cover a moving egress IP | Same open door as “Any addresses”, drawn wider. Use SMTP authentication instead — the IP then stops mattering. |
| Sending Gmail-originated mail back through the relay | Mail loops (554 5.4.6), excessive quota use and increased security risk — Google gives this pattern best-effort support only. |
| Judging the fix from Gmail’s web interface | Gmail web mail never touches the relay, so a successful send from the browser proves nothing about the device. Test from the device itself. |
FAQ
Why does the relay say “Mail relay denied” when my password is right?
Because the relay is probably not checking your password at all. If the setting uses IP authentication, Google matches the connection’s IP address against the registered list — your password never enters into it, and a correct password cannot fix an unregistered IP. Either register the IP Google sees, or tick “Require SMTP Authentication” so the relay does check the login (over TLS, port 587). If authentication is already on and the password is right, check the account itself: it must be an active Workspace user with a licence that allows Gmail, and if 2-Step Verification is on, the device needs an app password.
Can I use the SMTP relay without a static IP address?
Yes — by using SMTP authentication instead of IP authentication. IP authentication needs the public IP to stay the same, so a dynamic IP, a NAT setup that changes the egress address, or a cloud server that gets a new IP on restart will keep breaking it. Tick “Require SMTP Authentication” in the relay setting and give the device a Workspace user’s address and password over a TLS connection (port 587). Google’s own printer and scanner page says the same thing: dynamic IP addresses may require authentication, and IP-based auth may need a static IP.
Which Allowed senders option should I choose?
The narrowest one that covers your senders. “Only registered Apps users in my domains” if every sender is a real Workspace user. “Only addresses in my domains” if printers, scanners or apps send from addresses in your domain that belong to no user — Google says this option exists exactly for third-party or custom applications, and subdomains are allowed. “Any addresses” is Google’s own “not recommended” option: it lets any address send, makes you more vulnerable to abuse, and if you send from a domain you do not own it silently rewrites the envelope sender to postmaster@your-domain. Never pick it just to clear the error.
My relay worked yesterday and stopped today. What changed?
Usually the egress IP. A new NAT mapping, a restarted cloud server, a failover to a second internet connection, or a flip between IPv4 and IPv6 all change the address Google sees — and the bounce text quotes the address it saw, so compare it with the entry in the relay setting before changing anything. The other candidates, in order: someone saved a change to the relay setting (which takes up to 24 hours to apply); the SMTP authentication account’s password or app password changed; or the sender hit the 10,000-messages-a-day relay limit (which shows as 550 5.4.5, not 5.7.0).
Should I use smtp-relay.gmail.com or smtp.gmail.com?
Use the relay (smtp-relay.gmail.com) for devices, servers and apps — anything that sends from your domain without signing in as a person. It is admin-managed, authenticates by IP address or by SMTP authentication as a Workspace user, sends to anyone inside or outside your organisation, and allows 10,000 messages per user per 24 hours. Use the Gmail SMTP server (smtp.gmail.com, port 465 or 587) for a single user’s mail client or app that can sign in as that user with an app password or OAuth — it caps at 2,000 messages a day and needs no Admin console setting. If the device cannot authenticate at all and only needs to reach Gmail addresses, the restricted server (aspmx.l.google.com, port 25) is the third option, but it cannot send to the outside world.
Does the relay add SPF, DKIM or DMARC for me?
No. The relay moves the mail; authentication is still yours. Your domain’s SPF record must include Google’s servers (include:_spf.google.com) because the mail leaves through them, DKIM must be turned on for the domain in Workspace so outgoing mail is signed, and DMARC is a DNS record you publish yourself. A relay that accepts your mail but sends it without SPF or DKIM will see it rejected at the recipient with 550 5.7.26 or 5.7.27 — the relay fix and the authentication fix are two different jobs, and this guide does both in order (Steps 1–4, then Step 5).
How long do Admin console relay changes take to apply?
Google says changes can take up to 24 hours but typically happen more quickly. That is the only timing Google publishes for this setting — there is no faster number, and no way to force it. Save once, wait, then send one test message from the device. If it still fails after 24 hours, the setting was not the problem: work the ladder, starting with the IP Google actually sees and the HELO name the server announces.
Sources
Google Workspace Admin Help — Route outgoing SMTP relay messages through Google (relay setup; Allowed senders options; IP and SMTP authentication; TLS; ports 25/465/587; 10,000 messages and 10,000 unique recipients per user per 24 hours; 100 recipients per transaction; organisation limits 4.6 million per 24 hours and 319,444 per 10 minutes; HELO unique-identifier recommendation; top-level organisation only; changes up to 24 hours; trial limits lower) · Google Workspace Admin Help — SMTP relay service error messages, last updated 26 October 2026 (Mail relay denied; Invalid credentials for relay; HELO FQDN and MAIL FROM requirements; daily and peak limit errors; 100-recipient limit; 454 4.7.0 connection reuse up to 10 minutes; Email log search tracing) · Google Help — Gmail SMTP errors and codes (exact 550 5.7.0 texts, three variants; 550 5.7.1 Invalid credentials for relay; 501 5.5.4 HELO/EHLO argument invalid; 530 5.7.0 Must issue a STARTTLS command first; 550 5.4.5 daily relay limit; 450 4.2.1 peak relay limit; 535 5.7.80 and 534 5.7.90 login codes) · Google Workspace Admin Help — Send email from a printer, scanner, or app (the three sending options compared; relay recommended and most secure; 2,000 messages a day for smtp.gmail.com; aspmx.l.google.com port 25, Gmail and Workspace addresses only; dynamic IP note; SPF for the restricted server). Secondary, labelled and never load-bearing — oowiz on the 550 5.7.0 fix (IP, HELO, SMTP AUTH; DKIM signing of relayed mail; SPF including _spf.google.com); Omnivery on relay setup and limits (September 2026 review).
Did this fix work for you?
Your reaction is stored only in your own browser — it is not sent to us.