The posterity-pop program

env ROOT=/path/to/maildirs TIMEOUT=600 TIMELIMIT=1800 \
envuidgid public-mail-user \
tcpserver 0 110 \

posterity-pop publishes a set of email archives through the POP3 protocol. If $ROOT is set, it changes directory to $ROOT and chroots there. Then it begins a POP3 conversation. The argument of a USER command is taken as the name of a maildir in the current directory; it will then serve messages from the new/ subddirectory of that maildir. It refuses to perform the DELE command; it treats the maildir as read-only. If $TIMEOUT is set, it specifies an inactivity timeout in seconds. If $TIMELIMIT is set, it limits the total amount of time for the entire POP3 session.

posterity-pop logs any RETR or TOP commands like this:

pid remote-address read path