A user complained that valid good email was being sent to the Junk email folder on outlook on the web. To get to the setting, click on the Gear Icon > View all outlook settings > Junk Email. Attempts to uncheck “Only trust email from addresses in my safe senders and domains list and safe mailing lists.” were unsuccessful and we cannot save the setting.
To uncheck the box permanently:
- Open Powershell ISE
- Run function Connect-O365
function Connect-O365{ $o365cred = Get-Credential username@domain.onmicrosoft.com $session365 = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://ps.outlook.com/powershell/" -Credential $o365cred -Authentication Basic -AllowRedirection Import-Module (Import-PSSession $session365 -AllowClobber) -Global }
4. Run the command
Connect-O365
5. Log into Office 365 with Administrator account
Run the command Get-MailboxJunkEmailConfiguration emailaddress – replacing emailaddress with the user mailbox email address. Use other values from microsoft documentation here: https://docs.microsoft.com/en-us/powershell/module/exchange/antispam-antimalware/set-mailboxjunkemailconfiguration?view=exchange-ps
Get-MailboxJunkEmailConfiguration username@emailaddress.com
Results should be similar to below:
Run the following command to set TrustedListsOnly to False:
Set-MailboxJunkEmailConfiguration "email@domain.com" -TrustedListsOnly $false
The checkbox should now be unchecked. Check to see if junk mail now works as intended.