On 17.2.2020 13.09, Bernardo Reino wrote:
On Mon, 17 Feb 2020, Bernardo Reino wrote:
On Mon, 17 Feb 2020, Aki Tuomi wrote:
On 17.2.2020 12.48, Bernardo Reino wrote:
Dear all,
I've just setup replication between two servers. The e-mail accounts on both servers intersect but are not the same.
In dovecot.conf (both are identical except one user /var/mail and the other uses /srv/vmail) I have:
--<<-- userdb { driver = passwd-file args = username_format=%Lu /etc/dovecot/virtual_passwd default_fields = uid=vmail gid=vmail home=/var/mail/%d/%n }
passdb { driver = passwd-file args = scheme=SHA512-CRYPT username_format=%Lu /etc/dovecot/virtual_passwd } -->>--
i.e. I use a passwd-like database.
For the non-overlapping accounts in both servers I want to prevent replication, as it will otherwise fail with "Error: sync: Unknown user in remote".
I have added "userdb_noreplicate" (also tried "userdb_noreplicate=y") for those users, but I still see the above error message in the logs.
Like: reinob@bbmk.org:{SHA512-CRYPT}$6$e10...4c::::::userdb_noreplicate=y
If I run "doveadm user -u reinob@bbmk.org" I get the following:
userdb: reinob@bbmk.org user : reinob@bbmk.org uid : 5000 gid : 5000 home : /var/mail/bbmk.org/reinob noreplicate: y
Note that I use "userdb_noreplicate" instead of "noreplicate" (which I also tried just in case), as from what I understood the "userdb_" prefix is required when adding the flag to the passwd file.
As far as I can tell I'm doing everything right, but for some reason the replication is ignoring that flag.
Thanks in advance for any help with this.
(Let me know if you need to see the $(doveconf -n), but I believe the only relevant parts are the userdb and passdb.
Hi!
What version of dovecot are you using? The noreplicate field seems to be correctly there. Can you turn on 'mail_debug=yes', and see if the replicator logs anything useful.
It's 2.3.9.3 from repo.dovecot.org (debian buster) on both servers.
I'll try to enable mail_debug and see what it tells me!
Thanks a lot.
Here's a log. I copied a message from one folder to another, which triggered the server (the one having reinob@bbmk.org with the noreplicate flag) to (attempt to) replicate to the other server not having this account.
--<<-- <snip/> -->>--
(The above is also attached as a plain text file, in case alpine does mess up the line wrapping..)
Note that the log even says "Added userdb setting: plugin/noreplicate=y", yet the very next line is the remote having been contacted! :)
Any ideas?
Thanks a lot in advance, Bernardo.
I wonder if we are doing the noreplicate too late. Can you try adding one of the non-overlapping users to the other site with noreplicate=y and see if helps?
Aki