popproxy is a POP3 proxy. It may be used as a reverse proxy mainly, but extending it to work as a gateway proxy based on username is possible. It currently is able to control access based in username and has some SSL support.