WebMail Lite 7 documentation

Use Sieve for filtering

Introduction

Sieve is a special language which is used for configuring mail filters. Many popular mail servers either support Sieve out-of-box or can be used along with Sieve servers.

The following WebMail Lite 7 features rely on Sieve support:

  • filters (actions performed on mails depending on message headers);
  • autoresponder (vacation message, user-defined text sent out as a response to any messages);
  • forwarding (resending all incoming mails to specified email address).

For this to work, MTA should have Sieve support enabled, and ManageSieve server needs to be installed in the system. It's available as part of our MailSuite Pro bundle, and it may be available as part of popular MTAs like Exim and Postfix. In case of MailSuite Pro, no configuration is required, ManageSieve configuration is performed as part of isntallation process.

Checking if ManageSieve is operational

Before proceeding with configuring Sieve-related options in WebMail Lite 7, we recommend to check that Sieve is actually enabled and managesieve runs fine. Since managesieve uses port 4190 by default, you can try:

telnet mail.domain.com 4190

and see if you get any response. Also, it may be a good idea to check port 2000. In most cases, Sieve only works locally so you might need to run telnet from mailserver box itself.

Configure Sieve functionality of the product

Current version includes Sieve plugins by default so there's no need to install those. All you need is to enable plugins by modifying data/settings/config.php file, see the following options found there:

$aSieveDomains = array('imap.domain1.com', 'imap.domain2.com');

This setting requires supplying a list of mail server hostnames (not email domain names), and Sieve functionality will be enabled in WebMail Lite 7 only for account with matching IMAP hostname. This comes in handy if users add external accounts, e.g. GMail ones, and naturally, Sieve is not available there.

The same config.php file contains Sieve configuration options for WebMail Lite 7:

'sieve' => false,
'sieve.autoresponder' => true,
'sieve.forward' => true,
'sieve.filters' => true,
'sieve.config.host' => '',
'sieve.config.port' => 4190,
'sieve.config.general-password' => '',
'sieve.config.filters-folder-charset' => 'utf-8', // [utf7-imap, utf-8]
'sieve.config.domains' => $aSieveDomains

You can enable Sieve-powered features by replacing false with true for the respective configuration option. In most cases, you won't have to amend other values; sieve.config.host option, for example, is only used when you have a single Sieve server hostname which should be used instead of IMAP server hostname.

Once this is done, you should be able to configure Sieve-powered features for your WebMail Lite 7 account, respective tabs ("Filters", "Forwarding", "Autoresponder") should be present in your email account properties.