Class RFilter::KeyedMailbox
In: lib/rfilter/keyed_mailbox.rb
Parent: Object

A KeyedMailbox object implements a message mailbox indexed by a unique key string for each message. When a message is saved into the store, the message's key is returned. Later, the key is used to retrieve file name the message is stored in.

The message store has the following characteristics:

  1. It is a Maildir, so various mail programs can read the messages directly and without adversely affecting the mailbox.
  2. The key is very hard to guess.
  3. The key is short and can be included in a message subject or in the extension of a return address (suitable for mailing list style confirmations).
delete    each_key    expire    key_mtime    new    path    retrieve    save   
Included modules
Public Class methods

Creates a confirmation queue object that manages a confirmation queue in directory path.

Public Instance methods

Saves a message into a confirmation queue and returns a string key that can be used to retrieve it later. They key is a string of hex digits and dashes, suitable for inclusion in a message subject or "VERP" return address.


Get the file name holding the message associated with key, or returns nil if the message is missing.


Given a key, delete the message associated with it.


Expire messages in the confirmation queue older than age days old.

each_key() {|key| ...}

Yield each key in the mailbox along with its most recent modification time.


Yield the time a given key was last modified as a Time object or nil if the key doesn't exist.


Return the path of this keyed mailbox (same value passed in #new).