tags 618569 +patch
thanks

Hi,
I was seeing the same problem. The attached patch fixes this for me. The
issue here is that dovecot isn't properly advertising PLAIN. Details can
be found in the patch.
Cheers,
 -- Guido
>From 8dec6396b8744f88a7bfc44bb1217d12c385a769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org>
Date: Sun, 15 Jan 2012 14:58:12 +0100
Subject: [PATCH] Interpret an empty auth mechanism as PLAIN

When enabling PLAIN and GSSAPI auth in dovecot (at least) 1.0.15 the
response looks like:

Trying 127.0.0.2...
Connected to imap.example.com.
Escape character is '^]'.
"IMPLEMENTATION" "dovecot"
"SASL" " GSSAPI"
"SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational comparator-i;ascii-numeric regex"
"STARTTLS"
OK "Dovecot ready."

Note the extra space in front of the GSSAPI. Dovecot is configured to
allow for PLAIN and GSSAPI but PLAIN is missing from the list.
---
 include/managesieve.lib.php |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/managesieve.lib.php b/include/managesieve.lib.php
index 13240be..5c4d05e 100644
--- a/include/managesieve.lib.php
+++ b/include/managesieve.lib.php
@@ -456,8 +456,11 @@ class sieve {
               }
               $this->modules = split(" ", $this->item[1]);
               if(is_array($this->modules)){
-                  foreach($this->modules as $this->module)
+                  foreach($this->modules as $this->module) {
+                      if(strlen($this->module) == 0)
+                          $this->module = "PLAIN";
                       $this->capabilities[$this->cap_type][$this->module]=true;
+		  }
               } /* end if */
               elseif(is_string($this->modules))
                   $this->capabilites[$this->cap_type][$this->modules]=true;
-- 
1.7.7.3

Reply via email to