Here’s some more information:
When attemtping to load the filters configuration on Roundcube, I see this in Dovecot’s logs:
Jun 06 23:25:30 mx1.la1.blah.com dovecot[693354]: managesieve-login: Disconnected: Too many invalid commands. (no auth attempts in 0 secs): user=<>, rip=192.168.30.48, lip=192.168.30.21, session=<5628p9Xg6oTAqB4w>
I don’t know if user=<> indicates that the username isn’t being passed properly but it seems like a good guess based on "no auth attempts in 0 secs”.
My Roundcube configuration looks like this:
$config['managesieve_port'] = 4190;
$config['managesieve_host'] = 'ssl://mx1.la1.blah.com';
$config['managesieve_auth_type'] = PLAIN;
$config['managesieve_auth_cid'] = null;
$config['managesieve_auth_pw'] = null;
$config['managesieve_usetls'] = true;
$config['managesieve_conn_options'] = array( 'ssl' => array( 'verify_peer' => false, 'allow_self_signed' => true, ), ); $config['managesieve_conn_options'] = null;
$config['managesieve_default'] = '/etc/dovecot/sieve/global';
$config['managesieve_script_name'] = 'managesieve';
$config['managesieve_mbox_encoding'] = 'UTF-8';
$config['managesieve_replace_delimiter'] = '';
$config['managesieve_disabled_extensions'] = [];
$config['managesieve_debug'] = true;
$config['managesieve_kolab_master'] = false;
$config['managesieve_filename_extension'] = '.sieve';
$config['managesieve_filename_exceptions'] = [];
$config['managesieve_domains'] = [];
$config['managesieve_default_headers'] = ['Subject', 'From', 'To'];
$config['managesieve_vacation'] = 0;
$config['managesieve_forward'] = 0;
$config['managesieve_vacation_interval'] = 0;
$config['managesieve_vacation_addresses_init'] = false;
$config['managesieve_vacation_from_init'] = false;
$config['managesieve_notify_methods'] = ['mailto'];
$config['managesieve_raw_editor'] = true;
$config['managesieve_disabled_actions'] = [];
$config['managesieve_allowed_hosts'] = null;
My dovecot configuration looks like this:
netstat -tanp | grep 419 tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN 693351/dovecot tcp6 0 0 :::4190 :::* LISTEN 693351/dovecot
from roundcube host to dovecot host:
telnet mx1.la1.blah.com 4190 Trying 192.168.30.21... Connected to mx1.la1.blah.com. 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" "" "STARTTLS" "VERSION" "1.0" OK "Dovecot ready.”
90-sieve.conf:
plugin { sieve = file:~/sieve;active=~/.dovecot.sieve recipient_delimiter = + }
20-managesieve.conf:
protocols = $protocols sieve
service managesieve-login { inet_listener sieve { port = 4190 } }
protocol sieve { }
20-lmtp.conf:
protocol lmtp { mail_plugins = $mail_plugins sieve }
Postfix config:
mailbox_transport = lmtp:unix:private/dovecot-lmtp local_transport = lmtp:unix:private/dovecot-lmtp
Thanks for your help. -jeremy
On Monday, Jun 06, 2022 at 12:59 AM, Vladislav Kurz
wrote: Dne 05. 06. 22 v 4:27 Jeremy Hansen napsal(a): Any pointers to get dovecot configured with sieve for Roundcube filters? Things I’ve found through search seem a bit all over the place. I’m using CentOS 8/Rocky Linux hosts.
Thanks
managesieve plugin for roundcube should be able to configure sieve scripts if you open sieve port on dovecot.
-- Best regards Vladislav Kurz