Best Practice

iRedMail Eazy (the deployment and support platform) maintains core config files, it's normal that you want to override some settings in default setup, please follow some simple rules to store your custom settings, and do not modify the core config files managed by iRedMail Eazy. This is the key to achieve fear-less upgrade.

MariaDB

Sample config file, /opt/iredmail/custom/mysql/custom.conf:

[mysqld]
max_connections     = 1024

Nginx

Directory Structure

iRedMail uses the directory structure recommended by Debian/Ubuntu:

/etc/nginx/                         # all config files

        |- conf-available/          # store settings used inside Nginx `http {}` block.
                                    # Note: files under this directory are NOT
                                    #       loaded by Nginx directly.

        |- conf-enabled/            # symbol links to files under `conf-available/`.
                                    # Note: files under this directory are
                                    #       loaded by Nginx directly.

        |- sites-available/         # store virtual web host config files.
                                    # Note: files under this directory are NOT
                                    #       loaded by Nginx directly.

        |- sites-enabled/           # symbol links to files under `sites-available/`.
                                    # Note: files under this directory are
                                    #       loaded by Nginx directly.

        |- sites-conf.d/
                |- default-ssl/     # modular config files used by default
                                    # virtual web host.

/opt/iredmail/custom/nginx/         # all custom config files.
                        |- conf-available/
                        |- conf-enabled/
                        |- sites-available/
                        |- sites-enabled/
                        |- custom.sh        # shell script used for advanced customization

Postfix

Postfix doesn't support loading settings from multiple files.

Dovecot

Dovecot supports loading from mulitple config files, and settings will be overrode by the last one.

Roundcube

All your custom settings should be placed in this file, and do NOT touch main config file /opt/www/roundcubemail/config/config.inc.php.

SOGo

iRedAPD

iRedAdmin

Amavisd

Fail2ban