This post originated from an RSS feed registered with Ruby Buzz
by Eric Hodel.
Original Post: IMAPCleanse
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
I am a lazy person. I don’t like to delete my mailing list mail. I don’t need any of them, there’s a copy of all the mailing list mails somewhere on the internet. But since I’m lazy I never clean out my mailing list mail boxes.
So I used Net::IMAP and wrote IMAPCleanse to automatically clean out my mailing list mailboxes of messages older than a threshold that are read and not flagged. (So if I flag a message it’ll stay around forever.)
The only problem I had was that Net::IMAP didn’t support PLAIN authentication over SSL, so I added that. (I need to whip up some patches for Net::IMAP and fold it back in.)