dovecot replication on dovecot v 2.3.8

Stephane Magnier steph.mag220 at netcourrier.com
Sun Mar 27 06:36:11 UTC 2022


Just a prcision... maybe I misunderstood point

I saw in different posts, that an RSYNC may corrupt the database and 
cause trouble... therefore, we need a replication system.

1) I have  2 different servers, running (email server with dovecot) .. 
Server 1 and Server 2 ( backup system) . if they are running together in 
parallel, I need a replication in order NOT to corrupt files... correct 
? RSYNC MY corrupt files..

2) now I have  only _one system_ ( in fact a VM with sendmail and 
dovceot )  and I want to backup every 20min, the emails.. normally a 
simple RSYNC of the email folder should be enough ? even without 
stopping Dovecot service.. just on the fly ...correct ? ?

Then, in case of crash.. I can reinstall my VM and mount the new NFS 
folder... that should be OK ?

What do you think ?

Thanks...

On 3/27/22 08:12, Stephane Magnier wrote:
>
> Hi,
>
> I am trying using a replication. Here is my config : 10-mail.conf. 
> Before going " on real life " I try to make a very basic example... 
> but without any success :-(   bad start
>
> I took the config example on dovecot wiki
>
> The idea is to replicate the user: "user1" on a different server IP 
> 177.28.1.120 at the location /home/SERVER/test and to get at the end 
> the folder "/home/SERVER/test/user1"
>
> On the top, I wish to replication with the user / group : vmail. For 
> the transfer, I use the root login on the backup server to avoid other 
> rights problems at the moment
>
> 2) how to synchronized  specific users ? apparently it's trying to 
> sync other things.. :-)
>
>
>     # mbox_very_dirty_syncs = yes
>     mail_plugins=$mail_plugins quota notify replication
>     service replicator {
>       process_min_avail = 1
>     }
>
>     dsync_remote_cmd = ssh -l root 177.28.1.120 doveadm dsync-server
>     -u user1
>     plugin {
>         mail_replica =remote:root at 177.28.1.120:/home/SERVER/test/
>         }
>
>     service aggregator {
>     fifo_listener replication-notify-fifo {
>     user = vmail
>     }
>     unix_listener replication-notify {
>     user = vmail
>     }
>     }
>
>     service replicator {
>     unix_listener replicator-doveadm {
>     mode = 0600
>     user = vmail
>     }
>     }
>
>     replication_max_conns = 10
>
>
>
> But apparently nothing is happening....
>
>     [root at xxx xenia]# doveadm replicator status
>     Queued 'sync' requests 0
>     Queued 'high' requests 0
>     Queued 'low' requests 0
>     Queued 'failed' requests 0
>     Queued 'full resync' requests 24
>     Waiting 'failed' requests 10
>     Total number of known users   34
>
> and the folder test is empty
>
> Any idea what is wrong ? maybe I should ask a start a cmd line to 
> start the process ? (
>
>
>     [root at mbox1 xenia]# doveadm replicator status '*'
>     username priority fast sync full sync success sync failed
>     rngd none     -         -         -            -
>     *user1                                                   none
>     00:00:04  00:40:05  -            y        ( failed )*
>     saslauth none     -         -         -            -
>     sa-milt none     -         -         -            -
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20220327/dd1df5ef/attachment.htm>


More information about the dovecot mailing list