Skip to content

Dovecot Sieve setup

Install packages

apt install dovecot-sieve dovecot-managesieved

Roundcube - enable plugins

In file: ./config/config.inc.php

$config['plugins'] = array(
# ....
    'managesieve'
# ...
);

/etc/dovecot/conf.d/15-lda.conf

protocol lda {
#  auth_socket_path = /var/run/dovecot/auth-master
    mail_plugins = $mail_plugins sieve
}

/etc/dovecot/dovecot.conf

protocols = imap pop3 sieve

/etc/dovecot/conf.d/20-managesieve.conf

protocols = $protocols sieve

service managesieve-login {
  inet_listener sieve {
    address = 127.0.0.1
    port = 4190
  }
  service_count = 1
  process_min_avail = 0
  vsz_limit = 64M
}

service managesieve {
  process_limit = 1024
}

protocol sieve {
  managesieve_max_line_length = 65536
  mail_max_userip_connections = 10
  mail_plugins =
  managesieve_logout_format = bytes=%i/%o
  managesieve_implementation_string = Dovecot Pigeonhole
  managesieve_max_compile_errors = 5
}

Execute

service dovecot restart

Checking ports:

# netstat -plnt | grep 4190
tcp        0      0 0.0.0.0:4190            0.0.0.0:*               LISTEN      23375/dovecot       
tcp6       0      0 :::4190                 :::*                    LISTEN      23375/dovecot

Checking:

# dovecot -n | grep sieve
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
  sieve = file:~/sieve;active=~/.dovecot.sieve
protocols = imap pop3 sieve sieve
service managesieve-login {
  inet_listener sieve {
  inet_listener sieve_deprecated {
service managesieve {
  mail_plugins = " sieve"
protocol sieve {
  managesieve_implementation_string = Dovecot Pigeonhole
  managesieve_logout_format = bytes=%i/%o
  managesieve_max_compile_errors = 5
  managesieve_max_line_length = 65536