[Dovecot] Replication with virtual users and static userdb possible ?
Is it possible to get replication working in a virtual user setup that uses a static userdb ? My environment is fairly simple and typical passdb {
- there's a single system user (vmail) that owns all the home dirs (/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 :
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 dovecot: auth: Error: Trying to iterate users, but userdbs don't support it Jun 3 11:30:53 server1 dovecot: replicator: Error: User listing returned failure Jun 3 11:30:53 server1 dovecot: replicator: Error: 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.
Thanks -
D.
Ugh, stuff got mangled in formatting below. Anyway, I've had no luck with various permutations, so it's looking like a virtual-user setup can't make use of replication ?
I guess what I want is for it to activate replication upon ANY notification of updated emails.
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
there's a single system user (vmail) that owns all the home dirs (/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 dovecot: auth: Error: Trying to iterate users, but userdbs don't support it Jun 3 11:30:53 server1 dovecot: replicator: Error: User listing returned failure Jun 3 11:30:53 server1 dovecot: replicator: Error: 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.
Is there no-one out there using replication with virtual users ? If so how did you do it ?
I just *know* someone is going to point me to a simple page describing how to do it ...
On 2014-06-05 09:57, deano-dovecot@areyes.com wrote:
Ugh, stuff got mangled in formatting below. Anyway, I've had no luck with various permutations, so it's looking like a virtual-user setup can't make use of replication ?
I guess what I want is for it to activate replication upon ANY notification
of updated emails.
On 2014-06-03 11:54, deano-dovecot@areyes.comwrote:
Is it possible to get replication working in a virtual user setup that uses a static userdb ? My environment is fairly simple and typical - there's a single system user (vmail) that owns all the home dirs (/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 [1] states that user listing must be enabled, but that's not available for a static userdb. The wiki http://wiki2.dovecot.org/UserDatabase/Static [2] 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 [3] 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 dovecot: auth: Error: Trying to iterate users, but userdbs don't support it Jun 3 11:30:53 server1 dovecot: replicator: Error: User listing returned failure Jun 3 11:30:53 server1 dovecot: replicator: Error: 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.
Links:
[1] http://wiki2.dovecot.org/Replication [2] http://wiki2.dovecot.org/UserDatabase/Static [3] mailto:vmail@server2.domain.com
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.
On 2014-06-17 04:50, deano-dovecot@areyes.com wrote:
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:
I seem to have posted the same question just now, sorry for not reading this first!
participants (2)
-
Alan McGinlay
-
deano-dovecot@areyes.com