Error context
When using Microsoft 365 or Office 365 to send email to subscribers, I encountered the following error after a few days/weeks:
Delivery has failed to these recipients or groups:
***@*** Your message couldn't be delivered because you weren't recognized as a valid sender. The most common reason for this is that your email address is suspected of sending spam and it's no longer allowed to send email. Contact your email admin for assistance.
The program uses SMTP to send emails to thousands of users.
Root cause
Microsoft/Office 365 detects that I am sending similar emails to many users and marked the account as spam email account.
Resolutions
To fix this issue immediately and temporarily, go to https://security.microsoft.com/restrictedusers and then remove your legit user from the restricted users list.
If you want to whitelist your email account, follow these steps:
- Visit thread policies: https://security.microsoft.com/threatpolicy.
- Click Anti-spam policy.
- Create a outbound policy by clicking '+ Create policy' button and then select Outbound:
- Input a policy name:
- Click Nextbutton.
- Input the user name:
- Click Nextbutton.
- Input outbound protection settings:
As the above screenshot shows, I've changed the restriction policy to alert only.
- Click Nextbutton.
- Review the settings and then click Createbutton to enable the policy.
warning Warning: after this change, your account will be less protected and if the account credential is exposed to others, they may use it to send spam emails without your notice.
References
Remove blocked users from the Restricted users portal in Microsoft 365