Beringer Associates Technology Blog

Legitimate mail is marked as Junk in Office 365

We recently discovered an issue with Outlook classifying legitimate Emails as junk. Valid emails from clients as well as emails from within our organization were being sent to our junk folder.

 

Mail is classified as Junk in Exchange Online and within the Outlook client separately. We had the Junk Filtering in Outlook disabled before this problem started so for our case we knew it was an issue with Junk Filtering in Exchange Online.

 

To fix this issue in the mean time there are a couple options:

  1. Disable Junk Mail filtering in the Outlook Application
  2. Disable Junk Mail filtering in Office 365 on the individual level
  3. Disable Junk Mail filtering in Office 365 on the Company level with PowerShell

 

 

1: Disable Junk Mail filtering in the Outlook application

To disable Junk Filtering in Outlook, first click on the “Home” tab, then choose Junk and “Junk E-Mail Options.” Then choose your filter level.

 

office 365   Junk Options

 

 

2: Disable Junk Mail filtering in Office 365 on the individual level

To change this setting on the individual level, you will need to login to your Exchange Online account and click the Gear located in the top right.

 

O365 Gear

 

Select “Mail” under My app settings on the bottom.

 

O365 Settings

 

You will then see a selection called “Block or Allow” located here: Mail > Accounts > Block or Allow. Select “Don’t move email to my Junk Email folder” and click Save.

 

O365 Block

 

 

 

3: Disable Junk Mail filtering in Office 365 on the Company level with PowerShell

To apply these settings to your entire organization in Office 365 you will need to login to Exchange Online via PowerShell.

 

To do this, launch Powershell and enter the following to login:

$UserCredential = Get-Credential
 
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
 
Import-PSSession $Session

You can then test your connection by typing the command below. It will display mailbox information if you are connected:

Get-Mailbox

 

Now you are ready to make the change. The command below will turn off Junk Mail filtering for all users in the company. If there are service mailboxes in use that have never been logged into, you will see errors for those accounts when the change is attempted to be applied there. The script will then move on the the next mailbox until completion.

 

Get-Mailbox | Set-MailboxJunkEmailConfiguration –Enabled $False

 

When this function is complete, you will return to the Powershell prompt. To verify your work you can use option two above to login and verify changes have been made to sample users.

 

Beringer Associates is always here to provide expert knowledge in topics like these. Please contact us with any questions you may have.