2.1 KiB
IREDDOCKER
This is the iRedMail docker image with included external ldap authentication and ability of usage an external mysql database.
Install
Clone git repository to local folder
git clone https://github.com/temasky/ireddocker.git
Configure
If you need to enable replication of mysql server, you need to run preconfigured mysql container. To do this, create config file with parameters for mysql slave server:
cat <<EOF > slave.cnf
[mysqld]
server-id = 102 log_bin = /var/log/mysql/mysql-bin.log relay-log = /var/log/mysql/mysql-relay-bin.log binlog_do_db = amavisd binlog_do_db = iredadmin binlog_do_db = iredapd binlog_do_db = roundcubemail bind-address = 0.0.0.0
... and run container from this directory:
```docker run --name slave-mariadb -v ./slave.cnf:/etc/mysql/conf.d/slave.cnf -e MYSQL_ROOT_PASSWORD=(the sama password as in master server) -d -p 3306:3306 mariadb:latest```
add FQDN name in ```docker-compose.yml``` file
create file ```ireddocker/iredmail-env.conf```, like this:
cat < ireddocker/iredmail-env.conf LDAP_EXTERNAL_USE=YES LDAP_EXTERNAL_SERVER=#ldap server address LDAP_EXTERNAL_BINDPW=#bind password for ldap LDAP_EXTERNAL_BINDUSER=#bind user for ldap LDAP_EXTERNAL_BASE=#base dn for mail users FIRST_DOMAIN=#mail domain name MYSQL_MASTER_ADDRESS=#address of master server in case of replication MYSQL_SLAVE_ADDRESS=#address of slsve server in case of replication MYSQL_DATABASES="amavis iredadmin iredapd roundcubemail" MYSQL_USE_REPLICTION=YES MYSQLEXIST=#usage existing databse MYSQL_ROOT_USER=#name for admin(root) user of external database MYSQL_ROOT_PASSWD=#passwd for admin(root) user of external database CUSTOM_CERT_USE:=NO#usage of external cert file. If Yes - place certfile in cert_dir directory, in global catalog CUSTOM_CERT_KEYFILE:=privkey.pem CUSTOM_CERT_CERTFILE:=fullchain.pem EOF
Create directory for mail and for certificates (default is ```mail_dir``` and ```cert_dir```. For other location this filder need to be change in ```docker-compose.yml``` file )
mkdir mail_dir mkdir cert_dir
## RUN
```docker-compose up -d```