Hi!
I am successfully running Roundcube Webmail 1.3.4 for TLS email for a few years now, but getting spamassassin working correctly has taken me to debug RC's managesieve.
I have done quite some research into setting up the sieve. I believe I have overcome one major issue which was that I was not able to connect to port 4190. It turned out that I needed to append 'sieve' to the list of protocols in /etc/dovecot/dovecot.conf
protocols = imap pop3 sieve
and NOT like this in 20-managesieve.conf:
protocols = $protocols sieve
This is strange because all other changes I make in 20-managesieve.conf are picked up and can be seen using dovecot -n. See below:
I am now able to telnet into localhost and connect with 4190. I can also do this from another server, but this is a local port access no?
The situation now, is that I still get the error 'unable to connect to managesieve server', but also I get a PHP error:
QuoteWarning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in /var/www/_apps/roundcubemail-1.3.4/vendor/pear/net_sieve/Sieve.php on line 1239
There is a config option (managesieve_conn_options) for ssl to enable server certificate validation, but I have no idea what might be needed there.
Can anyone shed some light on this?
dovecot -n
Quote# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.13 (7b14904)
# OS: Linux 4.4.0-210-generic x86_64 Ubuntu 16.04.7 LTS
auth_mechanisms = plain login
disable_plaintext_auth = no
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
mail_location = maildir:~/Maildir
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
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
driver = pam
}
plugin {
sieve = file:~/sieve;active=~/.dovecot.sieve
sieve_default = /var/lib/dovecot/sieve/default.sieve
}
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
postmaster_address = [email protected]
protocols = imap pop3 sieve
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
}
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
service managesieve-login {
inet_listener sieve {
address = *
port = 4190
}
process_min_avail = 1
service_count = 1
vsz_limit = 64 M
}
service managesieve {
process_limit = 1024
}
service pop3-login {
inet_listener pop3 {
port = 110
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
ssl_ca = </etc/postfix/ssl/cacert.pem
ssl_cert = </etc/postfix/ssl/mail.domain.tld.crt
ssl_key = </etc/postfix/ssl/mail.domain.tld.key
userdb {
driver = passwd
}
protocol lda {
mail_plugins = " sieve sieve"
}
protocol sieve {
mail_max_userip_connections = 10
mail_plugins = sieve
managesieve_max_line_length = 65536
}