From 541d3de372d04ae0fa2aea251dc9a200fad5e613 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 5 Dec 2008 09:04:27 +0000 Subject: [PATCH] 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 --- .../mail/personal/mail/sieve/class_sieve.inc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; -- 2.30.2