устанавливаем поддержку sieve для dovecot

ставим необходимые пакеты
[cce]

root@mx1/var/spool/mail> pkg_info | grep sieve
dovecot-managesieve-0.11.13 Dovecot ManageSieve Server daemon
dovecot-sieve-1.2+0.1.19 A Sieve plugin for the Dovecot ‘deliver’ LDA
roundcube-sieverules-1.16 Roundcube webmail sieve plugin
root@mx1/var/spool/mail>
[/cce]

правим конфиг dovecot.conf
[cce]

root@mx1/var/spool/mail> cd /usr/local/etc
root@mx1/usr/local/etc> vim dovecot.conf
[/cce]

добавляем — исправляем
[cce]

protocols = pop3 pop3s imap imaps managesieve

protocol managesieve {
login_executable = /usr/local/libexec/dovecot/managesieve-login
mail_executable = /usr/local/libexec/dovecot/managesieve
managesieve_max_line_length = 65536
managesieve_logout_format = bytes=%i/%o
managesieve_implementation_string = dovecot
mail_debug=yes
}

protocol lda {

# Address to use when sending rejection mails.
postmaster_address = postmaster@site.com

# Hostname to use in various parts of sent mails, eg. in Message-Id.
# Default is the system’s real hostname.
hostname = mx1.site.com

mail_plugin_dir = /usr/local/lib/dovecot/lda
mail_plugins = sieve

# Support for dynamically loadable plugins. mail_plugins is a space separated
# list of plugins to load.
#mail_plugins =
#mail_plugin_dir = /usr/local/lib/dovecot/lda

# Binary to use for sending mails.
#sendmail_path = /usr/lib/sendmail
#sendmail_path = /usr/sbin/sendmail

# UNIX socket path to master authentication server to find users.
#auth_socket_path = /var/run/dovecot/auth-master

}

plugin {

quota = maildir
quota_rule = *:storage=1GB
# 10% of 1GB = 100MB
quota_rule2 = Trash:storage=10%%
# 20% of 1GB = 200MB
quota_rule3 = Spam:storage=20%%

sieve_dir = /var/spool/mail
sieve = /var/spool/mail/%u.sieve
}

[/cce]

перезапускам dovecot и смотрим …

[cce]

root@mx1/usr/local/etc> sockstat | grep 2000
dovecot managesiev 96181 4 tcp4 *:2000 *:*
dovecot managesiev 66644 4 tcp4 *:2000 *:*
dovecot managesiev 11738 4 tcp4 *:2000 *:*
root dovecot 45144 10 tcp4 *:2000 *:*
root@mx1/usr/local/etc>

[/cce]

все класс.

для редактирования правил я использую плагин для roundcube

[cce]

root@mx1/usr/local/etc> pkg_info | grep round
roundcube-0.7.2,1 Fully skinnable XHTML/CSS webmail written in PHP
roundcube-sieverules-1.16 Roundcube webmail sieve plugin
root@mx1/usr/local/etc>
[/cce]

плагин очень удобный и повзволяет без напряга строить разообразные правила.

 

 

 

Обсуждение закрыто.