exchange 2007: POP3 access
in our current exchange 2007 organization, it appears that POP3 access is enabled on every mailbox and that it’s also enabled on the CAS servers. the only thing stopping POP3 access from functioning is the fact that the Microsoft Exchange POP3 service does not start automatically on the CAS servers.
i was wondering about just enabling POP3 access on select mailboxes. of course, i’d have to disable it across the board first. this site http://www.exchangelog.info/2008/11/disable-pop3-for-all-users.html provides the following exchange management shell script: Get-CASMailbox -ResultSize Unlimited | Set-CASMailbox -PopEnabled $false
to enable POP3 access on a single mailbox: Set-CASMailbox -Identity <email address> -PopEnabled $true
source: http://technet.microsoft.com/en-us/library/bb124578(v=exchg.80).aspx
to get a listing of mailboxes that have POP3 access enabled: Get-CASMailbox -ResultSize Unlimited | where {$_.PopEnabled -eq $true}
source: http://exchangeserverpro.com/enable-disable-pop3-access-exchange-2010-mailboxes/
to get a mailbox count: (Get-CASMailbox -ResultSize Unlimited).count
telnet can be used to test POP3 connectivity: telnet <cas-server> 110
connecting from a POP3 client: CAS server IP or FQDN, port 110, StartTLS
so that powershell command should take care of the here and now, but then what about newly created mailboxes? it appears that POP3 access is enabled on mailboxes by default. i found the suggestion to create a powershell script and have it run periodically on a post somewhere.
so i made the following pop3.ps1 script that combined many of the commands mentioned above:
Get-CASMailbox -ResultSize Unlimited | where {$_.PopEnabled -eq $true} | Set-CASMailbox -PopEnabled $false
Set-CASMailbox -Identity user1@mydomain.com -PopEnabled $true
Set-CASMailbox -Identity user2@mydomain.com -PopEnabled $true
Set-CASMailbox -Identity user3@mydomain.com -PopEnabled $true
Set-CASMailbox -Identity user4@mydomain.com -PopEnabled $true
i set up a scheduled task on one of the CAS servers to run the script once a week (i felt like this was sufficient).
powershell -psconsolefile exshell.psc1 -command “& {c:\pop3.ps1}”
start in E:\Exchange\Bin (in my case)
run as an account with appropriate Exchange rights
source: http://blogs.msdn.com/b/adamfazio/archive/2007/10/25/exchange-2007-script-how-to-run-as-a-scheduled-task.aspx