Exchange 2010 Mailbox Junk Email Configuration

Hi Guys, i am attempting to disable a users` JunkMail on a mailbox but i am getting the error below.  Any ideas?

I run this PS command:
Set-MailboxJunkEmailConfiguration -Identity USERNAME -TrustedSendersAndDomains @() -Enabled $False

Which gives this result:
Junk e-mail validation error. Value: ''.
    + CategoryInfo          : NotSpecified: (0:Int32) [Set-MailboxJunkEmailConfiguration], JunkEmailValidationExceptio   n
    + FullyQualifiedErrorId : C7534409,Microsoft.Exchange.Management.StoreTasks.SetMailboxJunkEmailConfiguration

It looks as if the ' ' in the email address is the issue as the other email addresses does not have this.

I also get an error when trying to modify it via OWA.
Who is Participating?
PietMuisConnect With a Mentor Author Commented:
Found the solution here

If running Outlook 2003, we will typically be able to immediately identify the entry of interest from the subject 'Junk E-mail Rule' as shown below.

However if we don't see any of the rules with this subject (as is the case for OWA users) we can still identify the rule from its properties:
From the upper pane select the item to inspect. The lower pane will list the properties for the selected item.

Scroll through the properties looking at the 'Value' column. The Junk E-mail Rule will have one value reading 'JunkEmailRule' without any spaces between words.

If found, we almost certainly identified the rule. As a further confirmation, look for the property named PR_MESSAGE_CLASS and make sure this is set to the value IPM.ExtendedRule.Message
Once identified, make sure the Junk E-mail Rule is selected and from the title menu select Actions | Delete Message.

This will open the Delete Item dialog. From here change the selection to 'Permanent delete passing DELETE_HARD_DELETE (unrecoverable)' and click OK.
The Rule is now deleted. We can close the MAPI Editor.

PietMuisAuthor Commented:
Sorry gaurav05, that does not help me in any way.
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

James HIT DirectorCommented:
This is the correct syntax to disable a users JunkMail.

Set-MailboxJunkEmailConfiguration -Identity "UserName" -Enabled $false
PietMuisAuthor Commented:
Hi Spartan, it returns the same error.
James HIT DirectorCommented:
Are you typing in email address or alias?
You should be putting in alias.... Set-MailboxJunkEmailConfiguration -Identity support -Enabled $false

I ran this command on my box with a live account and I had no issues applying this.
PietMuisAuthor Commented:
I can run it on other users but I have 3 users that I have an issue with, the one I posted here has a safe sender in the list of email addresses in the format '' with '' where the other email addresses does not have the ''... hope i am making sense?

James HIT DirectorCommented:
Have you looked at this link?

Specifically example 2 may be what you are looking for.
PietMuisAuthor Commented:
Hi Spartan, I would like to remove the '' entry...

To get the details of username i run...
get-MailboxJunkEmailConfiguration -Identity username

It returns:
RunspaceId               : cff082f1-931f-49cf-88c9-1e6e6862a93c
Enabled                  : True
TrustedListsOnly         : False
ContactsTrusted          : True
TrustedSendersAndDomains : {'',,}
BlockedSendersAndDomains : {}
MailboxOwnerId           : ...
Identity                 : ...
IsValid                  : True

Then say i would like to add as a trusted sender i run:

Set-MailboxJunkEmailConfiguration -Identity username -TrustedSendersAndDomains ""

It then returns:
Junk e-mail validation error. Value: ''.
    + CategoryInfo          : NotSpecified: (0:Int32) [Set-MailboxJunkEmailConfiguration], JunkEmailValidationException
    + FullyQualifiedErrorId : C7534409,Microsoft.Exchange.Management.StoreTasks.SetMailboxJunkEmailConfiguration

I some way the '' email address in the list of trusted senders have ' ' and the other do not have it. I think that is the issue but no idea how to resolve...
James HIT DirectorCommented:
This is what I was able to do in this scenario:

Get-MailboxJunkEmailConfiguration -Identity username -TrustedSendersAndDomains <email1>,<email2>,etc... -Enabled $true

Just don't type the gmail address in that statement and it will not appear in the TrustedSendersAndDomains.

James HIT DirectorCommented:
Sorry... Set not Get

Set-MailboxJunkEmailConfiguration -Identity username -TrustedSendersAndDomains <email1>,<email2>,etc... -Enabled $true
PietMuisAuthor Commented:
Spartan, it is still giving me the same message - complaining about - ''

I am sure the issue is the ' ' around ''.
PietMuisAuthor Commented:

This seems to be what i need to do, but when i login via MFCMAPI i do not see the junkmail rule under the "Associated Contents Table" - any ideas?
PietMuisAuthor Commented:
Resolved myself
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.