Skip to content

Plugin managesieve

hhappel edited this page Jun 26, 2024 · 1 revision

Mail filter rules (server-side) with Roundcube Plugin "managesieve"

Mail filter rules are typically used to allow users defining actions which are automatically applied on incoming emails, based on certain criteria ("Move all emails from [email protected] into folder 'Jane'"). "Sieve" is a standardized formal language to define mail filter rules (RFC 5228).

This plugin provides a user interface for editing Sieve rules within Roundcube settings. As a precondition, the mailserver used with the Roundcube installation needs to support Sieve and the "ManageSieve" protocol (RFC 5804), which sort of an API to read and write Sieve filters.

Configuration

You can find the configuration example here

By default, the configuration will assume localhost as the ManageSieve hostname.

Vacation response

Vacation responses (out-of-office) can be realized using Sieve filter rules. This plugin includes simplified user interfaces for both cases, which can be enabled using the configuration option $config['managesieve_vacation'] = 2; (see also screenshots below).

Forwards

Similar to vacation responses, a simplified user interface for creating email forwards can be enabled using the configuration option $config['managesieve_forward'] = 2;

Screenshots

Filter settings

Empty setup

Out of Office settings

oof_plain Composing a plain text vacation response

oof_html Composing a HTML vacation response

Hooks

For developers of other plugin, the ManageSieve plugin offers the following hooks:

  • vacation_form_advanced (Modify and extend the "Advanced Section" of the "out of office" settings form)
  • vacation_reason_modify_on_mangesieve_store (Modify a vacation notice's reason before the vacation notice is saved to ManageSieve)
  • vacation_reason_html_modify_before_formedit (Modify a vacation notice's HTML-formatted reason retrieved from ManageSieve before it is shown in the "out of office" settings form)

These hooks were initially introduced for the Structured Vacation Notice plugin.