Добрый день.
Есть проблема с настройкой плагина Managesieve для Roundcube.
Есть Ubuntu 16.04.1, Dovecot 2.2.22, Exim4 4.86, Roundcube 1.2, Managesieve 8.3.
Почта отправляется и принимается и через почтовые клиенты и через веб-интерфейс. С этим проблем нет. Не работает только сортировка managesieve. Как ставил:
/etc/dovecot/dovecot.conf:
protocols = imap sieve pop3
/etc/dovecot/conf.d/15-lda.conf:
protocol lda {
mail_plugins = $mail_plugins sieve
}
/etc/dovecot/conf.d/20-managesieve.conf:
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
protocol sieve {
}
/etc/roundcube/config.inc.php:
$config['plugins'] = array(
'archive',
'zipdownload',
'managesieve',
);
/etc/roundcube/plugins/managesieve/config.inc.php:
$config['managesieve_port'] = 4190;
$config['managesieve_host'] = '%n';
$config['managesieve_auth_type'] = null;
$config['managesieve_auth_cid'] = null;
$config['managesieve_auth_pw'] = null;
$config['managesieve_usetls'] = false;
$config['managesieve_conn_options'] = null;
$config['managesieve_default'] = '/var/lib/dovecot/sieve/default.sieve';
$config['managesieve_script_name'] = 'managesieve';
$config['managesieve_mbox_encoding'] = 'UTF-8';
$config['managesieve_replace_delimiter'] = '';
$config['managesieve_disabled_extensions'] = array();
$config['managesieve_debug'] = true;
$config['managesieve_kolab_master'] = false;
$config['managesieve_filename_extension'] = '.sieve';
$config['managesieve_filename_exceptions'] = array();
$config['managesieve_vacation'] = 0;
$config['managesieve_vacation_interval'] = 0;
$config['managesieve_vacation_addresses_init'] = false;
$config['managesieve_notify_methods'] = array('mailto');
После этого в кубе в настройках появляется пункт Фильтры, но при нажатии на него вываливается ошибка: Невозможно подключиться к серверу.
В логах:
/var/log/dovecot.log:
2016-12-08 22:14:14 managesieve(admin@mydomain.com): Error: sieve: file storage: Sieve storage path `~/sieve' is relative to home directory, but home directory is not available.
2016-12-08 22:14:14 managesieve(admin@mydomain.com): Fatal: Failed to open Sieve storage.
/var/log/dovecot-info.log:
2016-12-08 22:14:14 managesieve-login: Info: Login: user=<admin@mydomain.com>, method=PLAIN, rip=192.168.6.3, lip=192.168.6.151, mpid=13472, session=<hdDkRyytDrNrAqAYD>
/var/log/roundcube/errors:
[08-Dec-2016 22:14:14 +0200]: <aod12sm6> PHP Error: Unable to connect to managesieve on mydomain.com:4190 in /usr/share/roundcube/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php on line 216 (GET /roundcube/?_task=settings&_action=plugin.managesieve)
[08-Dec-2016 22:14:14 Europe/Helsinki] ERROR: Not currently in AUTHORISATION state (1)
[08-Dec-2016 22:14:14 Europe/Helsinki] ERROR: Failed to write to socket: connection lost ()
/var/log/roundcube/sieve:
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "IMPLEMENTATION" "Dovecot Pigeonhole"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational l regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "NOTIFY" "mailto"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "SASL" "PLAIN LOGIN"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "STARTTLS"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "VERSION" "1.0"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: OK "Dovecot ready."
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> C: CAPABILITY
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "IMPLEMENTATION" "Dovecot Pigeonhole"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational l regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "NOTIFY" "mailto"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "SASL" "PLAIN LOGIN"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "STARTTLS"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: "VERSION" "1.0"
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> S: OK "Capability completed."
[08-Dec-2016 22:14:12 +0200]: <aod12sm6> C: AUTHENTICATE "PLAIN" "AHNldmVuAHBpcmFtaWRhNTE="
[08-Dec-2016 22:14:14 +0200]: <aod12sm6> S:
netstat -tlpne | grep dovecot
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 0 779247 13261/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 0 779273 13261/dovecot
tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN 0 779231 13261/dovecot
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 0 779274 13261/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 0 779248 13261/dovecot
При этом telnet 127.0.0.1 4190:
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
"IMPLEMENTATION" "Dovecot Pigeonhole"
"SIEVE" "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"
"NOTIFY" "mailto"
"SASL" "PLAIN LOGIN"
"STARTTLS"
"VERSION" "1.0"
OK "Dovecot ready."
sieve-connect --debug --server localhost:
setup: Need to find SSL_ca_path, trying to ask openssl
setup: Have set SSL_ca_path to /usr/lib/ssl/certs
connection: trying <localhost:sieve(4190)> (try 'sieve' in /etc/services, fallback 4190)
connection: remote host address is [127.0.0.1] port [4190]
<<< "IMPLEMENTATION" "Dovecot Pigeonhole"\r\n
<<< "SIEVE" "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"\r\n
<<< "NOTIFY" "mailto"\r\n
<<< "SASL" "PLAIN LOGIN"\r\n
<<< "STARTTLS"\r\n
<<< "VERSION" "1.0"\r\n
<<< OK "Dovecot ready."
-T- will use TLS certs from directory "/usr/lib/ssl/certs"
-T- using hostname 'localhost', verification verify-peer cert-required
>>> STARTTLS\r\n
<<< OK "Begin TLS negotiation now."\r\n
STARTTLS promotion failed: SSL connect attempt failed error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Подозреваю, что проблема где то здесь, но куда дальше копать? 2 дня гуглю, без толку. Буду благодарен за любую помощь. Спасибо заранее.