Eric Belhomme
2010-Jan-13 20:48 UTC
[Dovecot] how-to use dsync to do a 2 ways replication ?
Hi, I want to set-up two dovecot imap servers, with active-active replicated maildirs. The goal is to have a hosted public server on Internet, and a private server on my LAN to speed-up local connections. So I compiled dovecot 2.0 beta 1 in order to use dsync utility... Actually my config is pretty simple as I just want to setup a proof of concept before going ahead in this way : (Both servers are Debian Lenny with excatly the same config) mail0:~# /usr/local/dovecot2/sbin/dovecot -n # 2.0.beta1: /etc/dovecot2/dovecot/dovecot.conf # OS: Linux 2.6.26-2-686 i686 Debian 5.0.3 auth_debug = yes auth_verbose = yes login_trusted_networks = 172.16.64.0/18 mail_location = maildir:%h passdb { args = /etc/dovecot/userpasswd deny = no driver = passwd-file } postmaster_address = postmaster at example.com service pop3-login { inet_listener { port = 110 } inet_listener { port = 995 ssl = yes } } service imap-login { inet_listener { port = 143 } inet_listener { port = 993 ssl = yes } } ssl_cert = </etc/ssl/certs/dovecot.pem ssl_key = </etc/ssl/private/dovecot.pem userdb { driver = prefetch } userdb { args = /etc/dovecot/userpasswd driver = passwd-file } I logged on the first server with an IMAP client then I copied many email through IMAP, then I launched dsync as root : /usr/local/dovecot2/bin/dsync -v mirror 'ssh eole.it.fr.eve /usr/local/dovecot2/bin/dsync' root at eole.it.fr.eve's password: dsync-local(root): Error: Can't create mailbox ssh: Mailbox already exists dsync-local(root): Error: Can't create mailbox aptitude: Mailbox already exists dsync-local(root): Error: Can't create mailbox debtags: Mailbox already exists dsync-local(root): Info: debtags: only in source dsync-local(root): Info: aptitude: only in source dsync-local(root): Info: ssh: only in source dsync-local(root): Info: ssh: only in dest dsync-local(root): Info: aptitude: only in dest dsync-local(root): Info: debtags: only in dest dsync-local(root): Error: Mailbox ssh changed its GUID (cdfc9a2d85154e4b47180000b31a5865 -> 541e9f2850234e4b3a2b0000d0cf7273) dsync-local(root): Error: msg iteration failed: Couldn't open mailbox dsync-remote(root): Error: Can't create mailbox debtags: Mailbox already exists dsync-remote(root): Error: Can't create mailbox aptitude: Mailbox already exists dsync-remote(root): Error: Can't create mailbox ssh: Mailbox already exists dsync-remote(root): Error: Mailbox debtags changed its GUID (501e9f2850234e4b3a2b0000d0cf7273 -> d1fc9a2d85154e4b47180000b31a5865) dsync-remote(root): Error: msg iteration failed: Couldn't open mailbox dsync-remote(root): Error: command MSG-LIST failed dsync-local(root): Error: Mailbox ssh changed its GUID (cdfc9a2d85154e4b47180000b31a5865 -> 541e9f2850234e4b3a2b0000d0cf7273) dsync-local(root): Error: Mailbox aptitude changed its GUID (cffc9a2d85154e4b47180000b31a5865 -> 521e9f2850234e4b3a2b0000d0cf7273) dsync-local(root): Error: Mailbox debtags changed its GUID (d1fc9a2d85154e4b47180000b31a5865 -> 501e9f2850234e4b3a2b0000d0cf7273) dsync-local(root): Error: Mailbox ssh changed its GUID (cdfc9a2d85154e4b47180000b31a5865 -> 541e9f2850234e4b3a2b0000d0cf7273) dsync-local(root): Error: Mailbox aptitude changed its GUID (cffc9a2d85154e4b47180000b31a5865 -> 521e9f2850234e4b3a2b0000d0cf7273) dsync-local(root): Error: Mailbox debtags changed its GUID (d1fc9a2d85154e4b47180000b31a5865 -> 501e9f2850234e4b3a2b0000d0cf7273) mail0:~# dsync-remote(root): Error: Mailbox debtags changed its GUID (501e9f2850234e4b3a2b0000d0cf7273 -> d1fc9a2d85154e4b47180000b31a5865) dsync-remote(root): Error: Mailbox aptitude changed its GUID (521e9f2850234e4b3a2b0000d0cf7273 -> cffc9a2d85154e4b47180000b31a5865) dsync-remote(root): Error: Mailbox ssh changed its GUID (541e9f2850234e4b3a2b0000d0cf7273 -> cdfc9a2d85154e4b47180000b31a5865) dsync-remote(root): Error: Mailbox debtags changed its GUID (501e9f2850234e4b3a2b0000d0cf7273 -> d1fc9a2d85154e4b47180000b31a5865) dsync-remote(root): Error: Mailbox aptitude changed its GUID (521e9f2850234e4b3a2b0000d0cf7273 -> cffc9a2d85154e4b47180000b31a5865) dsync-remote(root): Error: Mailbox ssh changed its GUID (541e9f2850234e4b3a2b0000d0cf7273 -> cdfc9a2d85154e4b47180000b31a5865) It seems dsync tries to use my system user database instead of the /etc/dovecot/userpasswd file ! I found dsync doc on the wiki at http://wiki2.dovecot.org/Tools/dsync but this is not really clear for me... So maybe someone can tell me what's wrong ? Regards, -- Eric Belhomme
Timo Sirainen
2010-Jan-18 08:41 UTC
[Dovecot] how-to use dsync to do a 2 ways replication ?
On 13.1.2010, at 22.48, Eric Belhomme wrote:> So I compiled dovecot 2.0 beta 1 in order to use dsync utility...You should try with the latest hg version. Or wait until I'll release beta2. Hopefully by next weekend.> I logged on the first server with an IMAP client then I copied many > email through IMAP, then I launched dsync as root : > > /usr/local/dovecot2/bin/dsync -v mirror 'ssh > eole.it.fr.eve /usr/local/dovecot2/bin/dsync' > root at eole.it.fr.eve's password: > dsync-local(root): Error: Can't create mailbox ssh: Mailbox already > exists..> It seems dsync tries to use my system user database instead of > the /etc/dovecot/userpasswd file !Give it -u username parameter. It currently supports syncing only one user at a time.
Apparently Analagous Threads
- I need some help with my Dovecot and Postfix configs - I'm unable to log in on my mail server
- I need some help with my Dovecot and Postfix configs - I'm unable to log in on my mail server
- I need some help with my Dovecot and Postfix configs - I'm unable to log in on my mail server
- CentOS 5.1 - MySQL 5.0.22 - Courier auth lib problem
- I need some help with my Dovecot and Postfix configs - I'm unable to log in on my mail server