Michescu Andrei
2012-Mar-13 05:41 UTC
[Dovecot] problems with SSH-based clustering dovecot 2.1.1
Hello,
I'm using dovecot 2.1.1 with vpopmail 5.4.30 with multiples domains and I
have problems setting up synchronization in between multiple computers.
All act like master (my clients can connect to any of the them and read
their emails either via POP3 either via IMAP, inbound email gets on any of
the machines). Each machine is on a different continent, there is no
shared drive in between and the synchronization is supposed to be
asynchronous via cron scripts.
To simplify the case, let's consider 2 machines (mx1.a and mx2.a) with 3
virtual domains (a and b and c). On both machine domain a is the default
domain (needs only username to connect to imap).
Initially I synchronize mx1.a with mx2.a using rsync. I check that I can
login using dovecot.
I tried any of the following commands to synchronize the 2 machines:
mx1.a$ doveadm -Dv sync -u user1 at a -f ssh mx2.a doveadm dsync-server -u
user1 at a
mx1.a$ doveadm -Dv sync -u user1 at a ssh mx2.a doveadm -u user1 at a
mx1.a$ doveadm -Dv sync -u user1 at a user1 at a
The only thing that happens is that the on each machine the folders get
doubled with some random extension (eg. Inbox becomes
Inbox_3e3ff3g3gb3bb3b22).
Also, another bug, if there is a domain setup as default
(auth_default_realm) dsync simply ignores the specified -u <user> and
attempts to sync the first email in the default domain.
Please advise.
# 2.1.1: /etc/dovecot/dovecot/dovecot.conf
# OS: Linux 2.6.38-b i686 Slackware 13.0.0.0.0
auth_debug = yes
auth_debug_passwords = yes
auth_default_realm = a
first_valid_gid = 89
first_valid_uid = 89
last_valid_gid = 89
last_valid_uid = 89
listen = *
log_path = /dev/stderr
login_greeting = A
login_trusted_networks = 192.168.20.64/26
mail_debug = yes
mail_gid = vchkpw
mail_location = maildir:~/Maildir
mail_privileged_group = vchkpw
mail_uid = vpopmail
passdb {
driver = vpopmail
}
protocols = imap pop3
service auth-worker {
unix_listener auth-worker {
user = vpopmail
}
user = vpopmail
}
service auth {
user = vpopmail
}
service imap-login {
user = vpopmail
}
service pop3-login {
user = vpopmail
}
ssl = no
userdb {
driver = vpopmail
}
Timo Sirainen
2012-Mar-13 07:46 UTC
[Dovecot] problems with SSH-based clustering dovecot 2.1.1
On 13.3.2012, at 7.41, Michescu Andrei wrote:> Initially I synchronize mx1.a with mx2.a using rsync. I check that I can > login using dovecot...> The only thing that happens is that the on each machine the folders get > doubled with some random extension (eg. Inbox becomes > Inbox_3e3ff3g3gb3bb3b22).This is kind of a feature. Currently if two mailboxes have a same name, but different GUID, dsync doesn't even try to merge them but instead renames one of them. So don't do initial sync with rsync, but with dsync. Alternatively you need to first get each mailbox assigned a GUID, for example: doveadm -A mailbox status guid '*'> Also, another bug, if there is a domain setup as default > (auth_default_realm) dsync simply ignores the specified -u <user> and > attempts to sync the first email in the default domain.That can't be possible, something else is happening. What does dsync and auth log with debugs enabled when this happens?
Michescu Andrei
2012-Mar-15 21:52 UTC
[Dovecot] problems with SSH-based clustering dovecot 2.1.1
Hello Timo,
I have update the repository with hg pull -u, recompiled and redeployed
and somehow the dovecot -n still shows 2.1.1... :(
I ran exactly the same test: starting for 1 clean user1, I create 2
emails, one on mx1.a and one on mx2.a and I sync them with doveadm.
The output is exactly as previously sent :(
Here is my conf:
# 2.1.1: /etc/dovecot/dovecot/dovecot.conf
# OS: Linux 2.6.38-b i686 Slackware 13.0.0.0.0
auth_debug = yes
auth_debug_passwords = yes
auth_default_realm = a
first_valid_gid = 89
first_valid_uid = 89
last_valid_gid = 89
last_valid_uid = 89
listen = *
log_path = /dev/stderr
login_greeting = WebMail MX1.A
login_trusted_networks = 192.168.20.64/26
mail_debug = yes
mail_gid = vchkpw
mail_location = maildir:~/Maildir
mail_privileged_group = vchkpw
mail_uid = vpopmail
passdb {
driver = vpopmail
}
protocols = imap pop3
service auth-worker {
unix_listener auth-worker {
user = vpopmail
}
user = vpopmail
}
service auth {
user = vpopmail
}
service imap-login {
user = vpopmail
}
service pop3-login {
user = vpopmail
}
ssl = no
userdb {
driver = vpopmail
}
Thank you,
Andrei
> On 15.3.2012, at 19.49, Michescu Andrei wrote:
>
>> Can you get a little bit more in details about this replicator/dsync
>> techique? As my main problem is that EVERYTHING (that gets created on
>> different servers in the same time) gets duplicated.
>>
>> I only do replication using the doveadm sync command.
>
> Try at least v2.1.2 first, since it has some fixes. Also post your
> doveconf -n output.
>
>
> !DSPAM:4f622cb881591647615726!
>
>