Revision of Sieve from Tue, 02/14/2012 - 17:35

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

Sieveis a language for filtering e-mail messages. It is designed to be implementable on either a mail client or mail server. It is meant to be extensible, simple, and independent of access protocol, mail architecture, and operating system.

The Dovecot IMAP server has Sieve support via a plugin provided by the Pigeonhole Project

Installation
Download the latest source from the Pigeonhole download page:

cd /extra/src
wget http://www.rename-it.nl/dovecot/2.0/dovecot-2.0-pigeonhole-0.2.5.tar.gz
tar zxf dovecot-2.0-pigeonhole-0.2.5.tar.gz
cd dovecot-2.0-pigeonhole-0.2.5

Since we installed Dovecot from source, the configure script should find the installed dovecot-config automatically:

./configure
make
make install

IMPORTANT: You need to recompile Pigeonhole when you upgrade Dovecot to a new version, because otherwise the Sieve interpreter plugin will fail to load with a version error.
A set of sample config files are installed to/usr/local/share/doc/dovecot/example-config/conf.d, which you'll have to move to /usr/local/etc/dovecot/conf.d:

cp /usr/local/share/doc/dovecot/example-config/conf.d/20-managesieve.conf /usr/local/etc/dovecot/conf.d/
cp /usr/local/share/doc/dovecot/example-config/conf.d/90-sieve.conf /usr/local/etc/dovecot/conf.d/

Edit /usr/local/etc/dovecot/conf.d/20-managesieve.conf and uncomment a couple lines:

protocols = $protocols sieve

service managesieve-login {
  inet_listener sieve {
    port = 4190
  }

  service_count = 1

  vsz_limit = 64M
}

The default /usr/local/etc/dovecot/conf.d/90-sieve.conf should work without any adjustments.

Enable the Sieve plugin for Dovecot's LDA in /usr/local/etc/dovecot/conf.d/15-lda.conf:

protocol lda {
  # Space separated list of plugins to load (default is global mail_plugins).
  mail_plugins = $mail_plugins sieve
}

Edit /usr/local/etc/dovecot/conf.d/10-master.conf and give the vpopmail user and group some access privileges:

default_login_user = vpopmail
default_internal_user = vpopmail

service auth {
  # auth_socket_path points to this userdb socket by default. It''s typically
  # used by dovecot-lda, doveadm, possibly imap process, etc. Its default
  # permissions make it readable only by root, but you may need to relax these
  # permissions. Users that have access to this socket are able to get a list
  # of all usernames and get results of everyone''s userdb lookups.
  unix_listener auth-userdb {
    mode = 0600
    user = vpopmail
    group = vchkpw
  }

  # Postfix smtp-auth
  #unix_listener /var/spool/postfix/private/auth {
  #  mode = 0666
  #}

  # Auth process is run as this user.
  user = $default_internal_user
}

service auth-worker {
  # Auth worker process is run as root by default, so that it can access
  # /etc/shadow. If this isn''t necessary, the user should be changed to
  # $default_internal_user.
  user = $default_internal_user
}

Restart Dovecot:

svc -t /service/dovecot-imap

To enable Sieve filtering for a domain, you must edit that domain's .qmail-default file to use Dovecot's LDA instead of vdelivermail:

|/var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d $EXT@$USER

Recent Updates

  • 8 months 3 weeks ago
    1.27.2 update
  • 9 months 4 days ago
    Drupal 10/11 config
  • 9 months 6 days ago
  • PHP
    9 months 6 days ago
    PHP 8.3.11 and AlmaLinux
  • 9 months 6 days ago
    New version of Pound