#1488594 closed Bugs (fixed)

Managing incoming mail filters not possible

Reported by: 49MvFuNPWK Owned by:
Priority: 5 Milestone: 0.8.1
Component: Plugins Version: 0.8.0
Severity: normal Keywords: managesieve filter dbmail
Cc:

Description

Accessing the settings for 'Filters' is not possible since I've upgraded from 0.7.2 to 0.8.

The user interface shows the following message:

An error occured!
Unknown server error.

The log says:

"roundcube","PHP Error: Unable to connect to managesieve on imap.example.com.:2000 in /var/www/html/roundcubemail/plugins/managesieve/managesieve.php on line 294 (GET /roundcubemail/?_task=settings&_action=plugin.managesieve)"
"roundcube","Failed to read from socket (): "
"dbmail","[0x87dbf90] Notice:[clientbase] client_init(+185): incoming connection from [192.0.43.10:42749]"
"dbmail","[0x87dbf90] Notice:[clientbase] client_init(+167): incoming connection on [192.0.43.10:2000]"

System environment:

  • CentOS release 6.3 (Final)
  • httpd 2.2.15
  • php 5.3.3
  • Roundcube 0.8 (stable)
  • PostgreSQL 9.1
  • dbmail 3.0.2

Change History (12)

comment:1 follow-up: Changed 10 months ago by alec

  • Milestone changed from later to 0.8.1

These errors doesn't look like Roundcube issues. Didn't you change something more in your system?

comment:2 in reply to: ↑ 1 Changed 10 months ago by 49MvFuNPWK

Replying to alec:

These errors doesn't look like Roundcube issues. Didn't you change something more in your system?

After linking the web interface back to a previously taken copy of version 0.7.2 it works without any issue.

I just upgraded via 'installto.sh' according the documentation, without changing anything in my environment.

BTW: A friend of mine who uses the Courier IMAP server encounters problems with managesieve too (after upgrading to release 0.8).

Last edited 10 months ago by 49MvFuNPWK (previous) (diff)

comment:3 Changed 10 months ago by 49MvFuNPWK

I just remembered that I encountered the same issue some time ago.

I was/am able to fix it by replacing:

./plugins/managesieve/lib/Net/Sieve.php

by:

./plugins/managesieve/lib/Net/Sieve.php-1.3.0

comment:4 follow-up: Changed 10 months ago by alec

This can be this bug http://pear.php.net/bugs/bug.php?id=19077. Please, check also hint from the forum thread http://www.roundcubeforum.net/index.php?topic=9168.0

comment:5 in reply to: ↑ 4 Changed 10 months ago by 49MvFuNPWK

Replying to alec:

[...] Please, check also hint from the forum thread http://www.roundcubeforum.net/index.php?topic=9168.0

It's indeed the same bug. Sieve.php-1.3.0 lacks of exactly the lines mentioned by chingson.

comment:6 follow-up: Changed 10 months ago by alec

Could someone provide debug log so we could push Net_Sieve bug forward?

comment:7 in reply to: ↑ 6 ; follow-up: Changed 10 months ago by 49MvFuNPWK

Replying to alec:

Could someone provide debug log so we could push Net_Sieve bug forward?

managesieve debug output:

