Configuring Exchange Server 2010 Anti-Spam Settings for Individual Mailboxes

When the Exchange Server 2010 anti-spam features are enabled and configured they take effect for all mailboxes within the organization.  But sometimes it is necessary to customize the settings for specific mailbox users.

Organization-Wide Anti-Spam Settings

At the organization level there are several anti-spam settings that can be applied.

SCLJunkThreshold – This is the Sender Confidence Level (SCL) score that will cause an email to be delivered to the Junk Email folder of a mailbox instead of the Inbox.  SCL is scored from 0-9 with 9 being the most likely to be spam.  By default the SCLJunkThreshold is set to 4.

[PS] C:>Get-OrganizationConfig | fl SCLJunkThreshold

SCLJunkThreshold : 4

There are also a series of SCL thresholds configured on the Content Filter Agent.

[PS] C:>Get-ContentFilterConfig | fl *SCL*

SCLRejectThreshold     : 7
SCLRejectEnabled       : True
SCLDeleteThreshold     : 9
SCLDeleteEnabled       : False
SCLQuarantineThreshold : 9
SCLQuarantineEnabled   : False

With the default settings shown above a spam message that scores an SCL higher than 7 will be rejected by the Transport server.  A spam message that scores an SCL higher than 4 but not more than 7 will be sent to the mailbox Junk Email folder.

Mailbox-Level Anti-Spam Settings

These anti-spam settings can also be configured on a per-mailbox basis.

[PS] C:>get-mailbox Alan.Reid | fl *spam*,*SCL

AntispamBypassEnabled  : False
SCLDeleteThreshold     :
SCLDeleteEnabled       :
SCLRejectThreshold     :
SCLRejectEnabled       :
SCLQuarantineThreshold :
SCLQuarantineEnabled   :
SCLJunkThreshold       :
SCLJunkEnabled         :

When configured at the mailbox level the settings take precedence over the organization-wide settings.

For example, if the organization has the SCLDeleteThreshold disabled it can be enabled for a specific user.

[PS] C:>set-mailbox Alan.Reid -SCLDeleteEnabled $true -SCLDeleteThreshold 9

[PS] C:>get-mailbox Alan.Reid | fl *spam*,*SCL*

AntispamBypassEnabled  : False
SCLDeleteThreshold     : 9
SCLDeleteEnabled       : True
SCLRejectThreshold     :
SCLRejectEnabled       :
SCLQuarantineThreshold :
SCLQuarantineEnabled   :
SCLJunkThreshold       :
SCLJunkEnabled         :

Note that when enabling a delete, reject, or quarantine for a mailbox you must also specify a threshold between 0-9 at the same time if one has not previously been configured for that mailbox.

Another example would be a user who is requesting a different junk threshold than the rest of the organization if too many spam emails are still reaching their inbox.

[PS] C:>set-mailbox Alan.Reid -SCLJunkEnabled $true -SCLJunkThreshold 3

[PS] C:>get-mailbox Alan.Reid | fl *spam*,*SCL*

AntispamBypassEnabled  : False
SCLDeleteThreshold     : 9
SCLDeleteEnabled       : True
SCLRejectThreshold     :
SCLRejectEnabled       :
SCLQuarantineThreshold :
SCLQuarantineEnabled   :
SCLJunkThreshold       : 3
SCLJunkEnabled         : True

There is also the option to bypass anti-spam filtering for a mailbox completely.  This would be useful for scenarios such as sales or customer service mailboxes where you do not want to risk legitimate email being blocked.

[PS] C:>set-mailbox Alan.Reid -AntispamBypassEnabled $true

[PS] C:>get-mailbox Alan.Reid | fl *spam*,*SCL*

AntispamBypassEnabled  : True

When a mailbox has the anti-spam bypass enabled this isn’t reflected in the organization-wide configuration.

[PS] C:>Get-ContentFilterConfig | fl BypassedRecipients

BypassedRecipients : {}

However you can still locate all such recipients when needed using this shell command.

[PS] C:>Get-Mailbox | where {$_.AntispamBypassEnabled -eq $true}

Name                      Alias                ServerName
----                      -----                ----------
Alan.Reid                 Alan.Reid            ex1
Written by Paul Cunningham

Paul lives in Brisbane, Australia and works as a technical consultant for a national IT services provider, specialising in Microsoft Exchange Server and related messaging systems.

0 Comments

  1. Jose · March 18, 2011

    This is a good info…

  2. U. P. B. Michael · May 2, 2012

    Thanks Paul for this helpful article.

  3. Mohammad Samini · May 18, 2012

    Very useful. Thanks a lot.

  4. L. · July 24, 2012

    Do these settings have any effect if an Edge Transport Server is not implemented within an organization?

  5. Sameh H. · July 30, 2012

    Hi,

    I have all the settings done correctly but the filltering is not working!

    How can i test if this works or not

    Thanks

  6. Aron · November 30, 2012

    Quel qu’un peut-il me dire comment atteindre le réglage de la boite afin que je puisse me débarrasser des indésirables ?
    Merci par avance.

  7. dan · January 22, 2013

    Paul, any idea on how to remove the settings when a specific mailbox has been set different than the organization? Setting it to false, obvisously is a different function than clearing it.

  8. dan · January 22, 2013

    Sorry, figured this out. Use $null on both objects. Thanks for the ariticle though…very helpful.

  9. Ashenafi · May 3, 2013

    It is a very useful info, i was trying to find a solution why messages below the spam score (on our anti spam software) are still routed to the junk email folder

    Thanks!

Leave A Reply