fdm is a simple, lightweight replacement for mail fetch, filter and
delivery programs such as fetchmail and procmail. It can currently
fetch using POP3, POP3S, IMAP or from stdin, and deliver to a pipe,
file, maildir, mbox or SMTP server, based on regexps.
WWW: https://github.com/nicm/fdm