Forum Discussion
How to resolve Junk email validation error
I tried the commands below and it worked on my end.
See screenshot below.
- set-mailboxjunkemailconfiguration -identity email address removed for privacy reasons -TrustedSendersAndDomains @{Remove="email address removed for privacy reasons"}
I went ahead and add the address to multiple mailbox safe senders list and I was able to remove the address from the list for multiple mailboxes using the command below.
- get-mailbox -ResultSize unlimited | Set-MailboxJunkEmailConfiguration -TrustedSendersAndDomains @{remove="email address removed for privacy reasons"}
Please confirm if this helps.
If I have answered your question, please mark your post as Solved If you like my response, please give it a Like Appreciate your Kudos! Proud to contribute! 🙂 |
Deleted
Thank you for your response.
I created a PowerShell script that processes all of the licensed mailboxes using a method similar to the one in your post. The command completes successfully for all but 20 of the 5200 mailboxes. I ran the commands as shown to reduce the time it takes for the script to complete.
My current working theory is that the Outlook application allows end users to add domain accounts to their mailboxes that PowerShell (and OWA) would block. Since those entries exist the PowerShell command fails, even when its trying to remove the entries. To test this theory I will grant myself access to the mailbox and remove the entries to determine if this clears up the issue.
Thanks again for your response!
- DeletedFeb 11, 2023
Thank you for providing more information on your findings.
I reproduced in my environment and added a domain-like account on Outlook client but it was blocked on OWA. Screenshot below shows the behavior (outlook client on the left and OWA on the right).
I checked further on PowerShell and I was unable to add the domain account. However, I was able to remove the domain account entry. See screenshot below showing the powershell output.
Kindly provide the status of your test. Is it possible to check through one of the affected account and see if that is the case?
If I have answered your question, please mark your post as Solved
If you like my response, please give it a Like
Appreciate your Kudos! Proud to contribute!
- Vince1959Feb 13, 2023Copper ContributorI've done some digging into the data and I think there are 3 issues that could be making this happen.
1. New users have accounts and mailboxes but the TrustedSendersAndDomains data element isn't created until the mailbox is opened for the first time.
2. Some of the users throwing errors have multiple domain entries in their TrustedSendersAndDomains. I think I can parse them into an object I can pass to test the remove process.
3. Some of the users have large lists. I found serval sites that said the limit is 1024 items.
Since the errors represent less than 1% of the users management has decided they can live with the errors and completing error correctio for this project has been moved to the back burner.
Thanks again for the help!