Maildrop reads a mail message from standard input, then delivers the message to your mailbox. maildrop will optionally read instructions from a file, which describes how to filter incoming mail. Instructions can be provided having mail delivered to alternate mailboxes, or forwarded using a structured filtering language.
Official website for getmail version 4, an extensible mail-retrieval program with support for POP3, IMAP, SDPS, SSL, domain mailboxes, message filtering, and other features.