We had a discussion about this functionality not so long ago. The outcome of many hours of frustration with qmail (installed in this case with vpopmail) was to have a scheduled proc check a pop server using the tcl pop api. The tcl pop code had to be sourced rather than loaded as a library under nsd 3.x - I never did figure out why. The original module can of course be required under nsd 4.x instead of hacked like mine is, although ulimately it would be nice for it to be ad_proc'ed.
FYI i currently have the functionality hacked into my install of the 4.6 blogger, but it's pretty nasty.
Useful threads: