1 (edited by petrapana 2020-06-20 05:25:35)

Topic: Unable to connect to managesieve from Roundcube after update

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.2.1 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version:  Debian 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,
I just updated my iRedMail server from version 0.9.9 to latest 1.2.1 (I updated through all versions). Since the update I am not able to manage managesieve rules from Roundcube. Web page says "Unable to connect".

/var/log/maillog:

Jun 19 22:58:40 mail roundcube: <bjnpe2f9> [1] SELECT `vars`, `ip`, `changed`, now() AS ts FROM `session` WHERE `sess_id` = 'bjnpe2f9nsarmfch660acqtal6';
Jun 19 22:58:40 mail roundcube: <bjnpe2f9> [2] SELECT * FROM `users` WHERE `user_id` = '2';
Jun 19 22:58:42 mail roundcube: <bjnpe2f9> PHP Error: "Authentication failed." (GET /mail/?_task=settings&_action=plugin.managesieve)
Jun 19 22:58:42 mail roundcube: <bjnpe2f9> PHP Error: Unable to connect to managesieve on 127.0.0.1:4190 in /opt/www/roundcubemail-1.3.8/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php on line 223 (GET /mail/?_task=settings&_action=plugin.managesieve)
Jun 19 22:58:42 mail roundcube: <bjnpe2f9> PHP Error: Not currently in AUTHORISATION state (GET /mail/?_task=settings&_action=plugin.managesieve)
Jun 19 22:58:42 mail roundcube: <bjnpe2f9> [3] SELECT `vars`, `ip`, `changed`, now() AS ts FROM `session` WHERE `sess_id` = 'bjnpe2f9nsarmfch660acqtal6';

/var/log/dovecot/sieve.log
Jun 19 22:58:42 mail dovecot: managesieve-login: Aborted login (auth failed, 1 attempts in 2 secs): user=<user@domain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS, session=<abteKHaooMp/AAAB>

I think it is somehow related to dovecot vs. TLS vs. non tls but I cannot figure out where the issue is.

Could you please help?

Thank you,
P.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Unable to connect to managesieve from Roundcube after update

Update:

After another investigation I have found that actually only one specific user is not able to connect to managesieve db through the web interface. All other users (those I have tested) are working correctly. Any ideas what to check if only this one specific user is having issues and how to deeper debug?

3

Re: Unable to connect to managesieve from Roundcube after update

Please login to iRedAdmin-Pro, then go to user profile page, click tab "Advanced", is managesieve (or sieve) service disabled for this user?

4

Re: Unable to connect to managesieve from Roundcube after update

Hello,
thank you for suggestion. For the user there are following four checked:

*Receiving mails for this account on mail server
*Sending mails via SMTP over TLS/SSL
*Fetching mails via IMAP over TLS/SSL
*SOGo Groupware (Calendar, Contacts, Tasks, ActiveSync)

I dag deeper into it and I realized that the reason why the connection to the managesieve is broken is that I have checked the option "SOGo Groupware" for the user. Since the time I checked this option, the user cannot configure OutOfOffice response through Roudcube. If I uncheck this box, the user is unfortunately still not able to configure the OoO responses. Not sure why this happens, but please take into consideration, that I have installed the mailserver without SOGo and installed this option later on (as suggested https://forum.iredmail.org/post74607.html#p74607 ) so maybe something has not been correctly configured.

Thank you,
P.

5

Re: Unable to connect to managesieve from Roundcube after update

You may want to read this tutorial:
https://docs.iredmail.org/why.no.sieve. … .sogo.html

Do not enable sieve support in BOTH Roundcube and SOGo.

You may need to turn on debug mode in Dovecot and reproduce the issue, then check Dovecot log to figure out why it failed. FYI: https://docs.iredmail.org/debug.dovecot.html

6 (edited by petrapana 2020-09-09 07:04:39)

Re: Unable to connect to managesieve from Roundcube after update

Hi,
thank you for some direction. I was thinking that the issue is linked to SoGo. I have checked directly in DB and despite I removed the users the SoGo functionality through the gui, the enablesieve and enablesievesecured  was not re-added back. I simply updated the DB manually for all users since I do not want to use SoGo.

For future reference and if someones ends up in the same situation login to mysql and perform following commands.

To list users which we are going to modify:

select username,enablesieve,enablesogo,enablesievesecured from mailbox where enablesieve=0;
select username,enablesieve,enablesogo,enablesievesecured from mailbox where enablesogo=1;
select username,enablesieve,enablesogo,enablesievesecured from mailbox where enablesievesecured=0;


!!!Please be aware that those commands will completely disable SoGo functionality for all users and configures all users to use sieve rules under tls!!!!

To disable the SoGo functionality for all users and force them to use tls sieve run following SQL scripts:

update mailbox set enablesieve=1 where enablesieve=0;
update mailbox set enablesogo=0 where enablesogo=1;
update mailbox set enablesievesecured=1 where enablesievesecured=0;