Browse Source

Uses global roundcube sieve configuration option

The previous behaviour relied on managesieve copying over the
.dovecot.sieve file into the user's directory. I found this to be
particularly fragile. For instance, re-deploying roundcube without
dovecot could overwrite the .dovecot.sieve symlink and break
managesieve.

A better approach is to use the global sieve configuration that
roundcube provides and not mess with dovecot's files directly.
James Ravn 10 years ago
parent
commit
6ec6a6d03f

+ 0
- 4
roles/mailserver/tasks/dspam.yml View File

@@ -29,7 +29,3 @@
29 29
     - 90-plugin.conf
30 30
   notify: restart dovecot
31 31
 
32
-- name: Put sieve rules into each user directory
33
-  copy: src=dot_dovecot.sieve dest=/decrypted/{{ item.domain }}/{{ item.account }}/.dovecot.sieve owner=vmail group=dovecot
34
-  with_items: mail_virtual_users
35
-  notify: restart dovecot

roles/mailserver/files/dot_dovecot.sieve → roles/webmail/files/etc_roundcube_global.sieve View File


+ 2
- 2
roles/webmail/files/usr_share_roundcube_plugins_managesieve_config.inc.php View File

@@ -29,10 +29,10 @@ $rcmail_config['managesieve_auth_pw'] = null;
29 29
 $rcmail_config['managesieve_usetls'] = false;
30 30
 
31 31
 // default contents of filters script (eg. default spam filter)
32
-$rcmail_config['managesieve_default'] = '/etc/dovecot/sieve/global';
32
+$rcmail_config['managesieve_default'] = '/etc/roundcube/global.sieve';
33 33
 
34 34
 // The name of the script which will be used when there's no user script
35
-$rcmail_config['managesieve_script_name'] = 'managesieve';
35
+$rcmail_config['managesieve_script_name'] = 'roundcube';
36 36
 
37 37
 // Sieve RFC says that we should use UTF-8 endcoding for mailbox names,
38 38
 // but some implementations does not covert UTF-8 to modified UTF-7.

+ 3
- 0
roles/webmail/tasks/roundcube.yml View File

@@ -17,6 +17,9 @@
17 17
 - name: Configure roundcube's managesieve plugin
18 18
   copy: src=usr_share_roundcube_plugins_managesieve_config.inc.php dest=/usr/share/roundcube/plugins/managesieve/config.inc.php group=www-data owner=root mode=640 force=yes
19 19
 
20
+- name: Copy global default sieve rules
21
+  copy: src=etc_roundcube_global.sieve dest=/etc/roundcube/global.sieve owner=root group=www-data mode=640
22
+
20 23
 - name: Enable roundcube site
21 24
   command: a2ensite roundcube creates=/etc/apache2/sites-enabled/roundcube
22 25
   notify: restart apache

Loading…
Cancel
Save