iRedMail with Postfix, Dovecot, Fail2ban, ClamAV, Roundcube, Postfixadmin and MySQL server
1.6K
iRedMail allows deployment of an OPEN SOURCE, FULLY FLEDGED, FULL-FEATURED mail server in several minutes, for free. If several minutes is long time then this docker container can reduce the deployment time and help you to get a mail server in the matter of seconds.
The current version of container uses MySQL for accounts saving. In the future the LDAP can be used, so pull requests are welcome. Container contains Postfix, Dovecot, Fail2ban, ClamAV and Roundcube from iRedMail and MySQL server as well as PostfixAdmin for administration and additional plugins for Roundcube. The hostname of the mail server can be set using the normal docker methods (docker run -h <host> or setting 'hostname' in a docker compose file). In order to customize the container several environmental variables are allowed:
Container is prepared to handle data as persistent using mounted folders for data. Folders prepared for initialization are:PATH/
With all information prepared, let's test your new iRedMail server:
docker run -p 80:80 -p 443:443 \
-h HOSTNAME.DOMAIN \
-e "MYSQL_ROOT_PASSWORD=password" \
-e "TZ=Europe/Prague" \
-e "POSTMASTER_PASSWORD={PLAIN}password" \
-e "IREDAPD_PLUGINS=['reject_null_sender', 'reject_sender_login_mismatch_custom', 'greylisting', 'throttle', 'amavisd_wblist', 'sql_alias_access_policy']" \
-v /srv/iredmail/mysql:/var/lib/mysql \
-v /srv/iredmail/vmail:/var/vmail \
-v /srv/iredmail/clamav:/var/lib/clamav \
--name=iredmail infiniteluke/iredmail-postfixadmin:latest
The iRedMail container gained automatic database schema migration with version 1.3 of the iRedMail container. What does it mean? It means upgrades should be smooth, and one wont no longer need to care about studying release notes.
If you are running and older version of the container the automatic upgrade needs to be activated by installation of control table in vmail database using the following steps.
-- Switch to vmail database
use vmail
-- Create version tracking table
CREATE TABLE IF NOT EXISTS `versions` (
`component` varchar(120) NOT NULL,
`version` varchar(20) NOT NULL,
PRIMARY KEY(`component`)
);
-- Insert initial line representing installed version
INSERT INTO versions VALUES('iredmail', 'YOUR_CURRENT_VERSION');
The next step is just to upgrade the container version.
When a new version of iRedMail gets released and I am not providing the upgrade. Feel free to open a pull request with migration stored in mysql/static_files/opt/iredmail/migrations/DATABASE. The file name should follow this schema:
INDEX_IREDMAILVERSION__SHORTDESCRIPTION.sql
Content type
Image
Digest
Size
358.7 MB
Last updated
over 5 years ago
docker pull infiniteluke/iredmail-postfixadmin