[imp] IMAP ACLs [PATCH]

Chris Hastie lists at oak-wood.co.uk
Tue Feb 4 16:57:47 PST 2003


On Tue, 4 Feb 2003, Didi Rieder <adrieder at sbox.tugraz.at> wrote
>Quoting Chris Hastie <lists at oak-wood.co.uk>:
>
>> The line you quoted should appear in the "Current access to <folder>"
>> section.
>
>Yes, it is there....
>
>> Do see any Horde warning as well? (Your answer to this may not
>> actually be that helpful mind, because all the failures produce the same
>> warning :(  )
>
>No, I do not see any additional warning.

Er, that would be because I had horde.warn instead of horde.warning all 
the way through :(

> There is also nothing in apache's
>error_log.

I wouldn't expect there to be, but there may be some clues in Cyrus's 
log.
>
>> Do you have the PEAR Auth_SASL module installed? Not having this
>> shouldn't prevent retrieving ACLs but will force plain text login to be
>> used. If plain text login to your server has been disabled somehow I
>> guess this could cause the problem.
>
>No I don't have it installed.

Does Cyrus accept plain text logins? If not, there's your problem.
>
>> If there's nothing in the above to help you track down the problem I'll
>> try and do a patch for IMP_ACL_rfc2086::_getACL() to return more
>> informative messages about where the problem may lie.
>
>Ok, would be great! Thanks...

Try this patch to imp/lib/ACL/rfc2086.php. It won't solve the problem, 
but it may help identify it.

-------------- next part --------------
--- imp/lib/ACL/rfc2086.php,v 1.1
+++ imp/lib/ACL/rfc2086.php	Tue Feb  4 16:49:38 2003
@@ -161,7 +161,7 @@
             if (version_compare( phpversion(), "4.3.0") >= 0 ){
                 $server = $sub_proto."://".$server;
             } else {
-                $notification->push(_("Could not retrieve server's capabilities"),'horde.warn');
+                $notification->push(_("Could not retrieve server's capabilities")." - "._("SSL connections require PHP 4.3 or better"),'horde.warning');
                 return null;
             }
         }
@@ -169,7 +169,7 @@
         $imap = fsockopen($server, $_SESSION['imp']['port'], $errno, $errstr, 30);
 
         if (!$imap) {
-            $notification->push(_("Could not retrieve server's capabilities"),'horde.warn');
+            $notification->push(_("Could not retrieve server's capabilities")." - "._("Connection failed: ").$errno." : ".$errstr, 'horde.warning');
             return null;
         } else {
             $response = fgets($imap, 4096);
@@ -188,10 +188,10 @@
                     }
 
                 } else {
-                    $notification->push(_("Could not retrieve server's capabilities"),'horde.warn');
+                    $notification->push(_("Could not retrieve server's capabilities")." - "._("Unexpected response from server to: ")."'x CAPABILITY' : ".$response, 'horde.warning');
                 }
             } else {
-                $notification->push(_("Could not retrieve server's capabilities"),'horde.warn');
+                $notification->push(_("Could not retrieve server's capabilities")." - "._("Unexpected response from server on connection: ").$response, 'horde.warning');
             }
             fclose ($imap);
         }   
@@ -279,7 +279,7 @@
             if (version_compare( phpversion(), "4.3.0") >= 0 ){
                 $server = $sub_proto."://".$server;
             } else {
-                $notification->push(_("Could not retrieve ACL"),'horde.warn');
+                $notification->push(_("Could not retrieve ACL")." - "._("SSL connections require PHP 4.3 or better"), 'horde.warning');
                 return null;
             }
         }
@@ -293,7 +293,7 @@
         $imap = fsockopen($server, $_SESSION['imp']['port'], $errno, $errstr, 30);
 
         if (!$imap) {
-            $notification->push(_("Could not retrieve ACL"),'horde.warn');
+            $notification->push(_("Could not retrieve ACL")." - "._("Connection failed: ").$errno." : ".$errstr,'horde.warning');
             return null;
         } else {
             $response = fgets($imap, 4096);
@@ -323,7 +323,7 @@
                     $response = explode (" ", trim(fgets ($imap,1024)));
                     $response = base64_decode($response[1]);
                     if (!preg_match("/rspauth=/", $response)) {
-                        $notification->push(_("Could not retrieve ACL"),'horde.warn');
+                        $notification->push(_("Could not retrieve ACL")." - "._("Unexpected response from server to: ")."Digest-MD5 response",'horde.warning');
                         return null;                    
                     }
                     fputs($imap, "\r\n");
@@ -355,13 +355,13 @@
                             }
                         }
                     } else {
-                        $notification->push(_("Could not retrieve ACL"),'horde.warn');
+                        $notification->push(_("Could not retrieve ACL")." - "._("Unexpected response from server to: ")."'$txid GETACL' : ".$response, 'horde.warning');
                     }
                 } else {
-                    $notification->push(_("Could not retrieve ACL"),'horde.warn');
+                    $notification->push(_("Could not retrieve ACL")." - "._("Unexpected response from server to: ")."login : ".$response, 'horde.warning');
                 }
             } else {
-                $notification->push(_("Could not retrieve ACL"),'horde.warn');
+                $notification->push(_("Could not retrieve ACL")." - "._("Unexpected response from server on connection: ").$response, 'horde.warning');
             }
             fclose ($imap);
         }   
-------------- next part --------------

-- 
Chris Hastie


More information about the imp mailing list