= IMAPCleanse

Rubyforge Project:


== About

IMAPCleanse removes old, read, unflagged messages from your IMAP

== Why?

I’m lazy. I don’t delete read messages from my mailboxes because I
like to
have context when reading threads. Since I’m lazy my more-trafficed
can end up with tens of thousands of read messages. Deleting this many
messages with is time consuming and boring.

So I wrote IMAPCleanse to clean out my old mailboxes for me. If I
want to keep
a message around for forever I’ll just flag it and IMAPCleanse won’t
touch it.

== Installing IMAPCleanse

Just install the gem:

$ sudo gem install IMAPCleanse

== Using IMAPCleanse

In short:

imap_cleanse -H -p mypassword -b Lists/FreeBSD/
current,Lists/Ruby -a 30

The help for IMAPCleanse should be sufficiently verbose, but here’s a
couple of

=== --noop and --verbose

The --noop flag tells IMAPCleanse not to delete anything. When
combined with
the --verbose flag you can see how many messages IMAPCleanse would
have deleted
from which mailboxes.

$ ruby -Ilib bin/imap_cleanse -nv

Connected to

Logged in as drbrain

Cleansing read, unflagged messages older than 26-Feb-2006 17:04 PST

Found 23 mailboxes to cleanse:




Selected mail/Lists/FreeBSD/current

Scanning for messages

Found 0 messages


Selected mail/Lists/Ruby/ZineBoard

Scanning for messages

Found 0 messages

Done. Found 0 messages in 23 mailboxes

(Since I just ran IMAPCleanse it didn’t have anything to do.)

=== ~/.imap_cleanse

The ~/.imap_cleanse file can hold your password and other options so
you don’t
have to type them in on the command line every time. The format is
just the options file name followed by ‘=’ followed by the argument.

No whitespace is stripped from options, so be sure to do that
yourself. Mine
looks something like this:
Password=my password

Eric H. - [email protected] -
This implementation is HODEL-HASH-9600 compliant

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs