User not local; will forward to <forward-path>
The 251 code indicates that the recipient is not on the local server, but the server will accept the message and forward it to the correct destination. The sending client's responsibility for delivery ends here.
- 1The recipient address has a forwarding rule set up on the server.
- 2The server is acting as a mail gateway or relay for another mail system.
A client sends an email to an address that automatically forwards to another external email account.
RCPT TO:<old-address@example.com> 251 2.1.5 User not local; will forward to <new-address@another-domain.com>
expected output
251 User not local; will forward
Fix
Treat 251 as successful acceptance and continue the SMTP transaction
WHEN When RCPT TO returns 251 instead of 250
RCPT TO:<forwarded@example.com> 251 User not local; will forward to <real@anotherdomain.com> # Continue with DATA normally
Why this works
251 is a positive 2xx completion reply. The server has accepted responsibility for forwarding. The sending client's job is done; continue with DATA.
✕ Treat 251 as an error or abort the transaction
251 is a success code. Aborting wastes a server-accepted delivery slot and prevents the message from being sent.
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev