Ruby/ManageSieve
~~~~~~~~~~~~~~~~
  1. INTRODUCTION

  2. REQUIREMENTS

  3. INSTALLATION

  4. LICENSE

  5. AUTHOR

  6. REFERENCES

  7. INTRODUCTION

Ruby/ManageSieve is a pure-ruby library for the MANAGESIEVE protocol [1]. It allows programmatic control of Sieve [2] scripts, and implements the following commands described in the MANAGESIEVE draft:

* CAPABILITY
* DELETESCRIPT
* GETSCRIPT
* HAVESPACE
* LISTSCRIPTS
* LOGOUT
* PUTSCRIPT
* SETACTIVE

The AUTHENTICATE command is partially implemented. Currently the LOGIN and PLAIN authentication mechanisms are implemented.

Documentation is provided in the “doc” directory, and usage examples are provided in the “examples” directory.

Some ideas from Ruby/ManageSieve were borrowed from python-managesieve [3], the Python implementation and Net_Sieve [4], the PHP implementation from the PEAR library.

  1. REQUIREMENTS

Ruby/ManageSieve requires Ruby version 1.8.1 or newer.

  1. INSTALLATION

Installation is straightforward: just run the command below (it requires privileges to write in the ruby library directory).

# ruby install.rb

This command installs the managesieve library in ruby's site-wide directory and the sievectl utility in ruby's bindir.

The sievectl utility is a small program that allows you to manage your sieve scripts from the command line. It requires a config file located in $HOME/.sievectlrc, with a series of items in the form “name: value”:

mydomain:

host:     sieve.mydomain.tld
port:     2000
user:     johndoe
euser:    johndoe
password: secret
auth:     PLAIN

In the example above, “mydomain” is the name of the account, and the indented variables below it are valid for that account only. Other accounts can be added, as long as they have different names. Indentation must be preserved.

The “port”, “euser” and “auth” variables are optional, and their default values are, respectively, 2000, the value of the “user” variable, and “ANONYMOUS”.

To learn how to use sievectl, type “sievectl help”.

  1. LICENSE

Copyright © 2004-2006 Andre Nathan <andre@digirati.com.br>

Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

  1. AUTHOR

Ruby/ManageSieve was developed by Andre Nathan.

  1. REFERENCES

1

The MANAGESIEVE draft: managesieve.rubyforge.org/draft-martin-managesieve-04.txt

2

The Sieve email filtering language sieve.info/

3

Python-managesieve: www.crazy-compilers.com/py-lib/managesieve.html

4

Net_Sieve: pear.php.net/package/Net_Sieve