5.1.3
SMTPERRORNotableAddressingHIGH confidence

Bad destination mailbox address syntax — malformed email address

Production Risk

Low for single messages; indicates a systemic data quality problem if occurring in bulk.

What this means

The recipient email address is syntactically malformed and cannot be parsed by the receiving mail system. The address does not conform to RFC 5321 / RFC 5322 address syntax.

Why it happens
  1. 1The address is missing the @ symbol.
  2. 2The local part or domain contains illegal characters.
  3. 3The address was truncated or corrupted before delivery.
How to reproduce

Client submits a RCPT TO command with a syntactically invalid address.

trigger — this will error
trigger — this will error
RCPT TO:<not-an-email-address>
# Server returns:
501 5.1.3 Invalid address format

expected output

501 5.1.3 ...

Fix

Validate email address syntax at input

WHEN At the point of user input or list import

Validate email address syntax at input
// RFC 5322 compliant validation (Node.js example)
const emailRegex = /^[^s@]+@[^s@]+.[^s@]+$/;
if (!emailRegex.test(address)) {
  throw new Error('Invalid email address syntax');
}

Why this works

Syntactic validation before sending prevents malformed addresses from reaching the MTA.

What not to do

Pass user-supplied addresses directly to RCPT TO without validation

Malformed addresses cause immediate 5xx rejections and can expose injection vulnerabilities.

Sources
Official documentation ↗

RFC 3463 — Enhanced Mail System Status Codes

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All SMTP errors