Преглед изворни кода

Move mail domain directories from data into mail subfolder

Thomas Buck пре 5 година
родитељ
комит
f10b074083

+ 1
- 1
roles/mailserver/files/etc_dovecot_conf.d_10-mail.conf Прегледај датотеку

@@ -27,7 +27,7 @@
27 27
 #
28 28
 # <doc/wiki/MailLocation.txt>
29 29
 #
30
-mail_location = maildir:/data/%d/%n
30
+mail_location = maildir:/data/mail/%d/%n
31 31
 
32 32
 # If you need to set multiple mailbox locations or want to change default
33 33
 # namespace settings, you can do it by defining namespace sections.

+ 1
- 1
roles/mailserver/files/etc_dovecot_conf.d_auth-sql.conf.ext Прегледај датотеку

@@ -18,7 +18,7 @@ passdb {
18 18
 
19 19
 userdb {
20 20
   driver = static
21
-  args = uid=vmail gid=vmail home=/data/%d/%n
21
+  args = uid=vmail gid=vmail home=/data/mail/%d/%n
22 22
 }
23 23
 
24 24
 # If you don't have any user-specific settings, you can avoid the user_query

+ 10
- 2
roles/mailserver/tasks/dovecot.yml Прегледај датотеку

@@ -32,10 +32,18 @@
32 32
     home=/data
33 33
     shell=/usr/sbin/nologin
34 34
 
35
+- name: Ensure mail directory is in place
36
+  file:
37
+    state=directory
38
+    path=/data/mail
39
+    owner=vmail
40
+    group=dovecot
41
+    mode=0770
42
+
35 43
 - name: Ensure mail domain directories are in place
36 44
   file:
37 45
     state=directory
38
-    path=/data/{{ item.name }}
46
+    path=/data/mail/{{ item.name }}
39 47
     owner=vmail
40 48
     group=dovecot
41 49
     mode=0770
@@ -44,7 +52,7 @@
44 52
 - name: Ensure mail directories are in place
45 53
   file:
46 54
     state=directory
47
-    path=/data/{{ item.domain }}/{{ item.account }}
55
+    path=/data/mail/{{ item.domain }}/{{ item.account }}
48 56
     owner=vmail
49 57
     group=dovecot
50 58
   with_items: '{{ mail_virtual_users }}'

Loading…
Откажи
Сачувај