[Dovecot] problems with SSH-based clustering dovecot 2.1.1

Michescu Andrei andrei.michescu at miau.ca
Wed Mar 14 07:25:09 EET 2012


Hello,

Thank you very much... Using the nightly build and a combination of
mailbox status + rsync + dsync made it happen.

So the *full* procedure was:

for every domain dom
 for every user  u in dom
    doveadm mailbox status -u user at domain guid '*'
    rsync /home/vpopmail/domains/$dom/$u mx2.a:/home/vpopmail/domains/$dom/$u
    doveadm -Dv sync -u $u@$dom -f ssh mx2.a doveadm dsync-server -u $u@$dom
  loop $u
loop $dom

Now, as long as I touch the mailbox of user1 only on mx1.a doveadm sync
keeps them in sync (cron job every 5 minutes).

The problem comes when I start using the master-master model: emails
starts getting duplicate with different ids.

Here is the example:

mx1.a receives an email for user1 (next line is the ls on the Maildir/new
on mx1.a):
-rw------- 1 vpopmail vchkpw  278 Mar 14 01:04 1331701451.24233.mx1,S\=278

mx2.a receives another email for user1:
-rw------- 1 vpopmail vchkpw  273 Mar 14 07:05 1331701504.32564.mx2,S\=273

cron job starts on mx1.a:
sudo -u vpopmail doveadm -Dv sync -u user1 at b -f ssh mx2.a doveadm
dsync-server -u user1 at b
doveadm(vpopmail): Debug: Loading modules from directory:
/usr/lib/dovecot/doveadm
doveadm(vpopmail): Debug: Skipping module doveadm_acl_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so:
undefined symbol: acl_user_module (this is usually intentional, so just
ignore this message)
doveadm(vpopmail): Debug: Skipping module doveadm_expire_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so:
undefined symbol: expire_set_lookup (this is usually intentional, so just
ignore this message)
doveadm(vpopmail): Debug: Skipping module doveadm_quota_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so:
undefined symbol: quota_user_module (this is usually intentional, so just
ignore this message)
doveadm(vpopmail): Debug: Skipping module doveadm_zlib_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib10_doveadm_zlib_plugin.so:
undefined symbol: i_stream_create_deflate (this is usually intentional, so
just ignore this message)
doveadm(vpopmail): Debug: Skipping module doveadm_fts_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so:
undefined symbol: fts_list_backend (this is usually intentional, so just
ignore this message)
doveadm(user1 at b): Debug: auth input: user1 at b uid=89 gid=89
home=/home/vpopmail/domains/b/user1
doveadm(user1 at b): Debug: Effective uid=89, gid=89,
home=/home/vpopmail/domains/b/user1
doveadm(user1 at b): Debug: maildir++:
root=/home/vpopmail/domains/b/user1/Maildir, index=, control=,
inbox=/home/vpopmail/domains/b/user1/Maildir, alt=
dsync-local(user1 at b): Debug: Namespace : Using permissions from
/home/vpopmail/domains/b/user1/Maildir: mode=0700 gid=-1
dsync-local(user1 at b): Info: INBOX: Ignored 1 modseq changes
dsync-local(user1 at b): Info: INBOX: Couldn't keep all uids
dsync-local(user1 at b): Warning: Mailbox changes caused a desync. You may
want to run dsync again.

--due to desync it runs again (via the cron script):
sudo -u vpopmail doveadm -Dv sync -u user1 at b -f ssh mx2.a doveadm
dsync-server -u user1 at b
doveadm(vpopmail): Debug: Loading modules from directory:
/usr/lib/dovecot/doveadm
doveadm(vpopmail): Debug: Skipping module doveadm_acl_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so:
undefined symbol: acl_user_module (this is usually intentional, so just
ignore this message)
doveadm(vpopmail): Debug: Skipping module doveadm_expire_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so:
undefined symbol: expire_set_lookup (this is usually intentional, so just
ignore this message)
doveadm(vpopmail): Debug: Skipping module doveadm_quota_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so:
undefined symbol: quota_user_module (this is usually intentional, so just
ignore this message)
doveadm(vpopmail): Debug: Skipping module doveadm_zlib_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib10_doveadm_zlib_plugin.so:
undefined symbol: i_stream_create_deflate (this is usually intentional, so
just ignore this message)
doveadm(vpopmail): Debug: Skipping module doveadm_fts_plugin, because
dlopen() failed: /usr/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so:
undefined symbol: fts_list_backend (this is usually intentional, so just
ignore this message)
doveadm(user1 at b): Debug: auth input: user1 at b uid=89 gid=89
home=/home/vpopmail/domains/b/user1
doveadm(user1 at b): Debug: Effective uid=89, gid=89,
home=/home/vpopmail/domains/b/user1
doveadm(user1 at b): Debug: maildir++:
root=/home/vpopmail/domains/b/user1/Maildir, index=, control=,
inbox=/home/vpopmail/domains/b/user1/Maildir, alt=
dsync-local(user1 at b): Debug: Namespace : Using permissions from
/home/vpopmail/domains/b/user1/Maildir: mode=0700 gid=-1


The expected result would be that in user1's Mailbox on both mx1.a and
mx2.a there would be 2 files... which is not happening

ls on mx1.a
-rw------- 2 vpopmail vchkpw  278 Mar 14 01:04 1331701451.24233.mx1,S\=278
-rw------- 1 vpopmail vchkpw  273 Mar 14 01:05 1331701504.32564.mx2,S\=273
-rw------- 2 vpopmail vchkpw  278 Mar 14 01:04
1331702193.M868989P24524.mx1,S\=278


ls on mx2.a
-rw------- 1 vpopmail vchkpw  278 Mar 14 07:04 1331701451.24233.mx1,S\=278
-rw------- 2 vpopmail vchkpw  273 Mar 14 07:05 1331701504.32564.mx1,S\=273
-rw------- 2 vpopmail vchkpw  273 Mar 14 07:05
1331702193.M798223P32571.mx2,S\=273

As you can see on every machine the original email gets duplicated.

Please advise on how I can fix this issue.

Thank you and Best regards,
Andrei

> On 13.3.2012, at 20.22, Michescu Andrei wrote:
>
>> I'm attaching you the output for the 2nd bug. All the folders that you
>> see
>> in there does not exists in user1 at b but they belong to first_user at a
>> (which
>> is NOT involved in this sync), BUT a is the default domain.
>
> The output showed debug output from the local dsync, but not from the
> remote. I think you'll see that if you do:
>
> sudo -u vpopmail doveadm sync -u user1 at b -f ssh mx2.a doveadm -Dv
> dsync-server -u user1 at b
>
> Also it's possible that in v2.1.1 there was some bug related to this.. You
> could try the latest nightly snapshot that has several fixes related to
> dsync: http://www.dovecot.org/nightly/
>
>> Also for the first suggestion:
>>
>> 1) how do you sync initially the 2 machines? Because if you create the
>> account on both machines, already the Inbox has 2 different guids
>
> doveadm sync should be run before the destination Maildir exists at all.
> If vpopmail creates that, I guess it would just have to be deleted
> manually..
>
>> 2) if you know the guid, how do you change them? Because then I can do
>> the
>> rsync and after I can correct the guid on the other machine
>
> The GUID is generated the first time it's used, which normally means when
> you run dsync for the first time. Alternatively you can also use doveadm
> to ask for the mailbox's GUID and it gets generated:
>
> doveadm mailbox status -u user at domain guid '*'
>
> Running rsync after this is done also copies the GUID (it's stored in
> dovecot-uidlist).
> !DSPAM:4f5f972f80146209382307!
>
>




More information about the dovecot mailing list