I did eventually was forced to do this and setup a 2 node test environment with the latest dovecot: /usr/dovecot/sbin/dovecot --version 2.2.25 (7be1766) /usr/dovecot/sbin/dovecot --build-options Build options: ioloop=epoll notify=inotify ipv6 openssl io_block_size=8192 Mail storages: shared mdbox sdbox maildir mbox cydir imapc pop3c raw fail SQL drivers: mysql Passdb: checkpassword ldap pam passwd passwd-file shadow sql Userdb: checkpassword ldap nss passwd prefetch passwd-file sql and dovecot-2.2-pigeonhole-0.4.15. It unfortunately made no difference at all. The emails are still replicating while it is completely ignoring the sieve files so there must be a switch in the config for this somewhere. Otherwise I will have to look for other solutions like lsync, rsync to sync them between the nodes. Here is my complete doveconf -n output: # 2.2.25 (7be1766): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.15 (97b3da0) # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.8 auth_cache_size = 1 M auth_mechanisms = plain login cram-md5 default_vsz_limit = 512 M dict { quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no doveadm_password = # hidden, use -P to show it doveadm_port = 7777 login_greeting = mail.company.com is ready login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k mail_gid = vmail mail_location = maildir:~/Maildir mail_plugins = " quota notify replication" mail_uid = vmail maildir_very_dirty_syncs = yes 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 index ihave duplicate mime foreverypart extracttext editheader namespace cyruscompat1 { alias_for hidden = yes list = no location prefix = INBOX/ separator = / type = private } namespace inbox { hidden = no inbox = yes list = yes location mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Spam { auto = subscribe special_use = \Junk } mailbox Trash { auto = subscribe special_use = \Trash } prefix separator = / subscriptions = yes type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { antispam_backend = spool2dir antispam_spam = Spam;SPAM antispam_spool2dir_notspam = /home/vmail/spam_training/good/new/%%020lu-%u-%%05lu antispam_spool2dir_spam = /home/vmail/spam_training/bad/new/%%020lu-%u-%%05lu antispam_trash_pattern_ignorecase = trash;Deleted *;?l?ments supprim?s;gel?schte *;&AMk-l&AOk-ments supprim&AOk-s mail_replica = tcp:1.2.3.4 quota = dict:User quota::proxy::quota quota_grace = 10M quota_rule = *:storage=100M quota_rule2 = Trash:storage=+10%% quota_rule3 = Deleted Messages:storage=+10%% quota_status_nouser = DUNNO quota_status_success = DUNNO quota_warning = storage=100%% quota-warning 100 %u quota_warning2 = storage=95%% quota-warning 95 %u quota_warning3 = storage=90%% quota-warning 90 %u quota_warning4 = storage=85%% quota-warning 85 %u replication_full_sync_interval = 1 hours sieve = ~/.dovecot.sieve sieve_after = ~/sieve_after sieve_dir = ~/sieve sieve_duplicate_period = 1h sieve_extensions = +editheader sieve_max_redirects = 20 } pop3c_host = pop3.e2advance.net postmaster_address = postmaster at company.com protocols = imap pop3 lmtp imap lmtp sieve pop3 service aggregator { fifo_listener replication-notify-fifo { user = vmail } unix_listener replication-notify { user = vmail } } service auth-worker { user = $default_internal_user } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { group = vmail mode = 0660 user = vmail } user = $default_internal_user } service dict { unix_listener dict { mode = 0600 user = vmail } } service doveadm { inet_listener { port = 7777 } } service imap-login { process_limit = 256 process_min_avail = 5 } service lmtp { unix_listener /var/spool/postfix/public/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service managesieve-login { inet_listener sieve { port = 4190 } service_count = 1 } service quota-status { client_limit = 1 executable = quota-status -p postfix inet_listener { port = 10020 } } service quota-warning { executable = script /usr/local/bin/quota-warning.sh unix_listener quota-warning { user = vmail } user = vmail } service replicator { process_min_avail = 1 unix_listener replicator-doveadm { mode = 0666 } } ssl_ca = </etc/ssl/private/sub.class1.server.ca.pem ssl_cert = </etc/ssl/private/star.company.com.crt ssl_key = </etc/ssl/private/star.company.com.key userdb { driver = prefetch } userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lmtp { mail_plugins = " quota notify replication sieve" } protocol lda { mail_plugins = " quota notify replication sieve" } protocol imap { imap_client_workarounds = delay-newmail mail_max_userip_connections = 20 mail_plugins = " quota notify replication imap_quota antispam" } protocol pop3 { pop3_client_workarounds = outlook-no-nuls oe-ns-eoh pop3_no_flag_updates = yes pop3_save_uidl = yes pop3_uidl_format = %v.%u } protocol doveadm { mail_plugins = " quota notify replication" } On Tue, 19 Jul 2016 15:27:54 +0300, KSB wrote:> On 2016.07.19. 15:03, Luescher Claude wrote: > >> Hello, Are you sure about that I would need so recent version? That >> is >> ok to have some bugfixes but you are talking about the latest >> cutting >> edge debian jessie backports package. Even the mainline debian >> jessie >> only have 2.2.13 in it and my system is a complex wheezy >> installation, >> the last thing I want to do is to move all my components into jessie >> just because of this or do you know 2.2.15 deb packages built for >> wheezy? My installation is a multi-node cluster already I would have > to >> update all the nodes but if it would be only to install a couple of > new >> debs on them I would not hesitate trying a newer dovecot version. > Thank >> you. > > If you have a huge multi node system, then you need to have testing > system also. It's easy to compile Dovecot by yourself and make deb > packages, if needed. > > -- > KSB
On 2016-07-20 14:51, Luescher Claude wrote:> I did eventually was forced to do this and setup a 2 node test > environment with the latest dovecot: > > /usr/dovecot/sbin/dovecot --version > 2.2.25 (7be1766) > > /usr/dovecot/sbin/dovecot --build-options > Build options: ioloop=epoll notify=inotify ipv6 openssl > io_block_size=8192 > Mail storages: shared mdbox sdbox maildir mbox cydir imapc pop3c raw > fail > SQL drivers: mysql > Passdb: checkpassword ldap pam passwd passwd-file shadow sql > Userdb: checkpassword ldap nss passwd prefetch passwd-file sql > > and dovecot-2.2-pigeonhole-0.4.15. > > It unfortunately made no difference at all. The emails are still > replicating while it is completely ignoring the sieve files so there > must be a switch in the config for this somewhere.I did report a year ago [1] that I did observe mails being synced but no sieves. Although I did report at the end that replication started again, I do have to report today that it stopped again shortly afterwards (even on current version of dovecot and pigeonhole). The only way to get sieves synced in my case is: removing the corresponding files at one server, update the sieve files at the other server [2]. Only then, sieves become synced. On very rare occasions syncing happens without applying the first step just mentioned. This issue looks to me a very subtle one I am unable to reproduce reliably, sorry. HTH, Michael [1] http://dovecot.org/pipermail/dovecot/2015-May/100839.html [2] I can live with that workaround because I am the only user having sieves activated.
Op 20-7-2016 om 14:51 schreef Luescher Claude:> I did eventually was forced to do this and setup a 2 node test > environment with the latest dovecot: > > > /usr/dovecot/sbin/dovecot --version > 2.2.25 (7be1766) > > > /usr/dovecot/sbin/dovecot --build-options > Build options: ioloop=epoll notify=inotify ipv6 openssl > io_block_size=8192 > Mail storages: shared mdbox sdbox maildir mbox cydir imapc pop3c raw fail > SQL drivers: mysql > Passdb: checkpassword ldap pam passwd passwd-file shadow sql > Userdb: checkpassword ldap nss passwd prefetch passwd-file sql > > and dovecot-2.2-pigeonhole-0.4.15. > > It unfortunately made no difference at all. The emails are still > replicating while it is completely ignoring the sieve files so there > must be a switch in the config for this somewhere. Otherwise I will > have to look for other solutions like lsync, rsync to sync them > between the nodes.Is the doveadm sieve plugin properly installed at both sides of the replication? On my system (Debian Jessie), it is located at /usr/lib/dovecot/modules/doveadm. The file name is lib10_doveadm_sieve_plugin.so. When mail_debug is enabled, the replication should log all kinds of doveadm-sieve debug messages. Any errors in the log? Regards, Stephan.
Hello, Thanks for the advice. I have looked for the libs and here is the difference: Dovecot production env 2.2.10: /usr/lib/dovecot/modules/doveadm rw-r--r-- 1 root root 18560 Jan 9 2014 lib10_doveadm_acl_plugin.so -rw-r--r-- 1 root root 14256 Jan 9 2014 lib10_doveadm_expire_plugin.so -rw-r--r-- 1 root root 10232 Jan 9 2014 lib10_doveadm_quota_plugin.so -rw-r--r-- 1 root root 51352 Jan 9 2014 lib10_doveadm_sieve_plugin.so -rw-r--r-- 1 root root 14344 Jan 9 2014 lib20_doveadm_fts_plugin.so Dovecot new test env: /usr/dovecot/lib/dovecot/doveadm -rw-r--r-- 1 root root 140574 Jul 20 12:53 lib10_doveadm_acl_plugin.a -rwxr-xr-x 1 root root 1066 Jul 20 12:53 lib10_doveadm_acl_plugin.la -rwxr-xr-x 1 root root 98910 Jul 20 12:53 lib10_doveadm_acl_plugin.so -rw-r--r-- 1 root root 56108 Jul 20 12:53 lib10_doveadm_expire_plugin.a -rwxr-xr-x 1 root root 1087 Jul 20 12:53 lib10_doveadm_expire_plugin.la -rwxr-xr-x 1 root root 43879 Jul 20 12:53 lib10_doveadm_expire_plugin.so -rw-r--r-- 1 root root 97212 Jul 20 12:53 lib10_doveadm_quota_plugin.a -rwxr-xr-x 1 root root 1080 Jul 20 12:53 lib10_doveadm_quota_plugin.la -rwxr-xr-x 1 root root 63227 Jul 20 12:53 lib10_doveadm_quota_plugin.so -rw-r--r-- 1 root root 338560 Jul 20 12:53 lib10_doveadm_sieve_plugin.a -rwxr-xr-x 1 root root 1286 Jul 20 12:53 lib10_doveadm_sieve_plugin.la -rwxr-xr-x 1 root root 177604 Jul 20 12:53 lib10_doveadm_sieve_plugin.so -rw-r--r-- 1 root root 139748 Jul 20 12:53 lib20_doveadm_fts_plugin.a -rwxr-xr-x 1 root root 1066 Jul 20 12:53 lib20_doveadm_fts_plugin.la -rwxr-xr-x 1 root root 94615 Jul 20 12:53 lib20_doveadm_fts_plugin.so Also I have set the mail_log to debug as you have suggested and I see the following for users in the logs (with my "old" version): Jul 21 11:52:27 server1 dovecot: dsync-server(user1 at company.com): Debug: doveadm-sieve: Iterating Sieve mailbox attributes Jul 21 11:52:27 server1 dovecot: dsync-server(user1 at company.com): Debug: sieve: Pigeonhole version 0.4.2 initializing Jul 21 11:52:27 server1 dovecot: dsync-server(user1 at company.com): Debug: sieve: include: sieve_global_dir is not set; it is currently not possible to include `:global' scripts. Jul 21 11:52:27 server1 dovecot: dsync-server(user1 at company.com): Debug: sieve-storage: using active sieve script path: /home/vmail/company.com/user1 at company.com//.dovecot.sieve Jul 21 11:52:27 server1 dovecot: dsync-server(user1 at company.com): Debug: sieve-storage: using sieve script storage directory: /home/vmail/company.com/user1 at company.com//sieve Jul 21 11:52:27 server1 dovecot: dsync-server(user1 at company.com): Debug: sieve-storage: using permissions from /home/vmail/company.com/user1 at company.com//sieve: mode=0700 gid=-1 Jul 21 11:52:27 server1 dovecot: dsync-server(user1 at company.com): Debug: sieve-storage: relative path to sieve storage in active link: sieve/ Jul 21 15:17:21 server1 dovecot: dsync-local(user2 at company.com): Debug: doveadm-sieve: Iterating Sieve mailbox attributes Jul 21 15:17:21 server1 dovecot: dsync-local(user2 at company.com): Debug: sieve: Pigeonhole version 0.4.2 initializing Jul 21 15:17:21 server1 dovecot: dsync-local(user2 at company.com): Debug: sieve: include: sieve_global_dir is not set; it is currently not possible to include `:global' scripts. Jul 21 15:17:21 server1 dovecot: dsync-local(user2 at company.com): Debug: sieve-storage: using active sieve script path: /home/vmail/company.com/user2 at company.com//.dovecot.sieve Jul 21 15:17:21 server1 dovecot: dsync-local(user2 at company.com): Debug: sieve-storage: using sieve script storage directory: /home/vmail/company.com/user2 at company.com//sieve Jul 21 15:17:21 server1 dovecot: dsync-local(user2 at company.com): Debug: sieve-storage: using permissions from /home/vmail/company.com/user2 at company.com//sieve: mode=0700 gid=-1 Jul 21 15:17:21 server1 dovecot: dsync-local(user2 at company.com): Debug: sieve-storage: relative path to sieve storage in active link: sieve/ Jul 21 15:17:21 server1 dovecot: dsync-local(user3 at company.com): Debug: doveadm-sieve: Iterating Sieve mailbox attributes Jul 21 15:17:21 server1 dovecot: dsync-local(user3 at company.com): Debug: sieve: Pigeonhole version 0.4.2 initializing Jul 21 15:17:21 server1 dovecot: dsync-local(user3 at company.com): Debug: sieve: include: sieve_global_dir is not set; it is currently not possible to include `:global' scripts. Jul 21 15:17:21 server1 dovecot: dsync-local(user3 at company.com): Debug: sieve-storage: using active sieve script path: /home/vmail/company.com/user3 at company.com//.dovecot.sieve First problem I notice is this /home/vmail/company.com/user1 at company.com//.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 at company.com//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. On Wed, 20 Jul 2016 16:31:55 +0200, Stephan Bosch wrote:> Op 20-7-2016 om 14:51 schreef Luescher Claude: > >> I did eventually was forced to do this and setup a 2 node test >> environment with the latest dovecot: /usr/dovecot/sbin/dovecot >> --version 2.2.25 (7be1766) /usr/dovecot/sbin/dovecot --build-options >> Build options: ioloop=epoll notify=inotify ipv6 openssl >> io_block_size=8192 Mail storages: shared mdbox sdbox maildir mbox > cydir >> imapc pop3c raw fail SQL drivers: mysql Passdb: checkpassword ldap >> pam >> passwd passwd-file shadow sql Userdb: checkpassword ldap nss passwd >> prefetch passwd-file sql and dovecot-2.2-pigeonhole-0.4.15. It >> unfortunately made no difference at all. The emails are still >> replicating while it is completely ignoring the sieve files so there >> must be a switch in the config for this somewhere. Otherwise I will >> have to look for other solutions like lsync, rsync to sync them > between >> the nodes. > > Is the doveadm sieve plugin properly installed at both sides of the > replication? On my system (Debian Jessie), it is located at > /usr/lib/dovecot/modules/doveadm. The file name is > lib10_doveadm_sieve_plugin.so. > > When mail_debug is enabled, the replication should log all kinds of > doveadm-sieve debug messages. > > Any errors in the log? > > Regards, > > Stephan.