Просмотр исходного кода

Fix dovecot mailbox configuration

* Map client-specific folders to global folders
* Fix "Connection to the storage server failed" error encountered on Ubuntu 16.04 LTS.
Kristan Kenney 7 лет назад
Родитель
Сommit
5f8144b1a0
2 измененных файлов с 51 добавлено и 3 удалено
  1. 35 3
      install/deb/dovecot/dovecot.conf
  2. 16 0
      install/upgrade/0.9.8-28.sh

+ 35 - 3
install/deb/dovecot/dovecot.conf

@@ -7,19 +7,51 @@ login_greeting = Mail Delivery Agent
 namespace {
     type = private
     separator = /
-    prefix =
     inbox = yes
+    list = yes
 
-    mailbox Sent {
+    mailbox Archive {
         auto = subscribe
-        special_use = \Sent
+        special_use = \Archive
     }
+
     mailbox Drafts {
         auto = subscribe
         special_use = \Drafts
     }
+
     mailbox Trash {
         auto = subscribe
         special_use = \Trash
     }
+
+    mailbox "Deleted Messages" {
+        auto = no
+        special_use = \Trash
+    }
+
+    mailbox Junk {
+        auto = subscribe
+        special_use = \Junk
+    }
+
+    mailbox Spam {
+        auto = no
+        special_use = \Junk
+    }
+
+    mailbox Sent {
+        auto = subscribe
+        special_use = \Sent
+    }
+
+    mailbox "Sent Mail" {
+        auto = no
+        special_use = \Sent
+    }
+    
+    mailbox "Sent Messages" {
+        auto = no
+        special_use = \Sent
+    }
 }

+ 16 - 0
install/upgrade/0.9.8-28.sh

@@ -73,3 +73,19 @@ cp -rf /usr/local/hestia/install/ubuntu/18.04/templates/web/unassigned/* /var/ww
 if [ ! -d /usr/local/hestia/web/edit/server/clamav-daemon ]; then
     mv /usr/local/hestia/web/edit/server/clamd /usr/local/web/edit/server/clamav-daemon
 fi
+
+# Fix dovecot configuration
+if [ -f /etc/dovecot/conf.d/15-mailboxes.conf ]; then
+    # Remove mailboxes configuration if it exists
+    rm -f /etc/dovecot/conf.d/15-mailboxes.conf
+fi
+if [ -f /etc/dovecot/dovecot.conf ]; then
+    # Update dovecot configuration and restart dovecot service
+    cp -f /usr/local/hestia/install/hestia-data/dovecot/dovecot.conf /etc/dovecot/dovecot.conf
+    systemctl restart dovecot
+fi
+
+# Rebuild mailboxes
+for user in `ls /usr/local/hestia/data/users/`; do
+    v-rebuild-mail-domains $user
+done