Date,Facility,Severity,Host,Syslogtag,ProcessID,Messagetype,Message
"Today 11:14:07","1","6","mail","roundcube","","1"," S: \"IMPLEMENTATION\" \"DBMail timsieved 3.0.2\""
"Today 11:14:07","1","6","mail","roundcube","","1"," S: \"SASL\" \"PLAIN\""
"Today 11:14:07","1","6","mail","roundcube","","1"," S: \"SIEVE\" \"regex imap4flags relational subaddress fileinto reject envelope vacation notify \""
"Today 11:14:07","1","6","mail","roundcube","","1"," S: OK"
"Today 11:14:07","1","6","mail","roundcube","","1"," C: CAPABILITY"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: \"IMPLEMENTATION\" \"DBMail timsieved 3.0.2\""
"Today 11:14:07","1","6","mail","roundcube","","1"," S: \"SASL\" \"PLAIN\""
"Today 11:14:07","1","6","mail","roundcube","","1"," S: \"SIEVE\" \"regex imap4flags relational subaddress fileinto reject envelope vacation notify \""
"Today 11:14:07","1","6","mail","roundcube","","1"," S: OK"
"Today 11:14:07","1","6","mail","roundcube","","1"," C: AUTHENTICATE \"PLAIN\" \"secret\""
"Today 11:14:07","1","6","mail","roundcube","","1"," S: OK"
"Today 11:14:07","1","6","mail","roundcube","","1"," C: LISTSCRIPTS"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: \"managesieve\" ACTIVE"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: OK"
"Today 11:14:07","1","6","mail","roundcube","","1"," C: GETSCRIPT \"managesieve\""
"Today 11:14:07","1","6","mail","roundcube","","1"," S: {124+}"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: require [\"imap4flags\",\"fileinto\"];"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: # rule:[Spam]"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: if header :is \"X-Spam-Flag\" \"YES\""
"Today 11:14:07","1","6","mail","roundcube","","1"," S: {"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: #011setflag \"\\Seen\";"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: #011fileinto \"Junk\";"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: }"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: "
"Today 11:14:07","1","5","mail","roundcube","","1"," Failed to read from socket (): "
"Today 11:14:07","1","3","mail","roundcube","","1"," PHP Error: Unable to connect to managesieve on imap.example.com.:2000 in /var/www/html/roundcubemail/plugins/managesieve/managesieve.php on line 294 (GET /roundcubemail/?_task=settings&_action=plugin.managesieve)"
"Today 11:14:07","1","6","mail","roundcube","","1"," C: LOGOUT"
"Today 11:14:07","1","6","mail","roundcube","","1"," S: OK"

comment:8 in reply to: ↑ 7 ; follow-up: Changed 10 months ago by alec

Replying to 49MvFuNPWK:

"Today 11:14:07","1","6","mail","roundcube","","1"," S: "

So, it looks like an empty string from server. Might be a server bug. Could we have a log with patched (working) version?

comment:9 in reply to: ↑ 8 Changed 10 months ago by 49MvFuNPWK

Replying to alec:

[...] Could we have a log with patched (working) version?

et voilà:

Date,Facility,Severity,Host,Syslogtag,ProcessID,Messagetype,Message
"Today 11:47:49","1","6","mail","roundcube","","1"," S: \"IMPLEMENTATION\" \"DBMail timsieved 3.0.2\""
"Today 11:47:49","1","6","mail","roundcube","","1"," S: \"SASL\" \"PLAIN\""
"Today 11:47:49","1","6","mail","roundcube","","1"," S: \"SIEVE\" \"regex imap4flags relational subaddress fileinto reject envelope vacation notify \""
"Today 11:47:49","1","6","mail","roundcube","","1"," S: OK"
"Today 11:47:49","1","6","mail","roundcube","","1"," C: CAPABILITY"
"Today 11:47:49","1","6","mail","roundcube","","1"," S: \"IMPLEMENTATION\" \"DBMail timsieved 3.0.2\""
"Today 11:47:49","1","6","mail","roundcube","","1"," S: \"SASL\" \"PLAIN\""
"Today 11:47:49","1","6","mail","roundcube","","1"," S: \"SIEVE\" \"regex imap4flags relational subaddress fileinto reject envelope vacation notify \""
"Today 11:47:49","1","6","mail","roundcube","","1"," S: OK"
"Today 11:47:49","1","6","mail","roundcube","","1"," C: AUTHENTICATE \"PLAIN\" \"secret\""
"Today 11:47:49","1","6","mail","roundcube","","1"," S: OK"
"Today 11:47:49","1","6","mail","roundcube","","1"," C: LISTSCRIPTS"
"Today 11:47:49","1","6","mail","roundcube","","1"," S: \"managesieve\" ACTIVE"
"Today 11:47:49","1","6","mail","roundcube","","1"," S: OK"
"Today 11:47:49","1","6","mail","roundcube","","1"," C: GETSCRIPT \"managesieve\""
"Today 11:47:49","1","6","mail","roundcube","","1"," S: {124+}"
"Today 11:47:49","1","6","mail","roundcube","","1"," S: require [\"imap4flags\",\"fileinto\"];#012# rule:[Spam]#012if header :is \"X-Spam-Flag\" \"YES\"#012{#012#011setflag \"\\Seen\";#012#011fileinto \"Junk\";#012}"
"Today 11:47:49","1","6","mail","roundcube","","1"," S: OK"
"Today 11:47:49","1","6","mail","roundcube","","1"," C: LOGOUT"
"Today 11:47:49","1","6","mail","roundcube","","1"," S: OK \"Bye.\""

comment:10 follow-up: Changed 10 months ago by alec

I also found this http://dbmail.org/mantis/view.php?id=963 which can be related (fixed after 3.0.2 release). Please, check if this patch fixes the issue too:

--- a/plugins/managesieve/lib/Net/Sieve.php
+++ b/plugins/managesieve/lib/Net/Sieve.php
@@ -1098,7 +1098,7 @@ class Net_Sieve
                     return PEAR::raiseError(trim($response . $line), 6);
                 }
 
-                if (preg_match('/^{([0-9]+)}/i', $line, $matches)) {
+                if (preg_match('/^{([0-9]+)\+?}/i', $line, $matches)) {
                     // Matches literal string responses.
                     $line = $this->_recvBytes($matches[1] + 2);
 

comment:11 in reply to: ↑ 10 Changed 10 months ago by 49MvFuNPWK

Replying to alec:

[...] Please, check if this patch fixes the issue too:

works as well :-)

comment:12 Changed 10 months ago by alec

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.