Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created a "spam crawler" account with full access to all mailboxes in an Exchange 2013 environment to get messages in the junk folder to feed the Bayesian filtering running on SpamAssassin in a Linux Anti-spam machine.

This account does not have a mailbox, but have permissions to access other mailboxes. So to get things more secure I would like to restrict connections with this account only from the Linux machine.

I was not able to find this kind of restriction.


PS: If would be possible to modify the Full Access mode, this should be better. I just need to download the Spam messages, so reading permissions is sufficient.

share|improve this question
Have you considered using built-in PowerShell capability vs. a mailbox access approach? You can use this to find the messages you want to view and copy them to the mail account you want to use to import them into spamassassin – Mary Jun 14 '15 at 21:02
Mary could you elaborate a little more and explain how to do this in an answer? If it works I will up vote your answer with pleasure. Thanks. – Vinícius Ferrão Jun 15 '15 at 0:52

Okay, turns out I was thinking of the wrong command (sorry about that).

What you want is Export-Mailbox. You would pipe a list of mailboxes to that command, include only the folder you want, then push those messages to your SPAM recipient mailbox OR you could output them directly into a PST file using the same command.

Reference: for one mailbox:

New-MailboxExportRequest -Mailbox mailboxname -IncludeFolders "#SentItems#" -ContentFilter {(Sent -lt '07/31/2011') -and (Sent -gt '07/01/2011')} -FilePath \servername\folder\SentItems.PST

So you should (in theory) be able to do this:

Get-Mailbox | New-MailboxExportRequest -IncludeFolders "Junk E-Mail" -FilePath \servername\folder\JunkMail.PST

(Note: this has to be a UNC, local folder won't help.)

After that runs, you'll want to clean up the ExportRequests:

Get-MailboxExportRequest | Remove-MailboxExportRequest

Then your next stop is this command: (which I haven't used but seems like what you need) to make the data in the PST readable by SPAMAssassin.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.