Skip to content
iBlockSpam
SMTP error code · Gmail / Google Workspace

553 5.1.7: the sender address is not a valid RFC 5321 address

553 5.1.7 Permanent failure (5xx): the message bounced
By iBlockSpam Team Checked against sources 3 sources How we check our content
What it means

Gmail rejected the message because the sender address your server gave in the SMTP envelope isn't a valid RFC 5321 email address.

What the bounce says
553 5.1.7 The sender address <address> is not a valid RFC 5321 address.

Google's text for 553 5.1.7, with <address> in place of the address the source shows as a placeholder.

What 553 5.1.7 means

Google lists 553 5.1.7 with the text "The sender address address is not a valid RFC 5321 address", where the middle "address" is the address your server sent. RFC 3463 defines X.1.7 as "Bad sender's mailbox address syntax": the sender's address was syntactically invalid. RFC 5321 defines 553 as "Requested action not taken: mailbox name not allowed (e.g., mailbox syntax incorrect)".

The address in question is the envelope sender given in the MAIL FROM command, which can differ from the From header people see. RFC 5321 section 4.1.2 sets its syntax: a local part, an @ and a domain, inside angle brackets. Problems usually come from software that builds the envelope itself: a missing domain (just "www-data" or "root"), a display name sent where only an address belongs, spaces, unbalanced quotes, or a trailing dot.

Web servers, scripts, printers and scanners are the usual sources, because they often fall back to a local user name. Set an explicit, complete sender address in the application or in the mail server's configuration, then send a test.

Likely causes

  • An app or script sends with a bare local user name (no @domain) as the envelope sender.
  • The envelope sender includes a display name, spaces or unbalanced quotes.
  • A typo such as a double @, a trailing dot or a missing domain part.
  • A device such as a printer or scanner with an incomplete sender setting.

How to fix it

If you sent the message

  1. Set a complete sender address (name@yourdomain) in the application, form plugin or device.
  2. On servers, configure the default envelope sender or return-path explicitly.
  3. Check the MAIL FROM value in your mail logs to see exactly what was sent.

If you're the recipient or their admin

  1. No action needed at Gmail: the sending system has to use a valid address.

Frequently asked questions

Which sender address does Gmail check for 553 5.1.7?

The envelope sender your server gives in the SMTP MAIL FROM command, not necessarily the From header shown to readers. Check your mail server logs or the app's settings to see the exact value it sends.

Why does my website or script get 553 5.1.7 from Gmail?

Scripts often send with a local system user such as www-data as the sender, with no domain. Set a full sender address in the script, plugin or server configuration.

Sources

  1. Gmail SMTP errors and codes (Google Workspace Admin Help)
  2. RFC 3463: Enhanced Mail System Status Codes
  3. RFC 5321, section 4.1.2: Command argument syntax

Provider messages are quoted as the provider publishes them. Servers can change their wording, so the bounce you received may differ slightly.