Hello,
Ok so I have set everything to ~/sieve dir on the 2 nodes:
doveconf -n | grep siev
managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave editheader sieve = ~/.dovecot.sieve sieve_after = ~/sieve sieve_before = ~/sieve sieve_dir = ~/sieve sieve_extensions = +editheader sieve_max_redirects = 20 protocols = " imap lmtp sieve pop3" service managesieve-login { inet_listener sieve { mail_plugins = " quota notify replication sieve" mail_plugins = " quota notify replication sieve"
This way after I add a brand new user the sieve dir will be replicated but nothing after that. I have added a new user on node2 then enabled out of office message, the sieve files were created under the:
/home/vmail/company.com/user5@company.com/sieve
-rw------- 1 vmail vmail 1011 Jul 22 09:49 01_vacation.sieve -rw------- 1 vmail vmail 644 Jul 22 09:49 01_vacation.svbin
directory but were never replicated not even after restarting both dove nodes.
Node2
Jul 22 09:47:54 mailnode2 dovecot: dsync-local(user5@company.com):
Debug: doveadm-sieve: Iterating Sieve mailbox attributes
Jul 22 09:47:54 mailnode2 dovecot: dsync-local(user5@company.com):
Debug: sieve: Pigeonhole version 0.4.2 initializing
Jul 22 09:47:54 mailnode2 dovecot: dsync-local(user5@company.com):
Debug: sieve: include: sieve_global_dir is not set; it is currently not
possible to include :global' scripts. Jul 22 09:47:54 mailnode2 dovecot: dsync-local(user5@company.com): Debug: sieve-storage: using active sieve script path: /home/vmail/company.com/user5@company.com//.dovecot.sieve Jul 22 09:47:54 mailnode2 dovecot: dsync-local(user5@company.com): Debug: sieve-storage: using sieve script storage directory: /home/vmail/company.com/user5@company.com//sieve Jul 22 09:47:54 mailnode2 dovecot: dsync-local(user5@company.com): Debug: sieve-storage: permission lookup failed from /home/vmail/company.com/user5@company.com//sieve Jul 22 09:47:54 mailnode2 dovecot: dsync-local(user5@company.com): Debug: sieve-storage: created storage directory /home/vmail/company.com/user5@company.com//sieve/tmp Jul 22 09:47:54 mailnode2 dovecot: dsync-local(user5@company.com): Debug: sieve-storage: relative path to sieve storage in active link: sieve/ Jul 22 09:47:54 mailnode2 dovecot: dsync-server(user5@company.com): Debug: doveadm-sieve: Iterating Sieve mailbox attributes Jul 22 09:47:54 mailnode2 dovecot: dsync-server(user5@company.com): Debug: sieve: Pigeonhole version 0.4.2 initializing Jul 22 09:47:54 mailnode2 dovecot: dsync-server(user5@company.com): Debug: sieve: include: sieve_global_dir is not set; it is currently not possible to include
:global' scripts.
Jul 22 09:47:54 mailnode2 dovecot: dsync-server(user5@company.com):
Debug: sieve-storage: using active sieve script path:
/home/vmail/company.com/user5@company.com//.dovecot.sieve
Jul 22 09:47:54 mailnode2 dovecot: dsync-server(user5@company.com):
Debug: sieve-storage: using sieve script storage directory:
/home/vmail/company.com/user5@company.com//sieve
Jul 22 09:47:54 mailnode2 dovecot: dsync-server(user5@company.com):
Debug: sieve-storage: using permissions from
/home/vmail/company.com/user5@company.com//sieve: mode=0700 gid=-1
Jul 22 09:47:54 mailnode2 dovecot: dsync-server(user5@company.com):
Debug: sieve-storage: relative path to sieve storage in active link:
sieve/
Node1
Jul 22 09:50:16 mailnode1 dovecot: dsync-server(user5@company.com):
Debug: doveadm-sieve: Iterating Sieve mailbox attributes
Jul 22 09:50:16 mailnode1 dovecot: dsync-server(user5@company.com):
Debug: sieve: Pigeonhole version 0.4.2 initializing
Jul 22 09:50:16 mailnode1 dovecot: dsync-server(user5@company.com):
Debug: sieve: include: sieve_global_dir is not set; it is currently not
possible to include :global' scripts. Jul 22 09:50:16 mailnode1 dovecot: dsync-server(user5@company.com): Debug: sieve-storage: using active sieve script path: /home/vmail/company.com/user5@company.com//.dovecot.sieve Jul 22 09:50:16 mailnode1 dovecot: dsync-server(user5@company.com): Debug: sieve-storage: using sieve script storage directory: /home/vmail/company.com/user5@company.com//sieve Jul 22 09:50:16 mailnode1 dovecot: dsync-server(user5@company.com): Debug: sieve-storage: permission lookup failed from /home/vmail/company.com/user5@company.com//sieve Jul 22 09:50:16 mailnode1 dovecot: dsync-server(user5@company.com): Debug: sieve-storage: created storage directory /home/vmail/company.com/user5@company.com//sieve/tmp Jul 22 09:50:16 mailnode1 dovecot: dsync-server(user5@company.com): Debug: sieve-storage: relative path to sieve storage in active link: sieve/ Jul 22 09:50:16 mailnode1 dovecot: dsync-local(user5@company.com): Debug: doveadm-sieve: Iterating Sieve mailbox attributes Jul 22 09:50:16 mailnode1 dovecot: dsync-local(user5@company.com): Debug: sieve: Pigeonhole version 0.4.2 initializing Jul 22 09:50:16 mailnode1 dovecot: dsync-local(user5@company.com): Debug: sieve: include: sieve_global_dir is not set; it is currently not possible to include
:global' scripts.
Jul 22 09:50:16 mailnode1 dovecot: dsync-local(user5@company.com):
Debug: sieve-storage: using active sieve script path:
/home/vmail/company.com/user5@company.com//.dovecot.sieve
Jul 22 09:50:16 mailnode1 dovecot: dsync-local(user5@company.com):
Debug: sieve-storage: using sieve script storage directory:
/home/vmail/company.com/user5@company.com//sieve
Jul 22 09:50:16 mailnode1 dovecot: dsync-local(user5@company.com):
Debug: sieve-storage: using permissions from
/home/vmail/company.com/user5@company.com//sieve: mode=0700 gid=-1
Jul 22 09:50:16 mailnode1 dovecot: dsync-local(user5@company.com):
Debug: sieve-storage: relative path to sieve storage in active link:
sieve/
On Thu, 21 Jul 2016 17:19:25 +0200, Stephan Bosch wrote:
Op 21-7-2016 om 15:50 schreef Luescher Claude:
Hello, Thanks for the advice. I have looked for the libs and here is the difference:
[...]
First problem I notice is this /home/vmail/company.com/user1@company.com [1]//.dovecot.sieve missing. Is this supposed to be a file or a directory? The second sieve_global_dir, I don't need global rules. The third is this minus gid=-1 value. The user/group/rights on that directory is not different from the mail dirs (where the replication works): ls -al /home/vmail/company.com/user2@company.com [2]//sieve drwx--S--- 2 vmail vmail 4096 Jul 21 15:17 tmp The important directory for me is the siev_after because roundcube vacation plugin puts the sieves in there for example: -rw------- 1 vmail vmail 413 Jul 21 15:23 01_vacation.sieve -rw------- 1 vmail vmail 124 Jul 21 15:23 01_vacation.svbin -rw-r--r-- 1 vmail vmail 193 Feb 26 2014 antispam.sieve -rw-r--r-- 1 vmail vmail 272 Apr 13 2015 antispam.svbin Gets created after setting out of office message but will not get replicated to the other node. As I have showed in my earlier doveconf output is defined: sieve = ~/.dovecot.sieve sieve_after = ~/sieve_after sieve_dir = ~/sieve sieve_duplicate_period = 1h sieve_extensions = +editheader sieve_max_redirects = 20 And the sieve scripts work locally per server they are just not replicating as they should be.
There is your problem. The sieve_after/sieve_before settings usually point to administrator-controlled global scripts. Therefore, these are not replicated by the doveadm_sieve plugin. Only the user's scripts in the ~/sieve directory and the active script marked by ~/.dovecot.sieve (symlink) are replicated.
Regards,
Stephan.
Links:
[1] mailto:/home/vmail/company.com/user1@company.com [2] mailto:/home/vmail/company.com/user2@company.com