Code

Cleaned mail plugin etc directory.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Oct 2009 08:16:44 +0000 (08:16 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Oct 2009 08:16:44 +0000 (08:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14550 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/etc/mail/sieve-discard.txt [new file with mode: 0644]
gosa-plugins/mail/etc/mail/sieve-header.txt [new file with mode: 0644]
gosa-plugins/mail/etc/mail/sieve-mailsize.txt [new file with mode: 0644]
gosa-plugins/mail/etc/mail/sieve-spam.txt [new file with mode: 0644]
gosa-plugins/mail/etc/mail/sieve-vacation.txt [new file with mode: 0644]
gosa-plugins/mail/etc/sieve-discard.txt [deleted file]
gosa-plugins/mail/etc/sieve-header.txt [deleted file]
gosa-plugins/mail/etc/sieve-mailsize.txt [deleted file]
gosa-plugins/mail/etc/sieve-spam.txt [deleted file]
gosa-plugins/mail/etc/sieve-vacation.txt [deleted file]
gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc

diff --git a/gosa-plugins/mail/etc/mail/sieve-discard.txt b/gosa-plugins/mail/etc/mail/sieve-discard.txt
new file mode 100644 (file)
index 0000000..8ac4db6
--- /dev/null
@@ -0,0 +1,3 @@
+# Do not deliver to own mailbox
+discard;
+
diff --git a/gosa-plugins/mail/etc/mail/sieve-header.txt b/gosa-plugins/mail/etc/mail/sieve-header.txt
new file mode 100644 (file)
index 0000000..5222282
--- /dev/null
@@ -0,0 +1,3 @@
+###GOSA
+require ["fileinto", "reject", "vacation"];
+
diff --git a/gosa-plugins/mail/etc/mail/sieve-mailsize.txt b/gosa-plugins/mail/etc/mail/sieve-mailsize.txt
new file mode 100644 (file)
index 0000000..de639c2
--- /dev/null
@@ -0,0 +1,17 @@
+#  Reject mails with bigger size
+if size :over {$maxsize}M{
+        reject text:
+Dear sender,
+
+the mail you sent to our mailsystem has been rejected due
+to a user configured maximum mail size ($maxsize MB).
+
+Either ask the user to remove the sizelimit, or send smaller pieces.
+
+Thank you,
+ the mailserver
+.
+        ;
+        discard;
+}
+
diff --git a/gosa-plugins/mail/etc/mail/sieve-spam.txt b/gosa-plugins/mail/etc/mail/sieve-spam.txt
new file mode 100644 (file)
index 0000000..63392d0
--- /dev/null
@@ -0,0 +1,5 @@
+# Sort mails with higher spam level
+if header :contains "X-Spam-Level" "$spamlevel" {
+  fileinto "$spambox";
+}
+
diff --git a/gosa-plugins/mail/etc/mail/sieve-vacation.txt b/gosa-plugins/mail/etc/mail/sieve-vacation.txt
new file mode 100644 (file)
index 0000000..3aed3a9
--- /dev/null
@@ -0,0 +1,4 @@
+# Vacation message
+vacation :addresses [$addrlist]
+"$vacmsg" ;
+
diff --git a/gosa-plugins/mail/etc/sieve-discard.txt b/gosa-plugins/mail/etc/sieve-discard.txt
deleted file mode 100644 (file)
index 8ac4db6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Do not deliver to own mailbox
-discard;
-
diff --git a/gosa-plugins/mail/etc/sieve-header.txt b/gosa-plugins/mail/etc/sieve-header.txt
deleted file mode 100644 (file)
index 5222282..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-###GOSA
-require ["fileinto", "reject", "vacation"];
-
diff --git a/gosa-plugins/mail/etc/sieve-mailsize.txt b/gosa-plugins/mail/etc/sieve-mailsize.txt
deleted file mode 100644 (file)
index de639c2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#  Reject mails with bigger size
-if size :over {$maxsize}M{
-        reject text:
-Dear sender,
-
-the mail you sent to our mailsystem has been rejected due
-to a user configured maximum mail size ($maxsize MB).
-
-Either ask the user to remove the sizelimit, or send smaller pieces.
-
-Thank you,
- the mailserver
-.
-        ;
-        discard;
-}
-
diff --git a/gosa-plugins/mail/etc/sieve-spam.txt b/gosa-plugins/mail/etc/sieve-spam.txt
deleted file mode 100644 (file)
index 63392d0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# Sort mails with higher spam level
-if header :contains "X-Spam-Level" "$spamlevel" {
-  fileinto "$spambox";
-}
-
diff --git a/gosa-plugins/mail/etc/sieve-vacation.txt b/gosa-plugins/mail/etc/sieve-vacation.txt
deleted file mode 100644 (file)
index 3aed3a9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Vacation message
-vacation :addresses [$addrlist]
-"$vacmsg" ;
-
index e054fa29ef85ecd45e0456e9e1a40e4eb6127e78..3f6192fe1111c434f7e923a8c5ca06b329e57efe 100644 (file)
@@ -437,9 +437,9 @@ class mailMethodCyrus extends mailMethod{
     // Check file integrity 
     $files = array();
     foreach(array("sieve-header.txt","sieve-spam.txt","sieve-mailsize.txt","sieve-vacation.txt","sieve-discard.txt") as $file){
-      if(!file_exists(CONFIG_DIR."/".$file) || ! is_readable(CONFIG_DIR."/".$file)){
-        $files[] = CONFIG_DIR."/".$file;
-        @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__ , CONFIG_DIR."/".$file,
+      if(!file_exists(CONFIG_DIR."/mail/".$file) || ! is_readable(CONFIG_DIR."/mail/".$file)){
+        $files[] = CONFIG_DIR."/mail/".$file;
+        @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__ , CONFIG_DIR."/mail/".$file,
             "<b>Sieve template missing, please locate and move the template file: </b>");
       }
     }
@@ -527,14 +527,14 @@ class mailMethodCyrus extends mailMethod{
         is_integer(strpos($gosaMailDeliveryMode, "V")) ||
         is_integer(strpos($gosaMailDeliveryMode, "S"))){
 
-      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/sieve-header.txt")));
+      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/mail/sieve-header.txt")));
       eval ("\$script.=\"$text\";");
     }
 
     /* Add anti-spam code */
     if (is_integer(strpos($gosaMailDeliveryMode, "S"))){
       $spambox= $gosaSpamMailbox;
-      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/sieve-spam.txt")));
+      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/mail/sieve-spam.txt")));
       eval ("\$script.=\"$text\";");
     }
 
@@ -542,7 +542,7 @@ class mailMethodCyrus extends mailMethod{
        adjustable through GOsa. */
     if (is_integer(strpos($gosaMailDeliveryMode, "R"))){
       $maxsize= $gosaMailMaxSize;
-      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/sieve-mailsize.txt")));
+      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/mail/sieve-mailsize.txt")));
       eval ("\$script.=\"$text\";");
     }
 
@@ -557,13 +557,13 @@ class mailMethodCyrus extends mailMethod{
         $addrlist .= ", \"$val\"";
       }
       $vacmsg= $gosaVacationMessage;
-      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/sieve-vacation.txt")));
+      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/mail/sieve-vacation.txt")));
       eval ("\$script.=\"$text\";");
     }
 
     /* If no local delivery is wanted, tell the script to discard the mail */
     if (!is_integer(strpos($gosaMailDeliveryMode, "L"))){
-      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/sieve-discard.txt")));
+      $text= preg_replace('/"/', '\\"', implode ("", file(CONFIG_DIR."/mail/sieve-discard.txt")));
       eval ("\$script.=\"$text\";");
     }