in reply to Email Proxy System

Who needs Perl for this?

Modern mail daemons like qmail, sendmail, postfix, etc can do the filtering, message/header modification and sorting into local mailboxes easily - with or without the help of an external program like procmail. And they can do it both for incoming, and outgoing email.

To fetch mail, I'd use fetchmail.

Heck, I've done most of the stuff you've discribed more than once - and always with qmail/fetchmail/procmail. They are written with the purpose of doing this stuff, so why reinvent the wheel?