Thank you for the reply.
I have done the sync manually with "doveadm sync" command. But, I have not configured the replication yet.
I am looking at the below webpage for the replication.
https://wiki.dovecot.org/Replication
I am using the dovecot version "2.2.36". I am confused with what needs to be done after reading that page.
They are talking about v2.3.1 and v2.2+. Which one do I need to follow? Could you please give me more details on this? Providing some sample settings will be more helpful for me, please.
Also, do I need to set the replication on both of my servers the same and as it is?
Please help me in understanding this?
Thanks, Kishore Potnuru
On Thu, Jul 16, 2020 at 6:20 PM Gerald Galster <list+dovecot@gcore.biz> wrote:
I have 2 test servers with the below configuration.
========================== Linux OS - Red Hat Enterprise Linux Server release 7.7 (Maipo) Dovecot version - 2.2.36 (1f10bfa63) Postfix version - 2.10.1
Trying to create High Availability.
I have added both of the above servers behind a F5 load balancer. I have got a Load Balancer FQDN "intl-dev-imaptest.testorg.com". I have enabled/opened the ports (25/110/143/993/995) on the above " intl-dev-imaptest.testorg.com".
When I send 10 emails to "intl-dev-imaptest.testorg.com", then those 10 emails are getting distributed between the above 2 backend servers (5 emails to each server). I see those 5 emails each in both the servers.
You should see 10 emails on each server if replication is working: 5 emails that were directly delivered via loadbalancer and 5 emails from the other server via replication.
From Outlook I have configured the email address using "POP and IMAP", when I gave the IMAP server as "intl-dev-imaptest.testorg.com" ,then it shows only 5 emails from server1 in outlook and after a few seconds/minutes, automatically it shows/refreshes the other 5 emails from server2. But I am not seeing all the 10 emails at the same time. why?
The loadbalancer does its job, sometimes the Outlook connection is forwarded to server A sometimes to server B. So you just see the mails on the respective server. This is very bad. Your Mailclient is probably syncing and deleting emails everytime the connection is moved to the other server. As I suggested in the other thread you should at least configure some kind of ip stickyness when using a loadbalancer, so that your mailclient reaches the same backend.
The purpose of replication is that two servers, operating independently, have the same dataset. Your servers seem to have completely distinct datasets, which indicates replication is not working. Did you configure replication?
So I tried the sync command. When I execute sync command like below from server1, it reflects the same emails in other server2 also. Then I see the same number of emails in both the servers. Is it not possible to access the both servers emails at one time with the "sync" command? Do we need to run this on all the email boxes on both servers? don't we miss/lose any emails during this sync process multiple times?
"doveadm sync -f -u kishore@test.testorg.com remote:vmail@bal3200dev002.testorg.com"
Is "replication" and "sync" are same?
Think of replication as a continous sync. This has to be done every time an email is delivered, which dovecot does automatically when replication is configured.
You don't lose any emails because the replication/sync is bidirectional, it copies from the respective other server what's missing. Of course this is not instant but usually happens within seconds.
Why are we not able to see all the emails at one time without the "sync" command?
Probably because you did not configure replication?
What is the best and easiest way to create High Availability with just 2 servers, like emails should travel to both servers equally and if one server goes down also, another server should take care of the emails/functionality. This is my requirement.
It seems you just have to configure replication.
My current real time environment: I have around 10 email domains and each domain is having 10 imap emails. In total around 100 email boxes/addresses. We receive around 50K emails in a day to those email addresses. We are using the "Maildir" format in our environment. Want to move to the High Availability option with 2 servers.
See my other mail, it may be better to use mdbox instead of maildir.
Best regards Gerald