• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1628
  • Last Modified:

Monitor POP3 seesions in powershell

Hi,
I have an two exchange servers, one holding Mailbox role and CAS -non secure (no TLS) for POP3 use. The other server has only the CAS role with TLS ebabled for secure  POP3 use.
The problem is that id like to see when and whom is holding a session with each of the exchange servers  -and for how mutch time. how would i do this with powershell?
0
Elad-a
Asked:
Elad-a
  • 3
  • 3
1 Solution
 
Chris DentPowerShell DeveloperCommented:

Hmm you may have to enable protocol logging on the POP3 service. Not aware of any way to show you the current active connections (bear in mind that POP3 connections are relatively short duration anyway).

Not aware of a command you can use to enable the logging either, you have to head to the configuration file here:

C:\Program Files\Microsoft\Exchange Server\ClientAccess\PopImap

If you open Microsoft.Exchange.Pop3.exe.config you should be able to find an entry like this:

            <add key="ProtocolLog" value="false" />

Change false to true, modify the path if you wish. Once done, restart the POP3 service.

With all that you should be able to use PowerShell to parse the log file and return the information you're after. I don't use POP3 here, so I can't tell you much about it, but if you get the log and need help post a sample and a description of what you want from it and we can take it from there.

Chris
0
 
Elad-aAuthor Commented:
Is there a specific place to inject that key into the file?
The Microsoft.Exchange.Pop3.exe.config looks very formatted i would not like to kill it..
Once i enable Protocol logging, where would the log file be created at?
0
 
Chris DentPowerShell DeveloperCommented:

> Is there a specific place to inject that key into the file?

Yes, it's set to false by default and a search should come up with that line. Just change the value to "true".

The path to the log file is directly beneath that one :)

Chris
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Elad-aAuthor Commented:
Is it ok to change the path to the log files ?
I would have a great deal of connections per sec' that id need to follow and i dont want to clutter the C drive of my server....
Thanks for your help Chris.. :-)
0
 
Chris DentPowerShell DeveloperCommented:

> Is it ok to change the path to the log files ?

Sure :)

If the log files are dealt with in the same way as the rest of the protocol logs they will keep themselves within a 250Mb total size limit.

Keep an eye on it for a while, make sure that really is the case. There's little documentation on those which is quite annoying. No idea why they didn't make the logging options available in the command shell.

Chris
0
 
Elad-aAuthor Commented:
Thanks Chris!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now