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 several executables which can query and manipulate IMAP mailboxes in several different ways:
Archives old messages to a new dated mailbox.
Delete messages older than a certain age in specified mailboxes.
Flag messages to/from certain people.
Shows new messages in a mailbox.
Queries an IMAP server for keywords set on messages
Flags messages based on what you've flagged before.
Ensures that certain mailboxes exist.
Only known to work with SASL/PLAIN authentication
Run any command with –help for details.
Google Mail:¶ ↑
This is kinda painful. You need to have Two Factor Authentication enabled with google, then you need to create an app specific password as described here: support.google.com/accounts/answer/185833
Then, your config needs to be set up like this:
- :Host: imap.googlemail.com :ssl: true :auth: PLAIN :username: firstname.lastname@example.org :password: app-specific-password
Specifically, you need to set auth to PLAIN, and your password needs to your app specific password. Run with –debug to help figure problems out.
Google is threatening to turn this off at some point and require oauth… at which point… I have no idea. I give up I guess.
gem install imap_processor
(The MIT License)
Copyright © Eric Hodel, Ryan Davis, Seattle.rb
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.