5.1.7: sender address is malformed
The sender address in the envelope (MAIL FROM) is written in a way the receiving server cannot accept, so it refused the message.
- Standard
- Provider
- Permanent (5xx)
- Class
- Sources checked
- Author
At a glance
- Code
- 5.1.7
- Provider
- Standard SMTP codes
- Temporary or permanent
- PermanentRefused for good: the message comes back to the sender, and resending it gets the same answer.
- Who has to act
- The sender. The fix is on the sending side: your domain, your server or your list.
- What the server says
5.1.7 Bad sender's mailbox address syntax
What it means
5.1.7 is the sender-side twin of 5.1.3. The server parsed the MAIL FROM address, the return path that bounces go to, and found it malformed: a missing domain, characters that are not allowed, unbalanced brackets, or a bare name with no @. RFC 3463 ties it to no class, but a syntax problem will not fix itself, so it is nearly always 5.1.7 and the message is returned. The envelope sender is set by the sending software or service rather than by the person writing the message, so the fix almost always lies in the sending configuration.
Common causes
- A sending application or script that builds MAIL FROM without angle brackets or without a domain.
- A return path set to a display name or to an unqualified local name such as root.
- Non-ASCII characters in the sender address, sent to a server without SMTPUTF8 support.
How to fix it
- 01Look at the MAIL FROM (Return-Path) address in the bounce or in your sending logs.
- 02Set the envelope sender in your mail software or service to a full address at a domain you own.
- 03Make sure your code writes it as MAIL FROM:<user@example.com>, with angle brackets.
- 04Send a test to a mailbox you control and read its Return-Path header to confirm the fix.
Sources
What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.
Related codes
- 5.1.8Sender domain cannot receive mail.The domain in the sender address does not exist or cannot accept mail, so the receiving server refuses a message whose bounces could never be returned.
- 5.1.3Recipient address is malformed.The recipient address breaks the rules for how an email address must be written, so the server refused it before checking whether it exists.
- 501Syntax error in arguments.The command was recognised, but what came with it was malformed, often an address or a host name the server cannot accept.
- 553Mailbox name not allowed.The server refused the address because the mailbox name is not allowed there, most often because it is written incorrectly.
5.1.7 at other providers
All 105 standard codesEvery code in the wikiPaste your own bounce