Getmail
getmail is a simple mail retrieval agent intended as a replacement for fetchmail, implemented in Python. It can retrieve mail from POP3, IMAP4 and Standard Dial-up POP3 Service servers, with or without SSL. It supports simple and domain (multidrop) mailboxes, mail filtering via any arbitrary program, and supports a wide variety of mail destination types, including mboxrd, maildir, and external arbitrary mail delivery agents. Unlike fetchmail, getmail's Python foundation makes it nearly immune to buffer overflow security holes. It also has a simpler configuration syntax than fetchmail, but supports fewer authentication protocols. On systems processing local mail, its delivery capability is redundant, because such systems must have a local mail delivery agent (MDA) anyway. This inclusion of MDA functionality within getmail, without providing full MDA functionality (such as the ability to receive and deliver locally-originated messages) is contrary to the UNIX philosophy of application modularity.
Read more about Getmail.