how to disable junk filter on exhcange 2013

hi all,

we recently migrated a few mailboxes from ex2010 to ex2013, since then some mails in the newly migrated boxes start receiving valid mails to their junk folder.

in 2010 we completely disabled the junk filters and denied users from accessing the junk menu in outlook 2010 through gpo.

ive ran the command:

Set-MalwareFilteringServer <Server_Name> -BypassFiltering $True

on both my server (i have DAG), my first question - do i need to restart any service in order to apply the changes?
if not, how can i disable the junk filter entirely? (we have a different system for that)

thanks for the time and help,

Sean

May 7th, 2015 8:39am

Hi Sean,

You might have already seen, but here this the info:

Disabling or enabling malware filtering restarts the Microsoft Exchange Transport service on the server. This may temporarily disrupt mail flow in your organization.

  Bypassing or restoring malware filtering doesn't require you to restart any services. However, changes to the setting may take up to 10 minutes to take effect.

  Disable or bypass anti-malware scanning

  To verify that malware filtering is being bypassed, run the following command and confirm that it returns a value of True:

Get-MalwareFilteringServer | Format-List BypassFiltering

Hope its applied correctly.

Now Junk Filtering is more of a SPAM filtering.

You can configure specific anti-spam settings on individual mailboxes that are different than the anti-spam settings that are applied to the rest of the mailboxes in your Exchange organization. When you configure an anti-spam setting on a mailbox, that setting overrides the corresponding organization-wide content filtering or organization configuration anti-spam setting.

This example sets the organization's junk email threshold to 5.

Set-OrganizationConfig -SCLJunkThreshold 5

This example enables the SCL quarantine threshold with a value of 7 on all mailboxes in the Users container in the Contoso.com domain:

Get-Mailbox -OrganizationalUnit Contoso.com/Users | Set-Mailbox -SCLQuarantineEnabled $true -SCLQuarantineThreshold 7 -AntispamBypassEnabled $true -SCLJunkEnabled $true 

The Junk Email Folder SCL threshold value behaves differently than the SCL delete, reject, and quarantine values. For more information, see Spam Confidence Level Threshold.

SCLJunkEnabled

This parameter enables or disables delivering a message to the user's Junk Email folder when the SCL value of the message is greater than the value specified by the SCLQuarantineThreshold parameter. Valid input for this parameter is $true, $false, or $null.

 

Note that junk email filtering is enabled by default for all user mailboxes in the organization. By default, the Enabled parameter is set to the value $true on the Set-MailboxJunkEmailConfiguration cmdlet for all user mailboxes.

This example lists the junk email rule configuration for all mailboxes in your organization that have the junk email rule enabled and sets it to false.


Get-MailboxJunkEmailConfiguration -Identity * | Where {$_.Enabled -eq $true} | Set-MailboxJunkEmailConfiguration Enabled $false

Get-MailboxJunkEmailConfiguration -Identity * | Where {$_.Enabled -eq $true}

This example identifies any mailboxes for which the junk email rule is configured to treat contacts as trusted senders and then changes the junk email configuration to not treat contacts as trusted senders.

Get-MailboxJunkEmailConfiguration * | Where {$_. ContactsTrusted -eq $true} | Set-MailboxJunkEmailConfiguration  ContactsTrusted $false

References:

Set-MailboxJunkEmailConfiguration

https://technet.microsoft.com/en-us/library/dd979780(v=exchg.150).aspx

Get-MailboxJunkEmailConfiguration

https://technet.microsoft.com/en-us/library/dd979784(v=exchg.150).as

May 8th, 2015 5:07am

You are confusing anti-malware with anti-spam.

Anti-Malware does not make use of the Junk Folder so using Set-MalwareFilteringServer will make no difference.

You need to learn about the Exchange Content Filter. This is the one making use of the Junk Folder.

If you dont want ANY anti-spam functionality you can simply run:
uninstall-antispamagents.ps1

If you want to learn more the Exchange anti-spam functionality check this video series:
http://www.windeveloper.com/imftune/tutor/vid9_ex13_antispam.htm

May 14th, 2015 9:43am

Hi Sean,

Any updates?

Free Windows Admin Tool Kit Click here and download it now
May 18th, 2015 1:45am

Hi Satyajit,

first thank you very much for all the time and help :D

regarding the post on the confusion between malware and anti-spam: anti span is not installed at all on server, running: 

Get-TransportAgent

returns:

Identity                                      Enabled         Priority
--------                                           -------         --------
Transport Rule Agent                     True            1
Malware Agent                               True            2
Text Messaging Routing Agent       True            3
Text Messaging Delivery Agent       True            4

so no spam filter is enabled. but users still complain about mails getting into junk mail and even more strange - when they move the mail from the junk folder to their inbox for example, it returns to the junk folder a few seconds after (i saw it with my eyes as i never believe the user... ^^) i checked and the user has no rules (client or server side) that would do this move...

any ideas?

again thank you for all your help

Sean.

May 18th, 2015 6:50am

Hi Sean,

Please run the get portions of commands from my earlier post and let us know what does it show.

Also let us know, if you go to user's Outlook Junk Email Options, what are selected across all tabs.

In Mail, on the Home tab, in the Delete group, click Junk, and then click Junk E-mail Options.

https://support.office.com/en-in/article/Change-the-level-of-protection-in-the-Junk-Email-Filter-e89c12d8-9d61-4320-8c57-d982c8d52f6b

Free Windows Admin Tool Kit Click here and download it now
May 18th, 2015 8:23am

From this: "when they move the mail from the junk folder to their inbox for example, it returns to the junk folder a few seconds"

...I believe the problem here is being caused by 3rd Party Software.

What email hygiene software are you using? Did you check with them regarding this problem?

May 18th, 2015 8:36am

hi Stayajit

i ran: Get-OrganizationConfig | fl scljunkthreshold the result is 8, ive read the links regarding scl but i could not figure if a high number means alot of mail ending up in the junk or not...

also i saw all mailboxes are set to: ContactsTrusted  : False

but if no spam filters are installed why am i getting mails into the junk folder? 
when i run: Get-MailboxJunkEmailConfiguration i see that it is enabled... i do not understand where is the "main switch" :)

thanks for the help

Sean

Free Windows Admin Tool Kit Click here and download it now
May 19th, 2015 2:13am

Hi Sean,

If you want to disable it, everything should be false at all places.

Please set all these and confirm if it works, you might want to limit it to single mailbox to test.

Get-MailboxJunkEmailConfiguration -Identity * | Where {$_.Enabled -eq $true} | Set-MailboxJunkEmailConfiguration Enabled $false

Get-Mailbox -ResultSize Unlimited | Set-Mailbox -SCLQuarantineEnabled $false -AntispamBypassEnabled $true -SCLJunkEnabled $False  

In Mail, on the Home tab, in the Delete group, clickJunk, and then click Junk E-mail Options. NONE and no entries in the other tabs.
May 19th, 2015 6:47am

worked like a BAUS! :D ty ty ty :D

seems that those fields were not defined at all (blank value), by setting them values caused the mailbox to stop throwing mails into the junk folder 

thank you very much for all the help and time!

have a great day

Sean

Free Windows Admin Tool Kit Click here and download it now
May 20th, 2015 6:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics