Unexpected accounts showing up in replication status (doveadm replicator status '*')
Daniel Schütze
daniel at cwa.uk.com
Fri Jan 4 11:11:21 EET 2019
I have a replication set up with two dovecot 2.3.4 servers.
Messages appear to be replicating fine between them, however there is an
oddity when I run doveadm replicator status '*' and I'm worried work is
being carried out needlessly.
Both machines have identical configs and have a mysql backend for
username/passwords. Both machines point to the same mysql server and
same tables.
When I run
doveadm user '*'
On either machine I am presented with the same correct list of users.
The users are presented in the form: username and not username at domain.
When I run
doveadm replicator status '*'
On either machine I receive a list of usernames which includes not only
username but also username at domain. Both of these "accounts" have fast
sync, full sync and success sync entries and these are not the same
times between username and username at domain (hence I'm worried
unnecessary work is being carried out).
My ee dovecot-sql.conf.ext
Has these entires re usernames
user_query = SELECT home, uid, gid FROM users WHERE username = '%n'
password_query = SELECT username AS user, domain, password, home AS
userdb_home, uid AS userdb_uid, gid AS userdb_gid FROM users WHERE
username = '%u'
[Having copied these in I do see the different usage of %u and %n]
iterate_query = SELECT username AS user,domain FROM users
The users table is as follows
+--------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| username | varchar(128) | NO | | NULL | |
| domain | varchar(128) | NO | | NULL | |
| password | varchar(64) | NO | | NULL | |
| home | varchar(255) | NO | | NULL | |
| uid | int(11) | NO | | NULL | |
| gid | int(11) | NO | | NULL | |
| active | char(1) | NO | | Y | |
| mail_replica | varchar(255) | NO | | NULL | |
+--------------+--------------+------+-----+---------+-------+
I assume that the duplication of username with and without domains isn't
as intended, any suggestions where I am going wrong?
I did previously have the servers running with the iterate query
commented out and when that was the case
doveadm user '*'
returned the correct number of accounts but in the format
username at domain and the replicator status again 'double listed' accounts
as described above.
Thank you for any tips!
--
Daniel Schütze
Director
------------------
CWA International
Balmoral House
9 John Street
London
WC1N 2ES
(t) + 44 (0)20 7242 8444
(e) dms at cwa.uk.com
(w) http://www.cwa.uk.com/
More information about the dovecot
mailing list