From: hickert Date: Fri, 5 Dec 2008 09:04:27 +0000 (+0000) Subject: Updated class sieve. Just added error messages, in some cases the sieve connection... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=541d3de372d04ae0fa2aea251dc9a200fad5e613;p=gosa.git Updated class sieve. Just added error messages, in some cases the sieve connection failed without any message. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13168 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc index b38fe8b2e..7eaccfa6a 100644 --- a/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc +++ b/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc @@ -282,10 +282,12 @@ class sieve function sieve_login() { - $this->fp=@fsockopen($this->host,$this->port); - if($this->fp == false) + $this->fp=@fsockopen($this->host,$this->port,$err_id,$err_str); + if($this->fp == false){ + $this->error_raw = $err_str; return false; - + } + $this->line=fgets($this->fp,1024); //Hack for older versions of Sieve Server. They do not respond with the Cyrus v2. standard @@ -515,13 +517,16 @@ class sieve while(sieve::status($this->line) == F_DATA) $this->line=fgets($this->fp,1024); - if(sieve::status($this->line) == F_NO) + if(sieve::status($this->line) == F_NO){ + $this->error_raw = "Failed to authenticate!"; return false; + } $this->loggedin=true; return true; break; default: + $this->error_raw = "Unsupported authentication method '".$this->auth_in_use."'!"; return false; break;