Topic: Unable to connect to server - Roundcube filter

==== Required information ====
- iRedMail version: iRedMail-0.8.3.tar.bz2, released on 2012-10-13
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.3
- Related log if you're reporting an issue: maillog (see below)

I'm in the process of evaluating iRedMail and I ran into a small snag.  When I am logged in to Roundcube with one of my user accounts, I have no problem adding a filter.  But when I am logged in with other accounts on the same system, I get an "Unable to connect to server" message when I click on the "Filter" option.  Below are the relevant log entries from the /var/log/maillog:

Jan 21 12:57:47 spiderl1 roundcube: Failed to read from socket ():
Jan 21 12:57:47 spiderl1 roundcube: PHP Error: Unable to connect to managesieve on in /var/www/roundcubemail-0.8.2/plugins/managesieve/managesieve.php on line 294 (GET /mail/?_task=settings&_action=plugin.managesieve)
Jan 21 12:57:47 spiderl1 roundcube: Not currently in AUTHORISATION state (1):
Jan 21 12:57:47 spiderl1 roundcube: Failed to write to socket: connection lost ():

I checked the plugins/managesieve/config.inc.php and the port number uses is 4190 which was the default setting during installation.  Since one of my email accounts does not have a problem adding filters, but the other does, I'm lost as to what the problem is.  Any help would be greatly appreciated!



Re: Unable to connect to server - Roundcube filter

I've been able to narrow down the problem so it can be duplicated.  I think this may be a bug in iRedAdmin-Pro... but I'll leave that to Zhang to decide.  Here are the steps to duplicate the problem:

1. After you create a new user, click on "Advanced" and de-select the two IMAP boxes (Fetching mails via IMAP, FEtching mails via IMAP over TLS/SSL).
2. Save Changes.
3. Now go back and check the two IMAP boxes and Save Changes.
4. Log in to Roundcube, select Settings, then select Filters.  The "Unable to connect to server" message will come up every time even though those two IMPAP boxes were checked again.

The problems seems to be that whenever you uncheck the IMAP boxes, and then recheck them again later, the sieve service still thinks that IMAP is disabled.  Something is not getting updated when a user account's IMAP settings are re-enabled.

Let me know if there is a work-around for this.  I'd like to be able to disable IMAP for some people who only need Pop3 accounts, and then later be able to enable it again if they wish to upgrade to IMAP without causing the filtering functionality to break.



Re: Unable to connect to server - Roundcube filter

Sorry for the multiple posts, but I narrowed down the bug further.  I logged in to the phpmyadmin MySQL interface, clicked on the "vmail" database.  I looked at the "mailbox" table and identified two fields that are not being updated whenever those two IMAP boxes are re-enabled as I described in my post above.  The two fields are "enablesieve" and "enablesievesecured", which were both set to "0".  I changed them back to "1" and the problem was resolved.  So it appears iRedAdmin Pro correctly updates those to fields to "0" when the IMAP boxes are un-checked, but it fails to update those two fields whenever the IMAP boxes are checked again.

Hope this helps someone!


Re: Unable to connect to server - Roundcube filter

Sorry about this trouble, this was bug fixed days ago. I can send you development edition of iRedAdmin-Pro-MySQL for trialling if you want.


Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee