in reply to Returning data from a log file

In 1998, before SMTP AUTH standards were created, Curt Sampson <cjs@cynic.net> wrote poprelayd to implement "POP before SMTP" authentication. It works by watching a log file for new lines (like `tail -f`), and it also re-opens the log file when the inode changes. I've used his getlogline subroutine for similar file-watching purposes several times.

Code is at http://poprelay.sourceforge.net/poprelayd