[Dovecot] replication howto

Matteo Cazzador mcazzador at gmail.com
Fri Mar 16 15:10:04 EET 2012


Hi,

Solved!

i add at my sql


 SELECT maildir, 1000 AS uid, 1000 AS gid,
'/home/domini-posta/netlite.locale/matteo' as mail,
'/home/domini-posta/netlite.locale/matteo' as home FROM mailbox WHERE
username = 'matteo at netlite.locale'

Now i've see first replication going!!! thank's everybody

I hope my test help someone.

Now i proceedd at use the replication system.


Il 16 marzo 2012 14:02, Matteo Cazzador <mcazzador at gmail.com> ha scritto:
> Hi, with this changes first step is passed:
>
> I decomment this
>
> #dsync_remote_cmd = ssh -p 22 -l%{login} %{host} doveadm dsync-server
> -u%u -l%{lock_timeout} -n%{namespace}
>
> i active and add absolute path of doveadm
>
> dsync_remote_cmd = ssh -p 22 -l%{login} %{host} /usr/local/bin/doveadm
> dsync-server -u%u -l%{lock_timeout} -n%{namespace}
>
> But now  from server 1 obtain
>
> Error: remote: dsync-remote(matteo at netlite.locale): Error: User has no
> home directory
>
> Note: if i send a mail from server2 mail goes correcly in local
> (server 2) home virtual directory
>
> I note that when i launch manually from server1 sync, mysql on server
> 2 make correct sql to find home user dir
>
> On server 2
>
> SELECT maildir, 1000 AS uid, 1000 AS gid,
> '/home/domini-posta/netlite.locale/matteo' as mail FROM mailbox WHERE
> username = 'matteo at netlite.locale'
>
> result are:
>
> +------------------------+------+------+------------------------------------------+
> | maildir                | uid  | gid  | mail
>           |
> +------------------------+------+------+------------------------------------------+
> | netlite.locale/matteo/ | 1000 | 1000 |
> /home/domini-posta/netlite.locale/matteo |
> +------------------------+------+------+------------------------------------------+
>
> this configuration is teh same for server 1 and 2
>
> thank's
>
> Il 16 marzo 2012 13:12, Matteo Cazzador <mcazzador at gmail.com> ha scritto:
>> Hi, i obtain the same error
>>
>> Mar 16 13:02:01 Gentoo_cyrus_imap dovecot:
>> dsync-local(matteo at netlite.locale): Error: remote: bash: doveadm:
>> command not found
>> Mar 16 13:02:01 Gentoo_cyrus_imap dovecot:
>> dsync-local(matteo at netlite.locale): Error: read() from worker server
>> failed: EOF
>>
>>
>> i've create vmail users (i've virtual domain netlite.locale (postfix),
>> mysql backend i receive ana send mail correctly i use imap protocol),
>> get ssh connection with publick key,
>> i verify that with su - vmail , vmail find doveadm, i post my
>> dovecot.conf file because i don't know what is wrong
>>
>> vmail exist on every server with publick key
>>
>> (server one => 10.0.0.118
>>
>> server two => 10.0.0.122)
>>
>> dovecot.conf ->
>>
>> #dsync_remote_cmd = ssh -p 22 -l%{login} %{host} doveadm dsync-server
>> -u%u -l%{lock_timeout} -n%{namespace}
>>
>> service aggregator {
>> # give enough permissions for mail processes
>> #
>>        fifo_listener replication-notify-fifo {
>>                user = vmail
>>                        mode = 0600
>>        }
>>        unix_listener replication-notify {
>>                user = vmail
>>                        mode = 0600
>>        }
>> }
>> service replicator {
>> # start replication at startup
>> #
>>        process_min_avail = 1
>> }
>>
>>
>> service doveadm {
>> # if you're using a single virtual user, set this to start ssh as vmail
>> # (not root)
>>
>>        user = vmail
>> }
>>
>> service config {
>> # needed to grant access to /var/run/dovecot/config for service doveadm
>>
>>        unix_listener config {
>>                user = vmail
>>        }
>> }
>>
>> plugin {
>>       # this host replicates to remote host
>> #
>>        mail_replica = remote:vmail at 10.0.0.122
>>
>> # run full synchronization mode every other hour
>> # (default is every 24 hours)
>> #
>>        replication_full_sync_interval = 1 hour
>> }
>>
>>
>> idem on the server 2 changing mail_replica = remote:vmail at 10.0.0.118
>>
>> thank's
>>
>>
>> --
>> Rispetta l'ambiente: se non ti è necessario, non stampare questa mail.
>> ******************************************
>> Ing. Matteo Cazzador
>> Email: mcazzador at gmail.com
>> ******************************************
>
>
>
> --
> Rispetta l'ambiente: se non ti è necessario, non stampare questa mail.
> ******************************************
> Ing. Matteo Cazzador
> Email: mcazzador at gmail.com
> ******************************************



-- 
Rispetta l'ambiente: se non ti è necessario, non stampare questa mail.
******************************************
Ing. Matteo Cazzador
Email: mcazzador at gmail.com
******************************************


More information about the dovecot mailing list