Monitor POP3 seesions in powershell

Posted on 2009-04-20
Last Modified: 2013-11-29
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?
Question by:Elad-a
    LVL 70

    Expert Comment

    by:Chris Dent

    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.


    Author Comment

    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?
    LVL 70

    Expert Comment

    by:Chris Dent

    > 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 :)


    Author Comment

    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.. :-)
    LVL 70

    Accepted Solution


    > 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.


    Author Closing Comment

    Thanks Chris!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
    Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
    In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now