Joint Scientific IT and Technical Services

Personal Homepage

SieveWeb - A simple, web based sieve editor and validator

SieveWeb is a simple, web based sieve editor and validator for Dovecot IMAP servers. It uses Dovecot's doveadm API via HTTP.

For editing sieve filter files on our Dovecot based IMAP servers, I wrote a small CGI in Python. It allows authenticated users to edit their sieve filters as text. Creating new rulesets and activating them is also possible. Removal and deactivation are currently not supported. This way, users are protected from accidently deleting their sieve filter rules. As a workaround, they can create a new empty ruleset and activate it.

SieveWeb also allows users to validate their ruleset against a given mail in raw text format. The resulting output displays all tests done on the mail text and the resulting actions. This allows users to debug their rules in case they do not filter thier mails as expected.

Ruleset management is done with Dovecot's doveadm API via HTTP. There is an example of the corresponding dovecot config to enable doveadm via HTTP. Validation is done with the sieve-test tool of Dovecot.

SieveWeb does not support authentication itself. Instead, it relies on the REMOTE_USER environment variable provided by the web server. There is an example how to use LDAP authentication in Apache, which provides REMOTE_USER.

There is also an admin version of SieveWeb, that allows managing sieve filters for all available users. This CGI should be protected as well, e.g. using Apache authentication for a well defined group of admins, only or other access limitations. However this version does not rely on REMOTE_USER. As a seperate CGI script, usage is optional.

The current version of SieveWeb can be found here: