Question about noreplicate flag

Aki Tuomi aki.tuomi at open-xchange.com
Mon Feb 17 12:49:40 EET 2020


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 at bbmk.org:{SHA512-CRYPT}$6$e10...4c::::::userdb_noreplicate=y
>
> If I run "doveadm user -u reinob at bbmk.org" I get the following:
>
> userdb: reinob at bbmk.org
>   user      : reinob at 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.

Aki



More information about the dovecot mailing list