Install iRedMail with a socket connection to an already installed instance of MariaSQL

Update 2: official solution
Update: apparently this is a better solution.

Get latest iRedMail. Unpack it and cd to its directory.

In ./functions/*.sh we need to replace all instances of mysql-server with nothing, mysql-client with mariadb-client, and ‘php5-mysql’ with ‘php5-mysqlnd’.

Next in all files in /functions/ replace all ‘ -h${MYSQL_SERVER} -P${MYSQL_SERVER_PORT}’ with nothing. Same with ‘ -h${SQL_SERVER} -P${SQL_SERVER_PORT}’.

Then temporarily change your root password for localhost access to your MySQL/MariaDB to empty (just for a few minutes). In a mysql console do this (iRedMail install with set the password):

If you can, just manually make the config file, in order to put:

Instead of ‘127.0.0.1’ – this will fix RoundCube’s error when trying to connect (localhost defaults to the socket connection).

Go ahead and install iRedMail.

To fix iRedMail’s error with PHP5 install lsof.