Google

POP-Before-SMTP Email Authorization

I also maintain the pop-before-smtp perl script that lets you authorize mail relaying through your system to anyone who has a POP or IMAP account on your server. This software will eventually become unnecessary once password- or Certificate-based authorizations of SMTP connections becomes more widespread. In the meantime, this utility can let you accept email from authorized POP/IMAP users without turning your mail server into an open relay.
Home > POP-Before-SMTP
Feel free to with any questions or comments you may have.