<div dir="ltr">Hi All,<div><br></div><div>I am also in a similar environment. I also stuck here. </div><div><br></div><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">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">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">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.<br></div><div><br></div><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">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><br></div><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">kishore@test.testorg.com</a> <a href="mailto:remote%3Avmail@bal3200dev002.testorg.com">remote:vmail@bal3200dev002.testorg.com</a>"<br></div><div><br></div><div>Is "replication" and "sync" are same?</div><div><br></div><div>Why are we not able to see all the emails at one time without the "sync" command? </div><div> </div><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><br></div><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><br></div><div>Please help me to fix the issue. </div><div><br></div><div>Thanks & Regards,</div><div>Kishore Potnuru</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 16, 2020 at 2:33 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><blockquote type="cite">With DNS this happens automatically because ips are rotated by resolvers<br>and the mailclient gets the same ip for all its connections. Failover<br>is builtin as mailclients just connect to the second ip when the first<br>is not reachable.<br></blockquote><br>I don't trust DNS load balancing. I saw too many times a client stuck<br>with the wrong (down) IP... This is my experience ;-)<br></div></div></blockquote><div><br></div><div>Interesting, I have deployed that dns-based approach where two dovecot servers</div><div>are replicating between two distant datacenters. A few years ago one datacenter</div><div>had a major outage and new connections quickly failed over to the remaining</div><div>server. Maybe this is client specific and/or has improved over time.</div><div><br></div><div>If the loadbalancer/director approach works for you, that's ok.</div><br><blockquote type="cite"><div><div><blockquote type="cite">Replication works reliable with mdbox/sdbox but you should avoid maildir.<br></blockquote><br>I'm using and I like Maildir. There are some documentation about to<br>don't use it with replication? Which are the drawbacks?<br></div></div></blockquote><div><br></div><div>Maildir is probably the most robust mail storage format, but it is very</div><div>demanding on your disks because flags like "Seen" are encoded in the</div><div>filename. Every flag change needs IO as well as copying/moving/deleting</div><div>mails, quota, ... A maildir with 100k+ mails can impact the servers overall</div><div>performance, but as you use all flash storage that may not be a problem.</div><div><br></div><div>I remembered something about replication and maildir, took me some time</div><div>to find it:</div><div><br></div><div><a href="https://dovecot.org/pipermail/dovecot/2017-February/107125.html" target="_blank">https://dovecot.org/pipermail/dovecot/2017-February/107125.html</a></div><div><br></div><div>Timo said (Mon Feb 20 10:09:48 UTC 2017):</div><div><br></div><div>"<span style="color:rgb(0,0,0);white-space:pre-wrap;background-color:rgb(255,255,255)">There seems to be something weird with using Maildir and replication.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap;background-color:rgb(255,255,255)">Haven't had time to debug it and it's likely not an easy bug to fix,</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap;background-color:rgb(255,255,255)">so for now the solution would be to use only sdbox/mdbox with replication."</span></div><div><br></div><div>I don't know if that is still the case, I can just tell mdbox works for me.</div><div><br></div><div><br></div><div>Best regards,</div><div>Gerald</div></div></div></blockquote></div>