Forum Discussion
How to disable IMAP/POP3 globally but excluding a specific mailbox?
Hi,
We want to disable IMAP/POP3 to entire organization, but allow a couple mailboxes to have those features. How can we approach it?
Please help!
Thanks in advance!
I called Microsoft today. There is the script to disable IMAP/POP for all mailboxes expect abc@abc.com.
Get-CASMailbox -ResultSize Unlimited | where {$_.Name -ne "abc"} | Set-CASMailbox -PopEnabled $false -ImapEnabled $false
Note: abc is the display name of mailbox abc@abc.com.
15 Replies
Hi Grace Yin
There are a few ways you could approach it
1.) You could manually turn them off in the Exchange Admin Centre for each user. You would do this by going to recipients, selecting each mailbox and then turning off these mailbox protocols
2.) You could do this with Powershell, either by writing a script which turns off these protocols for all selected users with the exception of the ones you need, or disable the protocols on all mailboxes via Powershell commands (link below) and then turning the protocols back on for the ones you want, again through Powershell, or by the Exchange Admin console.
https://gcits.com/knowledge-base/disable-pop-imap-mailboxes-office-365/There is also a Uservoice to have them disabled by default in the future, as in when creating new mailboxes
Hope that helps and answers your question.
Best, Chris- Grace YinIron Contributor
Hi Chris,
Thank you very much for your reply. The link is very helpful. The only thing that I need help is how to exclude a specific mailbox? I am not good at PowerShell, if you can add the command of excluding mailbox like abc@abc.com, that will be great!
Your help is appreciated!
- Hi Grace,
If you aren't good at Powershell then rather and try writing a script (unless someone in this forum provides you with one) I would disable the protocols in the Exchange Online admin portal for the selected users or use powershell to disable all users then immediately after enable the protocols on the few mailboxes you need with this article
https://support.microsoft.com/en-in/help/2416434/how-to-enable-or-disable-pop3-imap-mapi-outlook-web-app-or-exchange-ac
Hope that helps
Best, Chris