How to make bi-directional sync of Maildir in mx1 and mx2 servers

Discussion in 'Installation/Configuration' started by Muhammad Shaid, Jul 1, 2024.

  1. Muhammad Shaid

    Muhammad Shaid New Member

    I configured my mail server as per perfect server setup. When I stop the mx2. and change the configuration of roundcube and set default imap server to mx1.example.com. The webmail receives and show perfectly. But when the mx2 is up again and make changes in roundcube's default imap server to mx2.example.com. It also works fine. But mx2 doesn't pull mails from mx1 server, whom the mx1 recieved.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. Muhammad Shaid

    Muhammad Shaid New Member

    I already configured the server by following this link. After that, I stopped MX2 VM(the default IMAP host) to test, if the mx1 is mirroring (DB and Maildir) or not and edited /etc/roundcube/config_file and set mx1 as the default IMAP host. I found the mx1 is working fine. All mails are synced. Then I sent and received some more mails. After that, I started the mx2 and set the mx2 as the default IMAP host in /etc/roundcube/config file. But now, only mx1 contains those mails, whom are received during mx2 was off. but mx2 is not pulling those Maildir files from mx1.

    So what is happening is like

    mx2 >>>> mx1 ( mx2 replicating mx1 )
    mx1 >>>> mx2 ( but mx1 is not replicating mx2 )
     
  4. pyte

    pyte Well-Known Member HowtoForge Supporter

  5. Muhammad Shaid

    Muhammad Shaid New Member

    Thanks Bro. I don't have to make any changes. All were working fine. But the fact is

    When the mx2 is the default IMAP. all mx2's "/var/vmail/example.com/user/Maildir/cur" directory's mail are stored in /var/vmail/example.com/user/Maildir/new directory, in mx1.
     
  6. pyte

    pyte Well-Known Member HowtoForge Supporter

    Which indicates that the sync is not working correctly at least in one direction.
     
  7. Muhammad Shaid

    Muhammad Shaid New Member

    As I am not using SSL. My /etc/dovecot/conf.d/99-ispconfig-custom-config.conf is below for mx1




    My /etc/dovecot/conf.d/99-ispconfig-custom-config.conf is below for mx2



    doveadm replicator status [ MX1 status ]



    doveadm replicator status [ MX2 status ]






     
    Last edited: Jul 2, 2024
  8. Muhammad Shaid

    Muhammad Shaid New Member

    Those attachment contains manual sync log of both mx servers
     

    Attached Files:

  9. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page