Hi I use Ubuntu 20.04.2 and mariadb from mariadb.org I installed two mail servers as in https://www.howtoforge.com/tutorial/ispconfig-multiserver-setup-debian-ubuntu/3/ After install, the problem is, the emails between the two servers cannot sync wtih dsync. Apparently it caused by Code: mysqld.sock run in different location that required by dovecot. check the log using, Code: journal -eu dovecot Error: mysql(localhost): Connect failed to database (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' dovecot needs mysqld.sock run in Code: /var/run/mysqld/mysqld.sock while mariadb runs Code: mysqld.sock at Code: /run/mysqld/mysqld.sock the solution to this is quiet simple: because the mysql.sock file is created when MariaDB starts and is removed when MariaDB is shutdown. It won't exist if MariaDB is not running; so we need to edit edit file Code: /etc/mysql/mariadb.conf.d/50-server.cnf from this, Code: socket = /run/mysqld/mysqld.sock to this, Code: socket = /var/run/mysqld/mysqld.sock if it doesn work, try also to edit mysqld.sock in Code: /etc/mysql/my.cnf Take note that when the email server starts, dovecot run first than mariadb. This make trouble since dovecot cannot find mysqld.sock runs at Code: /var/run/mysqld after the server run So after we edit mariadb settings like above and restart mariadb, we need to restart dovecot, Code: service mariadb restart service dovecot restart That's it! after that the emails on the servers start to sync when the mail server starts, is there a way we can make dovecot runs after mariadb starts? in other words, can we let mariadb starts first and after that dovecot? otherwise, when the server resume from after blackout, it needs manual intervention to restart dovecot to make the emails sync. in case the servers are in far far away, how do i know if i should restart dovecot?