Is there a way for an SMTP server to tell an MTA that a user has moved to a new address?
There are many SMTP return codes, including for common situations like Mailboxes being full, the address not existing, the message being rejected etc.
Is there currently, or is there a proposal, to allow a server to respond to incoming mail with an error code that the user has changed email addresses and is now available at a new domain?
Again, draft proposals are OK. I've looked in RFC 5321 section 4.2.3 and perhaps '251: user not local will forward' works but I'm not sure how email practically works in 2020.
Use case: users migrating between email providers is a common scenario and I can imagine having a grace period (where the old provider lets incoming MTAs know the user has moved to another address) has probably been discussed before.
Example a user was [email protected], but has have moved to bar.com. foo.com is happy to let incoming connections know that this identity is now at a different domain, and that senders should update their address books, for some period of time (say 12 months), before foo.com no longer provides any service for this identity at all.
There are such status codes for both
251 User not local; will forward to <forward-path>
) and551 User not local; please try <forward-path>
)but they are intended for the mail user agents (MUA), not for other MTAs.
The RFC 5321, 3.4 Forwarding for Address Correction or Updating explains these standard response codes that do have the ability to inform the sender about the new address. Emphasis is mine.
The reality is that email addresses aren't really updated by the MUAs based on these status codes, probably because their authenticity has been hard to prove. I haven't seen these response codes widely in use anywhere, either.
There are also practical problems with automatic email address updates, as well as forwarding:
If a user has changed the address because the old address gets a lot of spam, it wouldn't be wise to disclose the new contact information. That's for personal email addresses.
With business email addresses the probable reason for address change is that the user has got a new job from another employer.
There's a problem to distinguish whether the email is addressed to the person or to his/her former position in the company. There would be a need to publish two new addresses, and that really can't be done with these error codes, as automatic update would be impossible without human desicion.
The old employer doesn't necessarily even know the new address. Furthermore, it might not be wise to point the clients to this new address, as it might point them towards a competitor.
Usually a sender will conclude that the person doesn't work there anymore, if the email just bounces with
550 mailbox unavailable
. Then, they will Google for a suitable address for their contact.If you want to distinguish a mailbox that never existed from a mailbox that once existed but has been removed, you could use e.g. RFC 3463 extended status code
X.1.6
:Finally, as mentioned in RFC 5321, 2.3.7:
It would be wise to add a human readable explanation, e.g.