Junk-E-Mail folder

Hello everybody,

we are searching for a solution for a problem we cannot find a solution for at the moment. We have an automated process with a script to create new mailboxes and in this script one part is the create an inbox rule that all junk-mails forwards into the junk-mail-folder of the mailbox. The problem is, that the junk-mail-folder at this stage of the process not exists nor its name is known. The Mailbox exists already at this stage, also all mail addresses or any other preparations like policies.

We have tried to get the name with this powershell command:

$j = (Get-MailboxFolderStatistics -Identity $user | where {$_.foldertype -eq "JunkEMail"}).name

But $j is empty and therefore we are unable to create the inboxrule. Has anybody an idea how we can get the name of the junk-mail-folder without logging on to the mailbox, which is not really possible in an automated process and also not wanted? We would appreciate any idea or suggestion to solve this problem.

Thank you.

August 5th, 2015 6:12am

Create custom managed folder policy and it will create required folder.
Free Windows Admin Tool Kit Click here and download it now
August 5th, 2015 7:53am

First of all, thank you very much for your fast answer.

Well, custom managed folder exists no more since Exchange 2013, because now there is another way to realize this similar. It's called retention policies and tags. Maybe you meant this in your post. I've tried this way and created a retention tag and a policy for my junk-mail folder. And then I assigned the policy to a Mailbox without junk-mail-folder yet. But unfortunately this didnt create the junkmail-folder. Not immediately nor one day later.

Do you or anyone else has other suggestions or solutions for this problem?

August 6th, 2015 3:45am

Did you applied the policy to this mailbox.
Free Windows Admin Tool Kit Click here and download it now
August 6th, 2015 8:45am

Yes, I applied the policy to this Mailbox. Ive tried in the meantime it many times, also with other mailboxes. Unfortunately always with the same result.
August 6th, 2015 10:05am

Hi alex,

Thank you for your question.

Could you tell us why you want to create Inbox rule for Junk folder?

By default, if the email was marked as junk mail, it will delivery to junk mail folder, we need not to create inbox rule. The email was marked as junk mail will done by mail gateway, Exchange server, outlook.

In addition, we could check junk mail configuration by the following links:

https://technet.microsoft.com/en-us/library/cc179183.aspx

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

If there are any questions regarding this issue, please be free to let me know.

Best Regard,

Jim

Free Windows Admin Tool Kit Click here and download it now
August 6th, 2015 9:44pm

Thank you for your answer Jim.

Well, our intention is that we want to filter junkmails with the "X-Spam-Flag:Yes" in the header of mails. This is our way to filter junk mails and to realize this we want to create a rule to every mailbox, also new ones. For an existing mailbox it isnt a problem, because the folder already exists, but for new mailboxes it doesnt.

Hopefully you can now understand why we want a rule and not use the filtering inside Exchange or Outlook.

August 7th, 2015 3:13am

Hi!

You can do that quite easily with transport rule.

Create new transport rule and use option for header match.

When header matches "X-Spam-Flag:Yes" assign SCL 9 to that email.

Then set SCLquarantine threshold in org config to 8 and mail will automatically go to users JunkEmail folder.

We are doing it for 3 months now :)

Free Windows Admin Tool Kit Click here and download it now
August 7th, 2015 5:17am

Thank you very much for your answer. This is probably a good solution. We will try it and discuss internally because this is organization-wide and we are using it at the moment only tenant-wide. Maybe not all tenants want this. I take a look inside transportation rules and the possibilities there.
August 7th, 2015 8:08am

Unfortunately we cannot create a transport rule because this rule will be global and not only for our tenant. And overthis we are in an univercity environment with a lot of Research, this means we have a lot of customers who dont use the mainstream products and al lot of them also using imap. But with imap you have the problem that you have to assign the junkfolder to the junkfolder of the exchange mailbox. Sometimes this is not possible or difficult.

In case of this and that it isnt possbile to get the name of the junkfolder reliable, we are now making an instruction for our users to set there junksettings alone.

Thank you very much for all answers we got to our case.

Free Windows Admin Tool Kit Click here and download it now
August 17th, 2015 6:04am

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

Other recent topics Other recent topics