Code

Added sieve error fix
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Sep 2006 11:46:03 +0000 (11:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Sep 2006 11:46:03 +0000 (11:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4569 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/mail/class_mailAccount.inc

index fc3eccb768b4c142f302f506deed7714f248bac3..11a23bb5599ffe84e4ac953edb3071759bf96601 100644 (file)
@@ -758,16 +758,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);
+        /* Only talk with sieve if the mail account already exists */
+        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);
+          }
         }
       }
     }