Code

Added "Couldn't connect to sieve" fix
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Sep 2006 11:47:03 +0000 (11:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Sep 2006 11:47:03 +0000 (11:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4570 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/mail/class_mailAccount.inc

index 570d6227cdc02d88b068bc2ac5261f1b18c965bf..541a31d4dcae964fe031428dc3225872592ee9f1 100644 (file)
@@ -733,16 +733,20 @@ class mailAccount extends plugin
         $method->setQuota($this->folder_prefix.$this->$id, $this->gosaMailQuota);
         $method->disconnect();
 
-        /* Write sieve information only if not in C mode */
-        if (!is_integer(strpos($this->gosaMailDeliveryMode, "C"))){
-          $method->configureFilter($this->$id,
-              $this->gosaMailDeliveryMode,
-              $this->mail,
-              $this->gosaMailAlternateAddress,
-              $this->gosaMailMaxSize,
-              $this->gosaSpamMailbox,
-              $this->gosaSpamSortLevel,
-              $this->gosaVacationMessage);
+        /* Ensure that this is an existing account */
+        if($this->initially_was_account){
+
+          /* Write sieve information only if not in C mode */
+          if (!is_integer(strpos($this->gosaMailDeliveryMode, "C"))){
+            $method->configureFilter($this->$id,
+                $this->gosaMailDeliveryMode,
+                $this->mail,
+                $this->gosaMailAlternateAddress,
+                $this->gosaMailMaxSize,
+                $this->gosaSpamMailbox,
+                $this->gosaSpamSortLevel,
+                $this->gosaVacationMessage);
+          }
         }
       }
     }