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
On 05/06/2022 10.27, Jeremy Hansen wrote:
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.
There's a script used by Hestia Control panel to do this. Although its for debian/ubuntu, you might be able to infer the steps from it.
https://github.com/hestiacp/hestiacp/blob/fe68ebe0b66962470a529393ad913069fb...
P.
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
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
On 07.06.2022 08:42, Jeremy Hansen wrote:
$config['managesieve_host'] = 'ssl://mx1.la1.blah.com';
$config['managesieve_auth_type'] = PLAIN;
Try null, and PLAIN should be in quotes.
$config['managesieve_usetls'] = true;
I'd set this option to false, and control the connection type by use of ssl:// or tls:// prefix in managesieve_host. ssl + tls does not make sense.
$config['managesieve_debug'] = true;
Did you check logs/sieve.log?
-- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net]
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
$config['managesieve_port'] = 4190;
$config['managesieve_host'] = 'ssl://mx1.la1.blah.com';
$config['managesieve_auth_type'] = null;
$config['managesieve_auth_cid'] = null;
$config['managesieve_auth_pw'] = null;
$config['managesieve_usetls'] = false;
$config['managesieve_conn_options'] = array( 'ssl' => array( 'verify_peer' => false, 'allow_self_signed' => true, ), );
Same error in the logs. I’m actually not seeing a separate log for sieve. Maybe I have to define a log location or something?
-jeremy
On Tuesday, Jun 07, 2022 at 12:24 AM, Aleksander Machniak
wrote: On 07.06.2022 08:42, Jeremy Hansen wrote: $config['managesieve_host'] = 'ssl://mx1.la1.blah.com';
$config['managesieve_auth_type'] = PLAIN;
Try null, and PLAIN should be in quotes.
$config['managesieve_usetls'] = true;
I'd set this option to false, and control the connection type by use of ssl:// or tls:// prefix in managesieve_host. ssl + tls does not make sense.
$config['managesieve_debug'] = true;
Did you check logs/sieve.log?
-- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net]
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
Figured out my issues. Stupid error on my part. I had $config['managesieve_conn_options'] in there twice defeating my SSL preferences. All is well now.
Thanks -jeremy
On 2022-06-07 00:37, Jeremy Hansen wrote:
$config['managesieve_port'] = 4190;
$config['managesieve_host'] = 'ssl://mx1.la1.blah.com';
$config['managesieve_auth_type'] = null;
$config['managesieve_auth_cid'] = null;
$config['managesieve_auth_pw'] = null;
$config['managesieve_usetls'] = false;
$config['managesieve_conn_options'] = array( 'ssl' => array( 'verify_peer' => false, 'allow_self_signed' => true, ), );
Same error in the logs. I’m actually not seeing a separate log for sieve. Maybe I have to define a log location or something?
-jeremy
On Tuesday, Jun 07, 2022 at 12:24 AM, Aleksander Machniak alec@alec.pl wrote:
On 07.06.2022 08:42, Jeremy Hansen wrote:
$config['managesieve_host'] = 'ssl://mx1.la1.blah.com';
$config['managesieve_auth_type'] = PLAIN;
Try null, and PLAIN should be in quotes.
$config['managesieve_usetls'] = true;
I'd set this option to false, and control the connection type by use of ssl:// or tls:// prefix in managesieve_host. ssl + tls does not make sense.
$config['managesieve_debug'] = true;
Did you check logs/sieve.log?
-- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net]
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
participants (4)
-
Aleksander Machniak
-
Jeremy Hansen
-
Plutocrat
-
Vladislav Kurz