<div dir="ltr">Thank you for the reply.<div><br></div><div>
I have done the sync manually with "doveadm sync" command. But, I have not configured the replication yet. </div><div><br></div><div>I am looking at the below webpage for the replication. </div><div><br></div><div><a href="https://wiki.dovecot.org/Replication">https://wiki.dovecot.org/Replication</a> </div><div><br></div><div>I am using the dovecot version "2.2.36". I am confused with what needs to be done after reading that page.</div><div><br></div><div>1. 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. </div><div><br></div><div>2. Also, do I need to set the replication on both of my servers the same and as it is?</div><div><br></div><div>Please help me in understanding this?</div><div><br></div><div>Thanks,</div><div>Kishore Potnuru</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 16, 2020 at 6:20 PM Gerald Galster <<a href="mailto:list%2Bdovecot@gcore.biz">list+dovecot@gcore.biz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><blockquote type="cite"><div><div dir="ltr"><div>I have 2 test servers with the below configuration.</div><div> </div><div>==========================</div><div>Linux OS - Red Hat Enterprise Linux Server release 7.7 (Maipo)<br>Dovecot version - 2.2.36 (1f10bfa63)<br>Postfix version - 2.10.1 </div><div>========================== <br></div><div><br></div><div>Trying to create High Availability. </div><div><br></div><div>I have added both of the above servers behind a F5 load balancer. I have got a Load Balancer FQDN "<a href="http://intl-dev-imaptest.testorg.com/" target="_blank">intl-dev-imaptest.testorg.com</a>". I have enabled/opened the ports (25/110/143/993/995) on the above "<a href="http://intl-dev-imaptest.testorg.com/" target="_blank">intl-dev-imaptest.testorg.com</a>".</div><div><br></div><div>When I send 10 emails to "<a href="http://intl-dev-imaptest.testorg.com/" target="_blank">intl-dev-imaptest.testorg.com</a>", 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.</div></div></div></blockquote><div><br></div><div>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.</div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div>From Outlook I have configured the email address using "POP and IMAP", when I gave the IMAP server as "<a href="http://intl-dev-imaptest.testorg.com/" target="_blank">intl-dev-imaptest.testorg.com</a>" ,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?</div></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>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?</div><div> </div><blockquote type="cite"><div><div dir="ltr"><div>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?</div><div><br></div><div>"doveadm sync -f -u <a href="mailto:kishore@test.testorg.com" target="_blank">kishore@test.testorg.com</a> <a href="mailto:remote%3Avmail@bal3200dev002.testorg.com" target="_blank">remote:vmail@bal3200dev002.testorg.com</a>"<br></div><div><br></div><div>Is "replication" and "sync" are same?</div></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div>Why are we not able to see all the emails at one time without the "sync" command?</div></div></div></blockquote><div><br></div><div>Probably because you did not configure replication?</div><div><br></div><div><br></div><blockquote type="cite"><div dir="ltr"><div>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. </div></div></blockquote><div><br></div><div>It seems you just have to configure replication.</div><div><br></div><blockquote type="cite"><div dir="ltr"><div>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. <br></div></div></blockquote><br></div><div>See my other mail, it may be better to use mdbox instead of maildir.</div><div><br></div><div>Best regards</div><div>Gerald</div></div></blockquote></div>