Browse Source

Move mail domain directories from data into mail subfolder

Thomas Buck 5 years ago
parent
commit
f10b074083

+ 1
- 1
roles/mailserver/files/etc_dovecot_conf.d_10-mail.conf View File

27
 #
27
 #
28
 # <doc/wiki/MailLocation.txt>
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
 # If you need to set multiple mailbox locations or want to change default
32
 # If you need to set multiple mailbox locations or want to change default
33
 # namespace settings, you can do it by defining namespace sections.
33
 # namespace settings, you can do it by defining namespace sections.

+ 1
- 1
roles/mailserver/files/etc_dovecot_conf.d_auth-sql.conf.ext View File

18
 
18
 
19
 userdb {
19
 userdb {
20
   driver = static
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
 # If you don't have any user-specific settings, you can avoid the user_query
24
 # If you don't have any user-specific settings, you can avoid the user_query

+ 10
- 2
roles/mailserver/tasks/dovecot.yml View File

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

Loading…
Cancel
Save