Question about noreplicate flag

Bernardo Reino reinob at bbmk.org
Mon Feb 17 12:48:00 EET 2020


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.


More information about the dovecot mailing list