IMAPProcessor is a client for processing messages on an IMAP server. It provides some basic mechanisms for connecting to an IMAP server, determining capabilities and handling messages. IMAPProcessor ships with the imap_keywords executable which can query an IMAP server for keywords set on messages in mailboxes.
Gemfile gem 'imap_processor', '~> 1.0.1'
install gem install imap_processor -v 1.0.1