Manage quarantines in Exchange - O365 - Outlook

MailCleaner Support
Added over 3 years ago

Manage quarantines in Exchange - O365 - Outlook

If you do not want to manage quarantines on MailCleaner, but prefer to deliver Spams and Newsletters in specific Exchange Mailbox folders, you can do it!

1) You need to create the folders you want in the user's mailboxes.
In this example:
"Spambox" for messages recognized as Spam
"Newsletter" for messages recognized as Newsletter

2) you need to create "Mail flow rules in Exchange Server".
You can create these rules user by user through the OWA or with PowerShell


For Spam

For Newsletter

With Powershell

For Spam:

New-InboxRule -Name "spamrule" -Mailbox j.doe -MoveToFolder 'j.doe@dstdomain2.lan:\Spambox' -SubjectContainsWords "{Spam?}" -StopProcessingRules $True

For Newsletters:

New-InboxRule -Name "newsletter" -Mailbox j.doe -MoveToFolder 'j.doe@dstdomain2.lan:\Newsletter' -SubjectContainsWords "X-Newsl: is newsletter" -StopProcessingRules $True

You can verify your rules with Powershell:

Get-InboxRule -Mailbox j.doe@dstdomain2.lan

You can also see the rules in Outlook

3) You need to configure your MailCleaner

You can configure each user or the default for one domain or the Domain default settings
Domain configuration:
In "Configuration" – "Domain" – yourdomain – "Preferences"
Select Action on spams : tag
Subject spam tag : {Spam?}
In "Configuration" – "Domain" – yourdomain – "Filtering"
Allow newsletters by default : Selected

If users already changed their preferences and want to benefit from this feature, they need to change their own configuration settings:


As the spams and newsletters will be delivered to your users, they won't be able to use MailCleaner's web interface for adjustment requests.
To report false positives, they need to transfer the mail as an attachment to

In the case of messages identified both as Spam and Newsletter the first Outlook rule is applied.

The rules generation from OWA should also work fine in O365 configuration

Rules management documentation:


This documentation is provided in order to help you setting up MailCleaner in a more comfortable way for your users.
However, MailCleaner is not responsible for any issues related to Microsoft products.

MC Team 2021

EXCH-rules.png (5.69 KB)

EXCH-rules-list.png (9.68 KB)

MC-rules.png (49.9 KB)

Outlook-newsl-rules.png (45.9 KB)

Outlook-rules.png (46.3 KB)

OWA-newsl-rules.png (42.5 KB)

OWA-rules.png (39.5 KB)