I'm trying to avoid switching the userdb from a nice simple static setup to something else to enable replication. Is there anyone using replication with a virtual user configuration ? How did you do it ? Actually, anyone doing replication at all - what does your config look like ?
Thanks -
D.
On 2014-06-03 11:54, deano-dovecot@areyes.com wrote:
Is it possible to get replication working in a virtual user setup that uses a static userdb ? My environment is fairly simple and typical dirs
- there's a single system user (vmail) that owns all the home
(/var/mail/domain.com/user). The virtual users
(userid@domain.com:secretpassword) are kept in a single file
(/var/mail/domain.com/PASSWD) that's unique per domain, and referenced
as a static userdb :
passdb { driver = passwd-file args =
scheme=plain username_format=%u /var/mail/%d/PASSWD
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/var/mail/%d/%n }
I know the wiki http://wiki2.dovecot.org/Replication states that user listing must be enabled, but that's not available for a static userdb. The wiki http://wiki2.dovecot.org/UserDatabase/Static also says that it shouldn't be a problem because it will use do a passdb lookup instead (except for PAM which isn't used here).
Unfortunately, it's not working. I've testing with ssh :
dsync_remote_cmd = ssh -l vmail %{host} doveadm
dsync-server -u%u -l%{lock_timeout} -n%{namespace} mail_replica =
remote:vmail@server2.domain.com
as well as with straight tcp (SSL for later)
mail_replica = tcp:server2.domain.com:999
/var/log/mail.err shows the problems ...
Jun 3 11:30:53 server1
Jun 3 11:30:53 server1 dovecot: replicator: Error: User listing returned failure Jun 3 11:30:53 server1 dovecot: replicator: Error:
dovecot: auth: Error: Trying to iterate users, but userdbs don't support it listing users failed, can't replicate existing data
Anyone else
have it working ? I'm sure it's something simple that I've just overlooked.