Giter Site home page Giter Site logo

dockerized's Introduction

WARNING: THIS IS A BETA EDITION AND NOT ALWAYS STABLE, DO NOT TRY IT IN PRODUCTION (YET).

Quick start

Create a docker environment file used to store custom settings:

mkdir /iredmail         # Create a new directory or use any directory
                        # you prefer. `/iredmail/` is just an example
cd /iredmail
touch iredmail-docker.conf

echo HOSTNAME=mail.mydomain.com >> iredmail-docker.conf
echo FIRST_MAIL_DOMAIN=mydomain.com >> iredmail-docker.conf
echo FIRST_MAIL_DOMAIN_ADMIN_PASSWORD=my-secret-password >> iredmail-docker.conf
echo MLMMJADMIN_API_TOKEN=$(openssl rand -base64 32) >> iredmail-docker.conf
echo ROUNDCUBE_DES_KEY=$(openssl rand -base64 24) >> iredmail-docker.conf

Create required directories to store application data:

cd /iredmail
mkdir -p data/{backup-mysql,clamav,custom,imapsieve_copy,mailboxes,mlmmj,mlmmj-archive,mysql,sa_rules,ssl,postfix_queue}

Launch the container:

docker run \
    --rm \
    --name iredmail \
    --env-file iredmail-docker.conf \
    --hostname mail.mydomain.com \
    -p 80:80 \
    -p 443:443 \
    -p 110:110 \
    -p 995:995 \
    -p 143:143 \
    -p 993:993 \
    -p 25:25 \
    -p 465:465 \
    -p 587:587 \
    -v /iredmail/data/backup-mysql:/var/vmail/backup/mysql \
    -v /iredmail/data/mailboxes:/var/vmail/vmail1 \
    -v /iredmail/data/mlmmj:/var/vmail/mlmmj \
    -v /iredmail/data/mlmmj-archive:/var/vmail/mlmmj-archive \
    -v /iredmail/data/imapsieve_copy:/var/vmail/imapsieve_copy \
    -v /iredmail/data/custom:/opt/iredmail/custom \
    -v /iredmail/data/ssl:/opt/iredmail/ssl \
    -v /iredmail/data/mysql:/var/lib/mysql \
    -v /iredmail/data/clamav:/var/lib/clamav \
    -v /iredmail/data/sa_rules:/var/lib/spamassassin \
    -v /iredmail/data/postfix_queue:/var/spool/postfix \
    iredmail/mariadb:stable

Notes:

  • On first run, it will generate a self-signed ssl cert, this may take a long time, please be patient.
  • Each time you run the container, few tasks will be ran:
    • Update SpamAssassin rules.
    • Update ClamAV virus signature database.
  • FIRST_MAIL_DOMAIN_ADMIN_PASSWORD is only set/reset on first run, not each run.
  • All SQL passwords are randomly set/reset by default each time you launch or relaunch the container. If you don't like this, please set fixed passwords in iredmail-docker.conf, e.g. MYSQL_ROOT_PASSWORD=<your-password>.
  • Do not forget to setup DNS records for your server hostname and email domain names.
  • If you're running Docker on Windows and macOS, container will fail to launch and you must switch to docker volumes as described below.

If you're running Docker on Windows and macOS, or you just prefer storing persistent data in Docker volumes, please create required volumes:

docker volume create iredmail_backup           # Backup copies
docker volume create iredmail_mailboxes        # All users' mailboxes
docker volume create iredmail_mlmmj            # mailing list data
docker volume create iredmail_mlmmj_archive    # mailing list archive
docker volume create iredmail_imapsieve_copy   # Used by Dovecot plugin 'imapsieve'
docker volume create iredmail_custom           # custom config files
docker volume create iredmail_ssl              # SSL cert/key files
docker volume create iredmail_mysql            # MySQL databases
docker volume create iredmail_clamav           # ClamAV database
docker volume create iredmail_sa_rules         # SpamAssassin rules
docker volume create iredmail_postfix_queue    # Postfix queues

Then launch the container with volumes:

docker run \
    --rm \
    --name iredmail \
    --env-file iredmail-docker.conf \
    --hostname mail.mydomain.com \
    -p 80:80 \
    -p 443:443 \
    -p 110:110 \
    -p 995:995 \
    -p 143:143 \
    -p 993:993 \
    -p 25:25 \
    -p 465:465 \
    -p 587:587 \
    -v iredmail_backup-mysql:/var/vmail/backup/mysql \
    -v iredmail_mailboxes:/var/vmail/vmail1 \
    -v iredmail_mlmmj:/var/vmail/mlmmj \
    -v iredmail_mlmmj_archive:/var/vmail/mlmmj-archive \
    -v iredmail_imapsieve_copy:/var/vmail/imapsieve_copy \
    -v iredmail_custom:/opt/iredmail/custom \
    -v iredmail_ssl:/opt/iredmail/ssl \
    -v iredmail_mysql:/var/lib/mysql \
    -v iredmail_clamav:/var/lib/clamav \
    -v iredmail_sa_rules:/var/lib/spamassassin \
    -v iredmail_postfix_queue:/var/spool/postfix \
    iredmail/mariadb:stable

Overview

Only one config file iredmail-docker.conf on Docker host.

This file is optional if you prefer overwriting parameters with the -e argument while launching container. For example:

docker run -e HOSTNAME=mail.mydomain.com -e FIRST_MAIL_DOMAIN=mydomain.com ...

We recommend storing them in an env file (iredmail-docker.conf in our example) to save some typing each time you launch the container.

Required parameters

There're few REQUIRED parameters you MUST set in iredmail-docker.conf:

# Server hostname. Must be a FQDN. For example, mail.mydomain.com
HOSTNAME=

# First mail domain name. For example, mydomain.com.
FIRST_MAIL_DOMAIN=

# (Plain) password of mail user `postmaster@<FIRST_MAIL_DOMAIN>`.
FIRST_MAIL_DOMAIN_ADMIN_PASSWORD=

# A secret token used for accessing mlmmjadmin API.
MLMMJADMIN_API_TOKEN=

# The secret string used to encrypt/decrypt Roundcube session data.
# Required if you need to run Roundcube webmail.
# You can generate random string with command `openssl rand -base64 24` as the
# des key.
# Every time this key changed, all Roundcube session data becomes invalid and
# users will be forced to re-login.
ROUNDCUBE_DES_KEY=

Notes:

  • iredmail-docker.conf will be read by Docker as an environment file, any single quote or double quote will be treated as part of the value. Do not use any whitespace, tab in value, and no single or double quotes.
  • It will be imported as bash shell script too.

There're many OPTIONAL settings defined in file /docker/entrypoints/settings.conf inside docker container, you'd like to change any of them, please write the same parameter name with your custom value in iredmail-docker.conf to override it.

Optional parameters

# Define your custom https port if you don't want to the default one (443).
PORT_HTTPS=4443

Hardware requirements

  • At least 4GB RAM is required for a low traffic production mail server.

Installed softwares

  • Postfix: SMTP server.
  • Dovecot: POP3/IMAP/LMTP/Sieve server, also offers SASL AUTH service for Postfix.
  • mlmmj: mailing list manager.
  • mlmmjadmin: RESTful API server used to manage (mlmmj) mailing lists.
  • Amavisd-new + ClamAV + SpamAssassin: anti-spam and anti-virus, DKIM signing and verification, etc.
  • iRedAPD: Postfix policy server. Developed by iRedMail team.
  • Fail2ban: scans log files and bans bad clients.
  • Roundcube: webmail.
  • iRedAdmin: web-based admin panel, open source edition.

You may want to check this tutorial to figure out the mapping of softwares and network ports.

Exposed network ports

  • 80: HTTP
  • 443: HTTPS
  • 25: SMTP
  • 465: SMTPS (SMTP over SSL)
  • 587: SUBMISSION (SMTP over TLS)
  • 143: IMAP over TLS
  • 993: IMAP over SSL
  • 110: POP3 over TLS
  • 995: POP3 over SSL
  • 4190: Managesieve service

Links

dockerized's People

Contributors

dup4 avatar iredmail avatar oliverpa77 avatar tenhishadow avatar tpimh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockerized's Issues

logrotate error

I get daily mails from logrotate:

/etc/cron.daily/logrotate:
error: clamav-daemon:1 duplicate log entry for /var/log/clamav/clamav.log
error: found error in file clamav-daemon, skipping
error: clamav-freshclam:1 duplicate log entry for /var/log/clamav/freshclam.log
error: found error in file clamav-freshclam, skipping
mysqld is alive
run-parts: /etc/cron.daily/logrotate exited with return code 1

There is

  • a file /etc/logrotate.d/clamav including /var/log/clamav/*.log
  • the additional files /etc/logrotate.d/clamav-daemon and /etc/logrotate.d/clamav-freshclam including /var/log/clamav/clamav.log and /var/log/clamav/freshclam.log

I think that is it what logrotate do not like.

Any helm chart planned?

Hi, would like to contribute to helm chart if you have such plan? And what is the status of docker development for production?

Emails from outside are not receiving

Hi!

I've installed and configured the iredmail container.

What works:

  • all with ssl
  • send mails between domain users (a->b, b->a)
  • send mails to other emails
  • configure clients, (with autodiscover also)
  • all ports opened
    What I miss?

best regards!

But can't send emails from gmail or another.

Handle MariaDB initialization, custom settings, existing databases, upgrade

MariaDB initialization:

  • Initialize MariaDB db
  • Create /root/.my.cnf
  • Initialize databases for different applications. e.g. iRedAPD, iRedAdmin, Roundcube.
    • Including creating db, add user, grant permissions.
    • If database exists, just grant required permissions (with /root/.my.cnf).

After initialization and running docker container for a while, we will have new SQL data:

  • how to detect the data in /var/lib/mysql/ were generated before this container was started?

Answers

  • MariaDB data directory (/var/lib/mysql/ by default) must be placed in a mounted volume.
  • Run shell script for each application to handle SQL update while starting container (After mariadb service is running, before running applications).

Failing to store banned IP addresses in SQL database

Fail2ban is unable to update MySQL database, logs are showing "ERROR Failed to execute ban jail 'postfix-pregreet' action 'banned_db' info 'ActionInfo..."

This sees to be related to the current permissions set for /opt/iredmail/bin/fail2ban/banned_db and /opt/iredmail/bin/fail2ban/unbanip

Applying "chmod 0550" to both files fixed the problem.

I am using the stable version, "iredmail/mariadb:stable"

Password change from roundcube fails

Trying to change the password in roundcube fails with an error.

/var/log/roundcube/roundcube.log:
roundcube: <jik20nnc> DB Error: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name does not resolve in /opt/www/roundcubemail-1.4.9/program/lib/Roundcube/rcube_db.php on line 175 (POST /?_task=settings&_action=plugin.password-save)

First I thought that it is because the privilegs of the "roundcube" db user for "vmail.mailbox" are missing.
But after adding them with:
GRANT SELECT, UPDATE ON 'vmail'.'mailbox' TO 'roundcube'@'%'
I still get the same error.

install: can't create directory ... : Operation not permitted

Thank you for your efforts to maintain this software.

I found these errors in the installation:

[iRedMail] [Entrypoint] /docker/entrypoints/postfix.sh
install: can't create directory '/opt/iredmail/custom/postfix/disclaimer': Operation not permitted
[iRedMail] [Entrypoint] /docker/entrypoints/antispam.sh
install: can't create directory '/opt/iredmail/custom/amavisd/dkim': Operation not permitted

I suspect that these are permissions that are assigned in the bash routines:
postfix.sh
antispam.sh

I appreciate your help solving this error

Additional custom folders

I would like to propose adding 3 additional folders in the "custom" volume:

  1. www --> for custom web pages/scripts which can be referenced from custom nginx configs (e.g. for the mail autoconfig script)

  2. cron.d --> for custom cronjobs (e.g. I have a backup-mx script to sync the domains and mail addresses with another server)

  3. scripts --> for custom scripts (e.g. the backup-mx sync script from 2.)

  4. and 3. can be done with additional volumes also, but I would prefer to have it all custom.
    For 2. I have not found a good alternative solution.

What do you think about that?
I can prepare pull requests if required.

Installation broken with latest changes

Installation / startup seems to be stuck with /docker/entrypoints/mlmmjadmin.sh, over an hour there now.

I have tested it on a fresh Debian installation as well, stuck there too.

Using the instructions from the docker hub.

image

postfix not using correct letsencrypt certificate

Postfix is configured to use the /opt/iredmail/ssl/cert.pem certificate no matter what. However, letsencrypt needs to use combined.pem to prevent certificate errors. I can manually edit /etc/postfix/main.cf but this will break after every update, and I don't believe there is a way to create custom postfix config files.

[CRITICAL][SECURITY] Bad config networks

Hi!

There is an important security issue in the config files.

postfix trusts all IPs ranges from mynetworks config value.

You added 172.0.0.0/8 range in the list, which means that anyone with a 172.* IP address can send emails by simply attacking the host server.

The only range to use is 172.16.0.0/12 (which represents private network from 172.16.0.0 to 172.31.255.255)

I take this issue to inform you I would have prefered sending it to you by email, but no security contact form is available on iredmail.org. 😔

WIP: Moving from Alpine to Ubuntu (20.04, focal)

Dear all,

We're moving the base image from Alpine to Ubuntu (20.04, focal), the latest nightly build might not work during the transition. We need help to test it as much as possible to make it stable.

Known issues

  • MySQL failed to start if relaunch container
  • iRedAPD log doesn't redirect to /var/log/iredapd/iredapd.log. KNOWN ISSUE BUT NO PLAN TO FIX IT. iRedAPD runs with --foreground argument, it logs to stdout instead of syslog, so /etc/rsyslog.d/1-iredmail-iredapd.log is useless.
  • Reset MySQL root password failed:
ERROR 1396 (HY000) at line 2: Operation ALTER USER failed for 'root'@'%'

All in one container

Hi,
I really needed to update my email system, so I invested some time into the upgrade of my container. The container uses the general installation tar.gz file, and I decided to use centos:7 as a base image. I am tempted to use debian slim image due to smaller size, but it has small importance..

Check source codes here: https://github.com/lejmr/iredmail-docker

What you might find interesting is how I was dealing with multiple processes: https://github.com/lejmr/iredmail-docker/blob/master/mysql/static_files/etc/supervisord.conf using SupervisorD.

Also look at startup scripts which have the same property as entrypoint (passing pid of parent process): https://github.com/lejmr/iredmail-docker/tree/master/mysql/static_files/services

I hope I will find more time to help you out with this project. I hope this helps at least slightly.

Docker-compose build issue. Smth with add_user_vmail.sh

Last commit 809fb00.

Clone repo and try to docker-compose up --build.
Output:
: not foundipts/add_user_vmail.sh: line 3:
: not foundipts/add_user_vmail.sh: line 8:
addgroup: illegal character with code 13 at position 5
adduser: illegal character with code 13 at position 5
ERROR: Service 'iredmail_dovecot' failed to build: The command '/bin/sh -c /bin/sh ${SCRIPTS_DIR}/add_user_vmail.sh && rm -rf ${SCRIPTS_DIR}' returned a non-zero code: 1.

Also, I dont understand volumes in docker-compose.yml. Where are their mountpoints? They include envs, for example ${DOCKER_VOLUME_CUSTOM_CONF_DIR}, but I didnt found, where this envs set?

clavmav exit status 1 cycling

When running docker with volumes, after entering docker run with all of the flags, this are starting up, most services are spawned, then there is a continuous cycle of:
2020-11-29 23:08:39,502 INFO exited: clamav (exit status 1; not expected) 2020-11-29 23:08:40,509 INFO spawned: 'clamav' with pid 888 2020-11-29 23:08:40,540 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
I've tried a few things but to no avail. Any pointers?

Error in sending email by SMTP

connect from unknown[172.17.0.1]
2020-12-04T13:07:30.557858+00:00 5ff78fcf16f0 postfix/smtpd[14833]: NOQUEUE: reject: RCPT from unknown[172.17.0.1]: 554 5.7.1 [email protected]: Relay access denied; from=[email protected] to=[email protected] proto=ESMTP helo=<windows10.microdone.cn>
2020-12-04T13:07:30.651736+00:00 5ff78fcf16f0 postfix/smtpd[14833]: disconnect from unknown[172.17.0.1] ehlo=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=4/5

Nginx 502

So, ive installed and set up the docker container on my main 16.04 lts server and it seems that the uwsgi servers wont start. these are the errors i get when starting the docker container:

2020-10-24 09:03:45,146 INFO Included extra file "/etc/supervisor.d/amavisd.conf" during parsing
2020-10-24 09:03:45,146 INFO Included extra file "/etc/supervisor.d/clamav.conf" during parsing
2020-10-24 09:03:45,147 INFO Included extra file "/etc/supervisor.d/cron.conf" during parsing
2020-10-24 09:03:45,147 INFO Included extra file "/etc/supervisor.d/dovecot.conf" during parsing
2020-10-24 09:03:45,148 INFO Included extra file "/etc/supervisor.d/fail2ban.conf" during parsing
2020-10-24 09:03:45,148 INFO Included extra file "/etc/supervisor.d/iredadmin.conf" during parsing
2020-10-24 09:03:45,148 INFO Included extra file "/etc/supervisor.d/iredapd.conf" during parsing
2020-10-24 09:03:45,149 INFO Included extra file "/etc/supervisor.d/mariadb.conf" during parsing
2020-10-24 09:03:45,149 INFO Included extra file "/etc/supervisor.d/mlmmjadmin.conf" during parsing
2020-10-24 09:03:45,149 INFO Included extra file "/etc/supervisor.d/nginx.conf" during parsing
2020-10-24 09:03:45,150 INFO Included extra file "/etc/supervisor.d/phpfpm.conf" during parsing
2020-10-24 09:03:45,150 INFO Included extra file "/etc/supervisor.d/postfix.conf" during parsing
2020-10-24 09:03:45,150 INFO Included extra file "/etc/supervisor.d/rsyslog.conf" during parsing
2020-10-24 09:03:45,151 INFO Set uid to user 0 succeeded
2020-10-24 09:03:45,164 INFO RPC interface 'supervisor' initialized
2020-10-24 09:03:45,165 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-10-24 09:03:45,166 INFO supervisord started with pid 1
2020-10-24 09:03:46,169 INFO spawned: 'rsyslog' with pid 806
2020-10-24 09:03:46,171 INFO spawned: 'cron' with pid 807
2020-10-24 09:03:46,177 INFO spawned: 'mariadb' with pid 808
2020-10-24 09:03:46,183 INFO spawned: 'clamav' with pid 809
2020-10-24 09:03:46,196 INFO spawned: 'dovecot' with pid 810
2020-10-24 09:03:46,202 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-24 09:03:46,204 INFO spawned: 'iredapd' with pid 811
2020-10-24 09:03:46,211 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-24 09:03:46,219 INFO spawned: 'amavisd' with pid 812
2020-10-24 09:03:46,239 INFO spawned: 'phpfpm' with pid 816
2020-10-24 09:03:46,248 INFO spawned: 'nginx' with pid 818
2020-10-24 09:03:46,268 INFO spawned: 'postfix' with pid 819
2020-10-24 09:03:46,285 INFO spawned: 'fail2ban' with pid 820
2020-10-24 09:03:46,313 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,316 INFO success: cron entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,321 INFO success: mariadb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,325 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,325 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,325 INFO success: iredapd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,326 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,326 INFO success: phpfpm entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,327 INFO success: nginx entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,328 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:46,328 INFO success: fail2ban entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-24 09:03:47,645 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-24 09:03:47,646 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-24 09:03:50,024 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-24 09:03:50,025 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-24 09:03:52,029 INFO reaped unknown pid 592 (exit status 0)
2020-10-24 09:03:53,031 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-24 09:03:53,031 INFO gave up: iredadmin entered FATAL state, too many start retries too quickly
2020-10-24 09:03:53,032 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-24 09:03:53,032 INFO gave up: mlmmjadmin entered FATAL state, too many start retries too quickly

and this is my nginx log from the contiainer:
image

mlmmjadmin (exit status 1; not expected)

Hi @iredmail

Testing the latest version and there is an error:

root@mail:/var/www/mail/src# ./run_all_in_one.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/mariadb.sh 
[iRedMail] Starting temporary MariaDB instance.
2020-03-25 11:13:03 0 [Note] mysqld (mysqld 10.4.12-MariaDB-log) starting as process 11 ...
[iRedMail] Reset password for SQL user 'root'.
[iRedMail] [Run] /docker/mariadb/pre_start/0-vmail_db.sh
[iRedMail] Grant privileges to SQL user 'vmail' and 'vmailadmin'.
[iRedMail] Make sure [email protected] is a global admin.
[iRedMail] [Run] /docker/mariadb/pre_start/amavisd_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/fail2ban_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/iredapd_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/roundcube.sh
[iRedMail] [Entrypoint] /docker/entrypoints/dovecot.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/postfix.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmj.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmjadmin.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/iredapd.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/antispam.sh 
[iRedMail] Run 'sa-update' (required by Amavisd).
Update finished, no fresh updates were available
[iRedMail] [Entrypoint] /docker/entrypoints/nginx.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/phpfpm.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/roundcube.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/fail2ban.sh 
[iRedMail] CMD: /usr/bin/supervisord -c /etc/supervisord.conf
2020-03-25 11:13:07,840 INFO Included extra file "/etc/supervisor.d/amavisd.conf" during parsing
2020-03-25 11:13:07,840 INFO Included extra file "/etc/supervisor.d/clamav.conf" during parsing
2020-03-25 11:13:07,841 INFO Included extra file "/etc/supervisor.d/cron.conf" during parsing
2020-03-25 11:13:07,841 INFO Included extra file "/etc/supervisor.d/dovecot.conf" during parsing
2020-03-25 11:13:07,841 INFO Included extra file "/etc/supervisor.d/fail2ban.conf" during parsing
2020-03-25 11:13:07,841 INFO Included extra file "/etc/supervisor.d/iredapd.conf" during parsing
2020-03-25 11:13:07,842 INFO Included extra file "/etc/supervisor.d/mariadb.conf" during parsing
2020-03-25 11:13:07,842 INFO Included extra file "/etc/supervisor.d/mlmmjadmin.conf" during parsing
2020-03-25 11:13:07,842 INFO Included extra file "/etc/supervisor.d/nginx.conf" during parsing
2020-03-25 11:13:07,842 INFO Included extra file "/etc/supervisor.d/phpfpm.conf" during parsing
2020-03-25 11:13:07,843 INFO Included extra file "/etc/supervisor.d/postfix.conf" during parsing
2020-03-25 11:13:07,843 INFO Included extra file "/etc/supervisor.d/rsyslog.conf" during parsing
2020-03-25 11:13:07,843 INFO Set uid to user 0 succeeded
2020-03-25 11:13:07,857 INFO RPC interface 'supervisor' initialized
2020-03-25 11:13:07,857 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-03-25 11:13:07,858 INFO supervisord started with pid 1
2020-03-25 11:13:08,861 INFO spawned: 'rsyslog' with pid 329
2020-03-25 11:13:08,864 INFO spawned: 'cron' with pid 330
2020-03-25 11:13:08,874 INFO spawned: 'mariadb' with pid 331
2020-03-25 11:13:08,882 INFO spawned: 'clamav' with pid 332
2020-03-25 11:13:08,894 INFO spawned: 'dovecot' with pid 333
2020-03-25 11:13:08,910 INFO spawned: 'mlmmjadmin' with pid 336
2020-03-25 11:13:08,918 INFO spawned: 'iredapd' with pid 338
2020-03-25 11:13:08,943 INFO spawned: 'amavisd' with pid 340
2020-03-25 11:13:08,954 INFO spawned: 'phpfpm' with pid 341
2020-03-25 11:13:08,986 INFO spawned: 'postfix' with pid 342
2020-03-25 11:13:09,014 INFO spawned: 'nginx' with pid 343
2020-03-25 11:13:09,027 INFO spawned: 'fail2ban' with pid 344
2020-03-25 11:13:09,066 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,078 INFO success: cron entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,080 INFO success: mariadb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,082 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,083 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,083 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,083 INFO success: iredapd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,084 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,089 INFO success: phpfpm entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,090 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,092 INFO success: nginx entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,092 INFO success: fail2ban entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,123 INFO exited: mlmmjadmin (exit status 1; not expected)
2020-03-25 11:13:09,142 INFO spawned: 'mlmmjadmin' with pid 350
2020-03-25 11:13:09,220 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,390 INFO exited: mlmmjadmin (exit status 1; not expected)
2020-03-25 11:13:09,651 INFO spawned: 'mlmmjadmin' with pid 392
2020-03-25 11:13:09,665 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,803 INFO exited: iredapd (exit status 1; not expected)
2020-03-25 11:13:09,819 INFO spawned: 'iredapd' with pid 396
2020-03-25 11:13:09,835 INFO success: iredapd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:09,840 INFO exited: mlmmjadmin (exit status 1; not expected)
2020-03-25 11:13:09,842 INFO spawned: 'mlmmjadmin' with pid 397
2020-03-25 11:13:10,033 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:10,281 INFO exited: mlmmjadmin (exit status 1; not expected)
2020-03-25 11:13:10,284 INFO spawned: 'mlmmjadmin' with pid 429
2020-03-25 11:13:10,297 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:10,413 INFO exited: iredapd (exit status 1; not expected)
2020-03-25 11:13:10,417 INFO spawned: 'iredapd' with pid 440
2020-03-25 11:13:10,424 INFO success: iredapd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:10,432 INFO exited: mlmmjadmin (exit status 1; not expected)
2020-03-25 11:13:10,444 INFO spawned: 'mlmmjadmin' with pid 441
2020-03-25 11:13:10,563 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-25 11:13:10,607 INFO exited: mlmmjadmin (exit status 1; not expected)
2020-03-25 11:13:10,627 INFO spawned: 'mlmmjadmin' with pid 442
2020-03-25 11:13:10,636 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
bash-5.0# cat /var/log/messages 
2020-03-25T11:10:07.796575+00:00 mail : imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
2020-03-25T11:10:07.796587+00:00 mail : activation of module imklog failed [v8.1911.0 try https://www.rsyslog.com/e/2145 ]
2020-03-25T11:10:07.796598+00:00 mail : [origin software="rsyslogd" swVersion="8.1911.0" x-pid="456" x-info="https://www.rsyslog.com"] start
2020-03-25T11:10:07.970658+00:00 mail /supervisord: rsyslog rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
2020-03-25T11:10:07.970795+00:00 mail /supervisord: rsyslog rsyslogd: activation of module imklog failed [v8.1911.0 try https://www.rsyslog.com/e/2145 ]
2020-03-25T11:10:08.067040+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:08.067572+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:08.067987+00:00 mail /supervisord: mlmmjadmin     
2020-03-25T11:10:08.076173+00:00 mail /supervisord: mlmmjadmin import web
2020-03-25T11:10:08.076760+00:00 mail /supervisord: mlmmjadmin ImportError
2020-03-25T11:10:08.078239+00:00 mail /supervisord: mlmmjadmin : No module named web
2020-03-25T11:10:08.165036+00:00 mail /supervisord: mariadb 2020-03-25 11:10:08 0 [Note] /usr/bin/mysqld (mysqld 10.4.12-MariaDB-log) starting as process 458 ...
2020-03-25T11:10:08.173541+00:00 mail /supervisord: mariadb 
2020-03-25T11:10:08.339786+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:08.365514+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:08.366063+00:00 mail /supervisord: mlmmjadmin     
2020-03-25T11:10:08.366366+00:00 mail /supervisord: mlmmjadmin import web
2020-03-25T11:10:08.366699+00:00 mail /supervisord: mlmmjadmin ImportError
2020-03-25T11:10:08.367545+00:00 mail /supervisord: mlmmjadmin : 
2020-03-25T11:10:08.367889+00:00 mail /supervisord: mlmmjadmin No module named web
2020-03-25T11:10:08.368196+00:00 mail /supervisord: mlmmjadmin 
2020-03-25T11:10:08.771189+00:00 mail /supervisord: iredapd Traceback (most recent call last):
2020-03-25T11:10:08.780530+00:00 mail /supervisord: iredapd   File "/opt/iredapd/iredapd.py", line 20, in <module>
2020-03-25T11:10:08.797397+00:00 mail /supervisord: iredapd     from libs import __version__, daemon, utils
2020-03-25T11:10:08.797521+00:00 mail /supervisord: iredapd   File "/opt/iRedAPD-3.5/libs/utils.py", line 16, in <module>
2020-03-25T11:10:08.797551+00:00 mail /supervisord: iredapd     from sqlalchemy import create_engine
2020-03-25T11:10:08.797577+00:00 mail /supervisord: iredapd ImportError: No module named sqlalchemy
2020-03-25T11:10:08.944022+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:08.966118+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:08.973513+00:00 mail /supervisord: mlmmjadmin     import web
2020-03-25T11:10:08.973660+00:00 mail /supervisord: mlmmjadmin ImportError: No module named web
2020-03-25T11:10:09.403499+00:00 mail /supervisord: iredapd Traceback (most recent call last):
2020-03-25T11:10:09.420524+00:00 mail /supervisord: iredapd   File "/opt/iredapd/iredapd.py", line 20, in <module>
2020-03-25T11:10:09.420644+00:00 mail /supervisord: iredapd     from libs import __version__, daemon, utils
2020-03-25T11:10:09.420674+00:00 mail /supervisord: iredapd   File "/opt/iRedAPD-3.5/libs/utils.py", line 16, in <module>
2020-03-25T11:10:09.420701+00:00 mail /supervisord: iredapd     from sqlalchemy import create_engine
2020-03-25T11:10:09.420727+00:00 mail /supervisord: iredapd ImportError: No module named sqlalchemy
2020-03-25T11:10:09.559252+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:09.562582+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:09.583424+00:00 mail /supervisord: mlmmjadmin     import web
2020-03-25T11:10:09.583560+00:00 mail /supervisord: mlmmjadmin ImportError: No module named web
2020-03-25T11:10:09.733560+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:09.736312+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:09.736780+00:00 mail /supervisord: mlmmjadmin     
2020-03-25T11:10:09.737129+00:00 mail /supervisord: mlmmjadmin import web
2020-03-25T11:10:09.737485+00:00 mail /supervisord: mlmmjadmin ImportError
2020-03-25T11:10:09.737821+00:00 mail /supervisord: mlmmjadmin : 
2020-03-25T11:10:09.738153+00:00 mail /supervisord: mlmmjadmin No module named web
2020-03-25T11:10:09.740279+00:00 mail /supervisord: mlmmjadmin 
2020-03-25T11:10:09.763653+00:00 mail /supervisord: fail2ban 2020-03-25 11:10:09,751 fail2ban                [471]: ERROR   Failed during configuration: Have not found any log file for postfix-pregreet jail
2020-03-25T11:10:09.871773+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:09.882981+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:09.883086+00:00 mail /supervisord: mlmmjadmin     import web
2020-03-25T11:10:09.883123+00:00 mail /supervisord: mlmmjadmin ImportError: No module named web
2020-03-25T11:10:10.018520+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:10.020171+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:10.020586+00:00 mail /supervisord: mlmmjadmin     
2020-03-25T11:10:10.020933+00:00 mail /supervisord: mlmmjadmin import web
2020-03-25T11:10:10.021289+00:00 mail /supervisord: mlmmjadmin ImportError
2020-03-25T11:10:10.024183+00:00 mail /supervisord: mlmmjadmin : No module named web
2020-03-25T11:10:10.077123+00:00 mail /supervisord: iredapd Traceback (most recent call last):
2020-03-25T11:10:10.084349+00:00 mail /supervisord: iredapd   File "/opt/iredapd/iredapd.py", line 20, in <module>
2020-03-25T11:10:10.084865+00:00 mail /supervisord: iredapd     
2020-03-25T11:10:10.085267+00:00 mail /supervisord: iredapd from libs import __version__, daemon, utils
2020-03-25T11:10:10.085646+00:00 mail /supervisord: iredapd   File "/opt/iRedAPD-3.5/libs/utils.py", line 16, in <module>
2020-03-25T11:10:10.086044+00:00 mail /supervisord: iredapd     
2020-03-25T11:10:10.086412+00:00 mail /supervisord: iredapd from sqlalchemy import create_engine
2020-03-25T11:10:10.088274+00:00 mail /supervisord: iredapd ImportError: No module named sqlalchemy
2020-03-25T11:10:10.157961+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:10.161639+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:10.168479+00:00 mail /supervisord: mlmmjadmin     import web
2020-03-25T11:10:10.168582+00:00 mail /supervisord: mlmmjadmin ImportError: No module named web
2020-03-25T11:10:10.427535+00:00 mail /supervisord: iredapd Traceback (most recent call last):
2020-03-25T11:10:10.448539+00:00 mail /supervisord: iredapd   File "/opt/iredapd/iredapd.py", line 20, in <module>
2020-03-25T11:10:10.450090+00:00 mail /supervisord: iredapd     
2020-03-25T11:10:10.450432+00:00 mail /supervisord: iredapd from libs import __version__, daemon, utils
2020-03-25T11:10:10.452251+00:00 mail /supervisord: iredapd   File "/opt/iRedAPD-3.5/libs/utils.py", line 16, in <module>
2020-03-25T11:10:10.452307+00:00 mail /supervisord: iredapd     from sqlalchemy import create_engine
2020-03-25T11:10:10.452335+00:00 mail /supervisord: iredapd ImportError: No module named sqlalchemy
2020-03-25T11:10:10.520699+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:10.524289+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:10.529087+00:00 mail /supervisord: mlmmjadmin     import web
2020-03-25T11:10:10.538827+00:00 mail /supervisord: mlmmjadmin ImportError: No module named web
2020-03-25T11:10:10.813306+00:00 mail /supervisord: iredapd Traceback (most recent call last):
2020-03-25T11:10:10.832523+00:00 mail /supervisord: iredapd   File "/opt/iredapd/iredapd.py", line 20, in <module>
2020-03-25T11:10:10.832633+00:00 mail /supervisord: iredapd     from libs import __version__, daemon, utils
2020-03-25T11:10:10.836140+00:00 mail /supervisord: iredapd   File "/opt/iRedAPD-3.5/libs/utils.py", line 16, in <module>
2020-03-25T11:10:10.836261+00:00 mail /supervisord: iredapd     from sqlalchemy import create_engine
2020-03-25T11:10:10.836541+00:00 mail /supervisord: iredapd ImportError: No module named sqlalchemy
2020-03-25T11:10:10.907573+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:10.911567+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>
2020-03-25T11:10:10.919540+00:00 mail /supervisord: mlmmjadmin     import web
2020-03-25T11:10:10.920125+00:00 mail /supervisord: mlmmjadmin ImportError: No module named web
2020-03-25T11:10:11.022892+00:00 mail /supervisord: mlmmjadmin Traceback (most recent call last):
2020-03-25T11:10:11.028350+00:00 mail /supervisord: mlmmjadmin   File "/opt/mlmmjadmin/mlmmjadmin.py", line 8, in <module>

Different syntaxes of default values in docker-compose.yml

Hi.

I found two different syntaxes:

  1. device: ${DOCKER_VOLUME_CUSTOM_CONF_DIR:=/opt/iredmail/custom}, ie :=
  2. device: ${DOCKER_VOLUME_SSL_DIR:-/opt/iredmail/ssl}, ie :-

I could not find that := is valid (just :- is valid). Should I make a PR to change all to :-?

File Access Error & Access denied for user 'vmail'@'localhost'

I have one iredmail container running. After setup everything works fine. I can send and receive mails as expected.

The strangsch thing is, after a couple of hours (ca. one Day) there are errors. The container is still up and the webmail is still accessible. But the mail send and receive function won't work.

Steps to repruduce

Start container and wait for the problem... I don't no whats is wrong :/


In the atached files i've replaced my domain with example.ch

Docker-Compose file

version: '2.2'

services:
iredmail:
image: iredmail/mariadb:nightly
restart: always
container_name: takatuka-iredmail
environment:
HOSTNAME: mail.example.ch
VIRTUAL_PROTO: https
VIRTUAL_PORT: 443
VIRTUAL_HOST: "mail.example.ch"
LETSENCRYPT_HOST: "mail.example.ch"
FIRST_MAIL_DOMAIN: example.ch
FIRST_MAIL_DOMAIN_ADMIN_PASSWORD: example
MLMMJADMIN_API_TOKEN: "sdgdfgeqrthna2421415q+349f1+$151"
ROUNDCUBE_DES_KEY: "sdgdfgeqrthna2421415q+349f1+$151"
volumes:
- /volumes/iredmail/backup:/var/vmail/backup
- /volumes/iredmail/mailboxes:/var/vmail/vmail1
- /volumes/iredmail/mlmmj:/var/vmail/mlmmj
- /volumes/iredmail/mlmmj.archive:/var/vmail/mlmmj.archive
- /volumes/iredmail/imapsieve_copy:/var/vmail/imapsieve_copy
- /volumes/iredmail/custom:/opt/iredmail/custom
- /volumes/iredmail/ssl:/opt/iredmail/ssl
- /volumes/iredmail/mysql:/var/lib/mysql
- /volumes/iredmail/clamav:/var/lib/clamav
- /volumes/iredmail/sa_rules:/var/lib/spamassassin
- /volumes/iredmail/postfix_queue:/var/spool/postfix
expose:
- 443
ports:
- "110:110"
- "995:995"
- "143:143"
- "993:993"
- "25:25"
- "465:465"
- "587:587"

Mail.log (from the container)

2020-10-02T14:26:53.165439+00:00 f3045c710026 postfix/anvil[1496]: statistics: max connection rate 1/60s for (smtpd:18.205.72.90) at Oct 2 14:23:31
2020-10-02T14:26:53.165462+00:00 f3045c710026 postfix/anvil[1496]: statistics: max connection count 1 for (smtpd:18.205.72.90) at Oct 2 14:23:31
2020-10-02T14:26:53.165477+00:00 f3045c710026 postfix/anvil[1496]: statistics: max cache size 1 at Oct 2 14:23:31
2020-10-02T14:30:48.932824+00:00 f3045c710026 postfix/postscreen[1578]: CONNECT from [141.98.10.192]:55723 to [172.16.0.7]:25
2020-10-02T14:30:48.974200+00:00 f3045c710026 postfix/postscreen[1578]: PREGREET 11 after 0.04 from [141.98.10.192]:55723: EHLO User\r\n
2020-10-02T14:30:48.974350+00:00 f3045c710026 postfix/postscreen[1578]: DISCONNECT [141.98.10.192]:55723
2020-10-02T14:41:32.995590+00:00 f3045c710026 postfix/postfix-script[905]: warning: not owned by root: /var/spool/postfix/etc
2020-10-02T14:41:32.997391+00:00 f3045c710026 postfix/postfix-script[906]: warning: not owned by root: /var/spool/postfix/etc/hosts
2020-10-02T14:41:32.998786+00:00 f3045c710026 postfix/postfix-script[907]: warning: not owned by root: /var/spool/postfix/etc/resolv.conf
2020-10-02T14:41:33.060703+00:00 f3045c710026 postfix/postfix-script[913]: starting the Postfix mail system
2020-10-02T14:41:33.304893+00:00 f3045c710026 postfix/master[914]: daemon started -- version 3.4.12, configuration /etc/postfix
2020-10-02T14:41:33.374588+00:00 f3045c710026 postfix/pickup[921]: 4C2t3d2fT4z2ZbZg: uid=0 from=
2020-10-02T14:41:33.398790+00:00 f3045c710026 postfix/proxymap[923]: warning: connect to mysql server 127.0.0.1:3306: Access denied for user 'vmail'@'localhost' (using password: YES)
2020-10-02T14:41:33.399000+00:00 f3045c710026 postfix/trivial-rewrite[926]: warning: proxy:mysql:/etc/postfix/mysql/transport_maps_maillist.cf lookup error for ""
2020-10-02T14:41:33.399216+00:00 f3045c710026 postfix/trivial-rewrite[926]: warning: proxy:mysql:/etc/postfix/mysql/transport_maps_maillist.cf lookup error for "
"
2020-10-02T14:41:33.399520+00:00 f3045c710026 postfix/cleanup[924]: warning: connect to TCP map 127.0.0.1:7778: Connection refused
2020-10-02T14:41:34.220744+00:00 f3045c710026 amavis[775]: starting. /usr/sbin/amavisd at mail.example.ch amavisd-new-2.12.0 (20190725), Unicode aware
2020-10-02T14:41:34.220967+00:00 f3045c710026 amavis[775]: perl=5.030003, user=amavis, EUID: 100 (100); group=amavis, EGID: 101 101 (101 101)
2020-10-02T14:41:34.399880+00:00 f3045c710026 postfix/cleanup[924]: warning: connect to TCP map 127.0.0.1:7778: Connection refused
2020-10-02T14:41:35.249900+00:00 f3045c710026 amavis[775]: Net::Server: Group Not Defined. Defaulting to EGID '101 101'
2020-10-02T14:41:35.249958+00:00 f3045c710026 amavis[775]: Net::Server: User Not Defined. Defaulting to EUID '100'
2020-10-02T14:41:35.268018+00:00 f3045c710026 amavis[775]: No ext program for .F, tried: unfreeze, freeze -d, melt, fcat
2020-10-02T14:41:35.268653+00:00 f3045c710026 amavis[775]: No ext program for .rpm, tried: rpm2cpio.pl, rpm2cpio
2020-10-02T14:41:35.268853+00:00 f3045c710026 amavis[775]: No ext program for .deb, tried: ar
2020-10-02T14:41:35.269065+00:00 f3045c710026 amavis[775]: No ext program for .arc, tried: nomarch, arc
2020-10-02T14:41:35.269169+00:00 f3045c710026 amavis[775]: No ext program for .zoo, tried: zoo, unzoo
2020-10-02T14:41:35.269233+00:00 f3045c710026 amavis[775]: No ext program for .cab, tried: cabextract
2020-10-02T14:41:35.269565+00:00 f3045c710026 amavis[775]: No decoder for .F
2020-10-02T14:41:35.269586+00:00 f3045c710026 amavis[775]: No decoder for .arc
2020-10-02T14:41:35.269599+00:00 f3045c710026 amavis[775]: No decoder for .zoo
2020-10-02T14:41:35.269630+00:00 f3045c710026 amavis[775]: Using primary internal av scanner code for clamav-socket
2020-10-02T14:41:35.401261+00:00 f3045c710026 postfix/proxymap[923]: warning: connect to mysql server 127.0.0.1:3306: Access denied for user 'vmail'@'localhost' (using password: YES)
2020-10-02T14:41:35.401421+00:00 f3045c710026 postfix/cleanup[924]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "[email protected]"
2020-10-02T14:41:35.401434+00:00 f3045c710026 postfix/cleanup[924]: warning: 4C2t3d2fT4z2ZbZg: sender_bcc_maps map lookup problem -- message not accepted, try again later
2020-10-02T14:41:35.401616+00:00 f3045c710026 postfix/pickup[921]: warning: maildrop/4C2t3W31j3z7tPDf: error writing 4C2t3d2fT4z2ZbZg: queue file write error
2020-10-02T14:41:48.867209+00:00 f3045c710026 postfix/postscreen[950]: CONNECT from [52.55.244.91]:35426 to [172.16.0.5]:25
2020-10-02T14:41:48.993201+00:00 f3045c710026 postfix/postscreen[950]: PASS OLD [52.55.244.91]:35426
2020-10-02T14:41:49.107682+00:00 f3045c710026 postfix/smtpd[953]: connect from keeper-us-east-1b.mxtoolbox.com[52.55.244.91]
2020-10-02T14:41:49.632594+00:00 f3045c710026 postfix/proxymap[925]: warning: connect to mysql server 127.0.0.1:3306: Access denied for user 'vmail'@'localhost' (using password: YES)

How about to keep all settings in one file?

Currently there is a default_settings.conf.

I propose to rename it to simply settings.conf, move this part to the top

# [REQUIRED] Server hostname and first mail domain
HOSTNAME=
FIRST_MAIL_DOMAIN=
FIRST_MAIL_DOMAIN_ADMIN_PASSWORD=

# SQL user passwords.
VMAIL_DB_PASSWORD=
VMAIL_DB_ADMIN_PASSWORD=
AMAVISD_DB_PASSWORD=
ROUNDCUBE_DB_PASSWORD=
ROUNDCUBE_DES_KEY=

so users may immediately see them
and remove iredmail.conf, so the deployment is a bit easier.

I can prepare PR.

./backup_mysql.sh in Alpine requires `coreutils`

Without coreutils:

/var/vmail/backup

bash-5.0# ./backup_mysql.sh 
[...]
++ date '--date=90 days ago' +%Y
date: invalid date '90 days ago'
+ shift_year=
++ date '--date=90 days ago' +%m
date: invalid date '90 days ago'
+ shift_month=
++ date '--date=90 days ago' +%d
date: invalid date '90 days ago'
+ shift_day=
+ export REMOVED_BACKUP_DIR=/var/vmail/backup/mysql///
+ REMOVED_BACKUP_DIR=/var/vmail/backup/mysql///
+ export REMOVED_BACKUP_MONTH_DIR=/var/vmail/backup/mysql//
+ REMOVED_BACKUP_MONTH_DIR=/var/vmail/backup/mysql//
+ export REMOVED_BACKUP_YEAR_DIR=/var/vmail/backup/mysql/
+ REMOVED_BACKUP_YEAR_DIR=/var/vmail/backup/mysql/
+ export LOGFILE=/var/vmail/backup/mysql/2020/12/19/2020-12-19-21-27-11.log
+ LOGFILE=/var/vmail/backup/mysql/2020/12/19/2020-12-19-21-27-11.log
[...]
==> Backup completed successfully.
+ '[' XYES == XYES -a -d /var/vmail/backup/mysql/// ']'
+ echo -e '* Old backup found. Deleting: /var/vmail/backup/mysql///.'
+ rm -rf /var/vmail/backup/mysql///
+ rmdir /var/vmail/backup/mysql//
+ rmdir /var/vmail/backup/mysql/
+ sql_log_msg='INSERT INTO log (event, loglevel, msg, admin, ip, timestamp) VALUES ('\''backup'\'', '\''info'\'', '\''Remove old backup: /var/vmail/backup/mysql///.'\'', '\''cron_backup_sql'\'', '\''127.0.0.1'\'', UTC_TIMESTAMP());'
+ mysql --defaults-file=/root/.my.cnf -uroot iredadmin -e 'INSERT INTO log (event, loglevel, msg, admin, ip, timestamp) VALUES ('\''backup'\'', '\''info'\'', '\''Remove old backup: /var/vmail/backup/mysql///.'\'', '\''cron_backup_sql'\'', '\''127.0.0.1'\'', UTC_TIMESTAMP());'
+ echo '==> Detailed log (/var/vmail/backup/mysql/2020/12/19/2020-12-19-21-27-11.log):'
==> Detailed log (/var/vmail/backup/mysql/2020/12/19/2020-12-19-21-27-11.log):
+ echo =========================
=========================
+ cat /var/vmail/backup/mysql/2020/12/19/2020-12-19-21-27-11.log
cat: can't open '/var/vmail/backup/mysql/2020/12/19/2020-12-19-21-27-11.log': No such file or directory

Added:

# apk add coreutils
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/3) Installing libacl (2.2.53-r0)
(2/3) Installing libattr (2.4.48-r0)
(3/3) Installing coreutils (8.32-r0)
Executing busybox-1.31.1-r19.trigger
OK: 430 MiB in 267 packages
bash-5.0# date --date='90 day ago' +%y%m%d
200920

With coreutils:

[...]
+ cat /var/vmail/backup/mysql/2020/12/19/2020-12-19-21-37-07.log
* Starting backup: 2020-12-19-21-37-07.
* Backup directory: /var/vmail/backup/mysql/2020/12/19.
* Backing up databases: mysql vmail amavisd iredapd iredadmin roundcubemail sogo sa_bayes.
* File size:
----
12K	amavisd-2020-12-19-21-37-07.sql.bz2
4.0K	iredadmin-2020-12-19-21-37-07.sql.bz2
4.0K	iredapd-2020-12-19-21-37-07.sql.bz2
276K	mysql-2020-12-19-21-37-07.sql.bz2
8.0K	roundcubemail-2020-12-19-21-37-07.sql.bz2
8.0K	sa_bayes-2020-12-19-21-37-07.sql.bz2
4.0K	vmail-2020-12-19-21-37-07.sql.bz2
----
* Backup completed (Success? YES).

Container crashes with a mysqld bus error at startup

This is my startup command:
docker run --rm --name iredmail --hostname mail.hoftijzer.tk -p 80:80 -p 433:433 -p 110:110 -p 995:995 -p 143:143 -p 993:993 -p 25:25 -p 465:465 -p 587:587 -v /home/pi/data/backup:/var/vmail/backup -v /home/pi/data/mailboxes:/var/vmail/vmail1 -v /home/pi/data/mlmmj:/var/vmail/mlmmj -v /home/pi/data/mlmmj-archive:/var/vmail/mlmmj-archive -v /home/pi/data/imapsieve_copy:/var/vmail/imapsieve_copy -v /home/pi/data/costum:/opt/iredmail/costum -v /home/pi/data/ssl:/opt/iredmail/ssl -v /home/pi/data/mysql:/var/lib/mysql -v /home/pi/data/clamav:/var/lib/clamav -v /home/pi/data/sa_rules:/var/lib/spamassassin -v /home/pi/data/postfix_queue:/var/spool/postfix --env-file iredmail-docker.conf iredmail/mariadb:nightly

I followed the instructions exactly just modified some paths

This is the error output:
[iRedMail] [Entrypoint] /docker/entrypoints/mariadb.sh [iRedMail] Create directory used to store custom config files: /opt/iredmail/custom/mysql. [iRedMail] Starting temporary MariaDB instance. 2020-06-25 15:41:04 0 [Note] /usr/bin/mysqld (mysqld 10.4.13-MariaDB-log) starting as process 433 ... /docker/entrypoints/mariadb.sh: line 65: 433 Bus error mysqld ${cmd_mysqld_opts} [iRedMail] Initialization failed. Please check /var/lib/mysql/mysqld.err for more details.

Any help?

Could you add me in docker hub?

It looks like I found one issue, but to be sure want double-check it via docker hub. Could you please add bearukraine to your repository?

Thanks.

On container reboot mysql failing to login

After rebooting the container i`m getting the below error. Checked all scripts and unable to find any settings which have these passwords saved. Also, if its randomly generated then not passed properly before authentication is occurring.

ERROR: SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES),
ERROR: Failed to connect to database,

OpenLDAP

Will there be implementation with OpenLDAP?

Use own maria db

Hello,

I saw that this package comes with everything which is great but if I have my own maria db which I want to be used by this product înstead maintaining 2 dbs is there some settings to make ?

Also you advise us not to use it in production ( yet ). When we will be able to use it as production grade ?
Many thanks in advance

LDAP Backend

Hello,

Do someone already set this dockerized version with LDAP backend?

Setting POSTMASTER_EMAIL not fully implemented

The optional setting POSTMASTER_EMAIL not always used.
In some places (e.g. for creating the first user) the postmaster email address is hardcoded as "postmaster@${FIRST_MAIL_DOMAIN}".
Is this intended? For me it would make more sense to always use the POSTMASTER_EMAIL setting, when it is set.

clamav (exit status 1; not expected)

Hi, i'm trying to deploy the iredmail docker container as described in the docs but it crashes when trying to deploy ClamAV with the following errors

INFO spawned: 'clamav' with pid 13565
INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
INFO exited: clamav (exit status 1; not expected)

Need help: How to maintain default settings with Docker Hub?

Dear all,

I need some help here.

Currently we use GitHub repo to manage all files used to build docker image, so it's easy to store many files, especially two config files:

  • default_settings.conf
  • iredmail.conf

We store MANY parameters with their default values in default_settings.conf, like paths to mailboxes, ssl cert/key files, clamav database, also parameters used to enable or disable some features:

#
# Enable/disable components
#
USE_IREDAPD=YES
USE_ANTISPAM=YES
USE_ROUNDCUBE=YES
USE_FAIL2BAN=YES

#
# Enable/disable features
#
FAIL2BAN_STORE_BANNED_IP_IN_DB=YES
POSTFIX_ENABLE_SRS=YES

Currently default_settings.conf is maintained by iRedMail Team, and iredmail.conf should be maintained by user to override settings defined in default_settings.conf.

If we offer docker image via the Docker Hub, user gets only one image, no default_settings.conf.
It's not good to store all parameters in iredmail.conf and ask users to add new ones or remove deprecated ones if there's some update, and user may make mistakes (quite often).

So the question is: is there any easy way we can maintain the default settings, and let users just maintain customized ones?

Disable: Redirect all insecure http:// requests to https://

I would like to disable the re-direct on port 80 so I can use it unencrypted. I already have SSL configured in a reverse proxy pointed to this container. Is there something I can do in data/custom/nginx/sites-enabled that might make this work, perhaps I need to setup an additional port? What do you recommend?

# Redirect all insecure http:// requests to https://
return 301 https://$host$request_uri;

MariaDB and passwords

Take this ticket as a technical challenge than anything else.. However, looking into your preconfigured configuration files I think this needs to be addressed now.

What is our challenge with secrets:

  • There should be NO hard-coded secret
  • iRedMail uses quite a lot of MySQL accounts for several services
  • Secret of technical accounts should be random
  • Containers should be startable without sophisticated techniques such as docker-compose.

Secret handling proposal:

  • Every container read env variables in the first place
  • If an env variable is not specified then /secrets/VARNAME should provide the secret value
  • VARNAME files are generated by mariadb container

Sources

Is it better replace SOGo by NextCloud?

Dear all,

I was working on a SOGo docker image, but upstream doesn't offer binary packages for Alpine, and Alpine community doesn't build sogo either, so i have to use a Ubuntu:18.04 base image.

While trying, i thought maybe we can replace SOGo by NextCloud (NC) (just for docker right now, not the classic iRedMail installer), since NC offers almost same features.

iRedMail ships SOGo for years, it works fine. The main purpose of such integration is:

  • one web UI with webmail, calendar, contacts
  • ActiveSync support

it has disadvantages too:

  • Memory hungry
  • Cannot easily handle large concurrent clients

Compare to SOGo, NC offers almost same features, has more active development, larger community.

Comments?

Creating iredmail_mariadb ... error

When I build the container, at create volumes, someting wrong went happen, like it

Creating iredmail_mariadb  ... error
Creating iredmail_antispam ... 

ERROR: for iredmail_mariadb  Cannot create container for service iredmail_mariadb: failed to mount local volume: mount :/opt/iredmail/mysql:/var/lib/docker/volumes/dockerized_vol_iredmail_mysql_data_dir/_data, flags: 0x1Creating iredmail_antispam ... error

ERROR: for iredmail_antispam  Cannot create container for service iredmail_antispam: failed to mount local volume: mount :/opt/iredmail/sa_rules:/var/lib/docker/volumes/dockerized_vol_iredmail_spamassassin_rules_dir/_data, flags: 0x1000: no such file or directory

ERROR: for iredmail_mariadb  Cannot create container for service iredmail_mariadb: failed to mount local volume: mount :/opt/iredmail/mysql:/var/lib/docker/volumes/dockerized_vol_iredmail_mysql_data_dir/_data, flags: 0x1000: no such file or directory

ERROR: for iredmail_antispam  Cannot create container for service iredmail_antispam: failed to mount local volume: mount :/opt/iredmail/sa_rules:/var/lib/docker/volumes/dockerized_vol_iredmail_spamassassin_rules_dir/_data, flags: 0x1000: no such file or directory
ERROR: Encountered errors while bringing up the project.

No such file or directory + amavisd and clamav exit

Ubuntu 18.04 LTS x64.
Docker version 19.03.6, build 369ce74a3c

I double checked using fresh OS installation - no changes.

root@mail:/var/mail/sources# ./run_all_in_one.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/mariadb.sh 
[iRedMail] Starting temporary MariaDB instance.
2020-03-23 14:43:55 0 [Note] mysqld (mysqld 10.4.12-MariaDB-log) starting as process 11 ...
[iRedMail] Reset password for SQL user 'root'.
[iRedMail] [Run] /docker/mariadb/pre_start/0-vmail_db.sh
[iRedMail] Grant privileges to SQL user 'vmail' and 'vmailadmin'.
[iRedMail] Make sure [email protected] is a global admin.
[iRedMail] [Run] /docker/mariadb/pre_start/amavisd_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/iredapd_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/roundcube.sh
[iRedMail] [Entrypoint] /docker/entrypoints/dovecot.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/postfix.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmj.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmjadmin.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/iredapd.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/antispam.sh 
[iRedMail] Run 'sa-update' (required by Amavisd).
Update finished, no fresh updates were available
[iRedMail] Run 'freshclam' (required by ClamAV).
ClamAV update process started at Mon Mar 23 14:43:59 2020
Current working dir is /var/lib/clamav/
Querying current.cvd.clamav.net
TTL: 299
fc_dns_query_update_info: Software version from DNS: 0.102.2
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.102.1 Recommended version: 0.102.2
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Current working dir is /var/lib/clamav/
check_for_new_database_version: No local copy of "daily" database.
query_remote_database_version: daily.cvd version from DNS: 25760
daily database available for download (remote version: 25760)
Retrieving https://database.clamav.net/daily.cvd
downloadFile: Download source:      https://database.clamav.net/daily.cvd
downloadFile: Download destination: /var/lib/clamav/tmp/clamav-1f00be21a04748a18fb20fb622ee5969.tmp
*   Trying 104.16.219.84:443...
* TCP_NODELAY set
* Connected to database.clamav.net (104.16.219.84) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=ssl392509.cloudflaressl.com
*  start date: Feb  1 00:00:00 2020 GMT
*  expire date: Aug  9 23:59:59 2020 GMT
*  subjectAltName: host "database.clamav.net" matched cert's "*.clamav.net"
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO ECC Domain Validation Secure Server CA 2
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x557ee6ab9780)
> GET /daily.cvd HTTP/2
Host: database.clamav.net
user-agent: ClamAV/0.102.1 (OS: linux-musl, ARCH: x86_64, CPU: x86_64)
accept: */*
connection: close

WARNING: Mirror https://database.clamav.net is not synchronized.
ERROR: Unexpected error when attempting to update database: daily
WARNING: fc_update_databases: fc_update_database failed: Up-to-date (1)
ERROR: Database update process failed: Up-to-date (1)
ERROR: Update failed.
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200 
< date: Mon, 23 Mar 2020 14:43:59 GMT
< content-type: application/octet-stream
< content-length: 60308138
< set-cookie: __cfduid=d2964de57f082e1b5b85ecc06e46abe671584974639; expires=Wed, 22-Apr-20 14:43:59 GMT; path=/; domain=.clamav.net; HttpOnly; SameSite=Lax
< last-modified: Sun, 22 Mar 2020 13:14:00 GMT
< etag: "5e776498-3983aaa"
< expires: Mon, 23 Mar 2020 18:43:59 GMT
< cache-control: public, max-age=14400
< cf-cache-status: HIT
< age: 5804
< accept-ranges: bytes
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< strict-transport-security: max-age=15552000
< x-content-type-options: nosniff
< server: cloudflare
< cf-ray: 5788ed873b1796b6-FRA
< 
* Connection #0 to host database.clamav.net left intact
[iRedMail] [Entrypoint] /docker/entrypoints/nginx.sh 
ln: /etc/nginx/sites-enabled/00-default.conf: No such file or directory
ln: /etc/nginx/sites-enabled/00-default-ssl.conf: No such file or directory
ln: /etc/nginx/sites-enabled/autoconfig.conf: No such file or directory
ln: /etc/nginx/conf-enabled/0-general.conf: No such file or directory
ln: /etc/nginx/conf-enabled/cache.conf: No such file or directory
ln: /etc/nginx/conf-enabled/client_max_body_size.conf: No such file or directory
ln: /etc/nginx/conf-enabled/default_type.conf: No such file or directory
ln: /etc/nginx/conf-enabled/fastcgi.conf: No such file or directory
ln: /etc/nginx/conf-enabled/gzip.conf: No such file or directory
ln: /etc/nginx/conf-enabled/headers.conf: No such file or directory
ln: /etc/nginx/conf-enabled/iredadmin.conf: No such file or directory
ln: /etc/nginx/conf-enabled/log.conf: No such file or directory
ln: /etc/nginx/conf-enabled/mime_types.conf: No such file or directory
ln: /etc/nginx/conf-enabled/open_file_cache.conf: No such file or directory
ln: /etc/nginx/conf-enabled/php_fpm.conf: No such file or directory
ln: /etc/nginx/conf-enabled/reset_timedout_connection.conf: No such file or directory
ln: /etc/nginx/conf-enabled/sendfile.conf: No such file or directory
ln: /etc/nginx/conf-enabled/server_tokens.conf: No such file or directory
ln: /etc/nginx/conf-enabled/types_hash_max_size.conf: No such file or directory
[iRedMail] [Entrypoint] /docker/entrypoints/phpfpm.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/roundcube.sh 
[iRedMail] CMD: /usr/bin/supervisord -c /etc/supervisord.conf
2020-03-23 14:44:01,885 INFO Included extra file "/etc/supervisor.d/amavisd.conf" during parsing
2020-03-23 14:44:01,886 INFO Included extra file "/etc/supervisor.d/clamav.conf" during parsing
2020-03-23 14:44:01,886 INFO Included extra file "/etc/supervisor.d/cron.conf" during parsing
2020-03-23 14:44:01,886 INFO Included extra file "/etc/supervisor.d/dovecot.conf" during parsing
2020-03-23 14:44:01,887 INFO Included extra file "/etc/supervisor.d/iredapd.conf" during parsing
2020-03-23 14:44:01,887 INFO Included extra file "/etc/supervisor.d/mariadb.conf" during parsing
2020-03-23 14:44:01,887 INFO Included extra file "/etc/supervisor.d/mlmmjadmin.conf" during parsing
2020-03-23 14:44:01,887 INFO Included extra file "/etc/supervisor.d/nginx.conf" during parsing
2020-03-23 14:44:01,887 INFO Included extra file "/etc/supervisor.d/phpfpm.conf" during parsing
2020-03-23 14:44:01,888 INFO Included extra file "/etc/supervisor.d/postfix.conf" during parsing
2020-03-23 14:44:01,888 INFO Included extra file "/etc/supervisor.d/rsyslog.conf" during parsing
2020-03-23 14:44:01,888 INFO Set uid to user 0 succeeded
2020-03-23 14:44:01,896 INFO RPC interface 'supervisor' initialized
2020-03-23 14:44:01,896 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-03-23 14:44:01,897 INFO supervisord started with pid 1
2020-03-23 14:44:02,902 INFO spawned: 'cron' with pid 310
2020-03-23 14:44:02,908 INFO spawned: 'rsyslog' with pid 311
2020-03-23 14:44:02,924 INFO spawned: 'mariadb' with pid 312
2020-03-23 14:44:02,935 INFO spawned: 'dovecot' with pid 313
2020-03-23 14:44:02,940 INFO spawned: 'mlmmjadmin' with pid 314
2020-03-23 14:44:02,956 INFO spawned: 'iredapd' with pid 317
2020-03-23 14:44:02,967 INFO spawned: 'clamav' with pid 320
2020-03-23 14:44:02,984 INFO spawned: 'amavisd' with pid 321
2020-03-23 14:44:03,004 INFO spawned: 'phpfpm' with pid 322
2020-03-23 14:44:03,024 INFO spawned: 'nginx' with pid 323
2020-03-23 14:44:03,070 INFO spawned: 'postfix' with pid 324
2020-03-23 14:44:03,082 INFO success: cron entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,090 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,094 INFO success: mariadb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,094 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,095 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,095 INFO success: iredapd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,098 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,102 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,102 INFO success: phpfpm entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,102 INFO success: nginx entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,103 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,103 INFO exited: clamav (exit status 1; not expected)
2020-03-23 14:44:03,108 INFO spawned: 'clamav' with pid 325
2020-03-23 14:44:03,144 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:03,340 INFO exited: clamav (exit status 1; not expected)
2020-03-23 14:44:03,422 INFO spawned: 'clamav' with pid 341
2020-03-23 14:44:03,502 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:04,535 INFO exited: clamav (exit status 1; not expected)
2020-03-23 14:44:04,881 INFO spawned: 'clamav' with pid 466
2020-03-23 14:44:04,898 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:04,900 INFO exited: amavisd (exit status 2; not expected)
2020-03-23 14:44:04,911 INFO spawned: 'amavisd' with pid 467
2020-03-23 14:44:04,914 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:04,915 INFO exited: clamav (exit status 1; not expected)
2020-03-23 14:44:04,922 INFO spawned: 'clamav' with pid 468
2020-03-23 14:44:04,934 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:05,329 INFO exited: clamav (exit status 1; not expected)
2020-03-23 14:44:05,339 INFO spawned: 'clamav' with pid 469
2020-03-23 14:44:05,341 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:05,341 INFO exited: amavisd (exit status 2; not expected)
2020-03-23 14:44:05,352 INFO spawned: 'amavisd' with pid 470
2020-03-23 14:44:05,366 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:05,789 INFO exited: clamav (exit status 1; not expected)
2020-03-23 14:44:05,798 INFO spawned: 'clamav' with pid 471
2020-03-23 14:44:05,800 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:05,800 INFO exited: amavisd (exit status 2; not expected)
2020-03-23 14:44:05,810 INFO spawned: 'amavisd' with pid 472
2020-03-23 14:44:05,826 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:06,179 INFO exited: clamav (exit status 1; not expected)
2020-03-23 14:44:06,188 INFO spawned: 'clamav' with pid 473
2020-03-23 14:44:06,190 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:06,190 INFO exited: amavisd (exit status 2; not expected)
2020-03-23 14:44:06,200 INFO spawned: 'amavisd' with pid 474
2020-03-23 14:44:06,216 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:06,595 INFO exited: clamav (exit status 1; not expected)
2020-03-23 14:44:06,604 INFO spawned: 'clamav' with pid 475
2020-03-23 14:44:06,606 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:06,606 INFO exited: amavisd (exit status 2; not expected)
2020-03-23 14:44:06,616 INFO spawned: 'amavisd' with pid 476
2020-03-23 14:44:06,629 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
^C2020-03-23 14:44:07,003 INFO exited: clamav (exit status 1; not expected)
2020-03-23 14:44:07,011 INFO spawned: 'clamav' with pid 477
2020-03-23 14:44:07,012 WARN received SIGINT indicating exit request
2020-03-23 14:44:07,013 INFO waiting for cron, rsyslog, mariadb, dovecot, mlmmjadmin, iredapd, clamav, amavisd, phpfpm, nginx, postfix to die
2020-03-23 14:44:07,014 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-23 14:44:07,015 INFO stopped: postfix (terminated by SIGTERM)
2020-03-23 14:44:07,015 INFO exited: amavisd (exit status 2; not expected)

How to save SMTP-sent emails to "Sent" folder and persist rule? (dovecot/sieve)

Many users are asking on the web how to save sent emails automatically to a "Sent" folder. This seems usually be done by the mail client with access to the mailbox via IMAP/POP3. But how can this be done if emails are sent via plain SMTP only?

My Internet research came up with many different options, none spelled out completely. It seems postfix is not the right point for action, but rather dovecot/sieve? Will an email go through dovecot/sieve if it is sent from an iRedMail user via SMTP to an external party?

When I want to create a custom dovecot/sieve script for all users, what is the best way to persist it over container rebuilds? With another volume for a dedicated path or file?

I would try a script along those lines, I just need to find a variable that contains the current mailbox email address:

require "fileinto";
if address :is "from" "[email protected]"  {
        fileinto "Sent";
}

Thanks
bluepuma

execvp /usr/bin/mlmmj-amime-receive: No such file or directory

I get this error when trying to email a mailing list I created with maillist_admin.py

2020-11-20T23:54:48.086404+00:00 mail postfix/amavis/smtp[22917]: 4CdD1M5l4Nz1R09: to=<dl-veeam@(domain)>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.29, delays=0.05/0/0/0.24, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 4CdD1N0Jz4z1R0D)
2020-11-20T23:54:48.088523+00:00 mail postfix/pipe[22974]: fatal: pipe_command: execvp /usr/bin/mlmmj-amime-receive: No such file or directory
2020-11-20T23:54:48.099569+00:00 mail postfix/qmgr[1165]: 4CdD1M5l4Nz1R09: removed
2020-11-20T23:54:48.105731+00:00 mail postfix/pipe[22973]: 4CdD1N0Jz4z1R0D: to=<dl-veeam@(domain)>, relay=mlmmj, delay=0.06, delays=0.03/0.01/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/bin/mlmmj-amime-receive: No such file or directory )

These are the contents of /usr/bin/mlm*

/usr/bin/mlmmj-list
/usr/bin/mlmmj-maintd
/usr/bin/mlmmj-make-ml
/usr/bin/mlmmj-make-ml.sh -> mlmmj-make-ml
/usr/bin/mlmmj-process
/usr/bin/mlmmj-receive
/usr/bin/mlmmj-recieve -> mlmmj-receive
/usr/bin/mlmmj-send
/usr/bin/mlmmj-sub
/usr/bin/mlmmj-unsub

I am using the iredmail/mariadb:stable image

After rebooting host, some services in container can't start.

I use restart: always in my docker-compose file, then it will start the container when the host is up. But after I reboot, the container does not work correctly: some services cannot start.

A sample log:

iredmail_1  | 2021-02-01 00:29:45,088 INFO spawned: 'amavisd' with pid 3827
iredmail_1  | 2021-02-01 00:29:45,088 INFO exited: dovecot (exit status 89; not expected)
iredmail_1  | 2021-02-01 00:29:45,090 INFO spawned: 'dovecot' with pid 3828
iredmail_1  | 2021-02-01 00:29:45,090 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
iredmail_1  | 2021-02-01 00:29:45,122 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
iredmail_1  | 2021-02-01 00:29:45,122 INFO exited: dovecot (exit status 89; not expected)
iredmail_1  | 2021-02-01 00:29:45,124 INFO spawned: 'dovecot' with pid 3830
iredmail_1  | 2021-02-01 00:29:45,155 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
iredmail_1  | 2021-02-01 00:29:45,155 INFO exited: dovecot (exit status 89; not expected)
iredmail_1  | 2021-02-01 00:29:45,157 INFO spawned: 'dovecot' with pid 3832
iredmail_1  | 2021-02-01 00:29:45,195 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
iredmail_1  | 2021-02-01 00:29:45,195 INFO exited: dovecot (exit status 89; not expected)
iredmail_1  | 2021-02-01 00:29:45,197 INFO spawned: 'dovecot' with pid 3834
iredmail_1  | 2021-02-01 00:29:45,228 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
iredmail_1  | 2021-02-01 00:29:45,228 INFO exited: dovecot (exit status 89; not expected)
iredmail_1  | 2021-02-01 00:29:45,230 INFO spawned: 'dovecot' with pid 3836
...
iredmail_1  | 2021-02-01 00:30:28,594 INFO exited: amavisd (exit status 1; not expected)
iredmail_1  | 2021-02-01 00:30:29,597 INFO spawned: 'amavisd' with pid 920
iredmail_1  | 2021-02-01 00:30:30,291 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
iredmail_1  | 2021-02-01 00:30:30,291 INFO exited: amavisd (exit status 1; not expected)
iredmail_1  | 2021-02-01 00:30:31,293 INFO spawned: 'amavisd' with pid 923
iredmail_1  | 2021-02-01 00:30:32,000 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
iredmail_1  | 2021-02-01 00:30:32,000 INFO exited: amavisd (exit status 1; not expected)
iredmail_1  | 2021-02-01 00:30:33,006 INFO spawned: 'amavisd' with pid 926
iredmail_1  | 2021-02-01 00:30:33,706 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
iredmail_1  | 2021-02-01 00:30:33,706 INFO exited: amavisd (exit status 1; not expected)
iredmail_1  | 2021-02-01 00:30:34,710 INFO spawned: 'amavisd' with pid 929
iredmail_1  | 2021-02-01 00:30:35,410 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
iredmail_1  | 2021-02-01 00:30:35,410 INFO exited: amavisd (exit status 1; not expected)

I've searched on the net, and found a similar issue: docker-mailserver/docker-mailserver#686

It tells that these services fail to start because of leftover pid files, and I checked the dovecot log and matched that issue:

2021-02-01T00:29:45.444170+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.477268+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.509982+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.542681+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.576774+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.609782+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.643358+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.676763+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.710193+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.743056+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)
2021-02-01T00:29:45.775409+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 694 (read from /var/run/dovecot/master.pid)

So I think that some cleaning parts for pid files should be added to entrypoint?

spawnerr: can't find command '/usr/bin/uwsgi'

iredmail-docker.conf

HOSTNAME=mail.el-gojo.com
FIRST_MAIL_DOMAIN=el-gojo.com
FIRST_MAIL_DOMAIN_ADMIN_PASSWORD=password
MLMMJADMIN_API_TOKEN=cBDu2B4jE712XF5jYqvx/3EjbzZpyXqv4RZiIrY+uRE=
ROUNDCUBE_DES_KEY=/kcfoC9veOcNFSSLDFRQPArXNfpamhuI

command

docker run \
    --rm \
    --name iredmail \
    --env-file iredmail-docker.conf \
    --hostname mail.el-gojo.com \
    -p 80:80 \
    -p 443:443 \
    -p 110:110 \
    -p 995:995 \
    -p 143:143 \
    -p 993:993 \
    -p 25:25 \
    -p 465:465 \
    -p 587:587 \
    -v $(pwd)/data/backup:/var/vmail/backup \
    -v $(pwd)/data/mailboxes:/var/vmail/vmail1 \
    -v $(pwd)/data/mlmmj:/var/vmail/mlmmj \
    -v $(pwd)/data/mlmmj-archive:/var/vmail/mlmmj-archive \
    -v $(pwd)/data/imapsieve_copy:/var/vmail/imapsieve_copy \
    -v $(pwd)/data/custom:/opt/iredmail/custom \
    -v $(pwd)/data/ssl:/opt/iredmail/ssl \
    -v $(pwd)/data/mysql:/var/lib/mysql \
    -v $(pwd)/data/clamav:/var/lib/clamav \
    -v $(pwd)/data/sa_rules:/var/lib/spamassassin \
    -v $(pwd)/data/postfix_queue:/var/spool/postfix \
    iredmail/mariadb:nightly

when executing the above command
it pulls image and starts container

[iRedMail] [Entrypoint] /docker/entrypoints/mariadb.sh 
[iRedMail] Create directory used to store custom config files: /opt/iredmail/custom/mysql.
[iRedMail] Initializing database ...
[iRedMail] Starting temporary MariaDB instance.
2020-10-23  8:22:08 0 [Note] mysqld (mysqld 10.4.15-MariaDB-log) starting as process 259 ...
[iRedMail] Create MariaDB root user.
[iRedMail] [Run] /docker/mariadb/pre_start/0-vmail_db.sh
[iRedMail] Create database 'vmail' and tables.
[iRedMail] Grant privileges to SQL user 'vmail' and 'vmailadmin'.
[iRedMail] Create first mail domain: el-gojo.com.
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 98: ssl_cert: Can't open file /opt/iredmail/ssl/cert.pem: No such file or directory
[iRedMail] Add user [email protected].
[iRedMail] Add (internal) mail forwarding for [email protected].
[iRedMail] Make sure [email protected] is a global admin.
[iRedMail] [Run] /docker/mariadb/pre_start/amavisd_db.sh
[iRedMail] + Create database amavisd.
[iRedMail] + Create default spam policy.
[iRedMail] [Run] /docker/mariadb/pre_start/fail2ban_db.sh
[iRedMail] + Create database fail2ban.
[iRedMail] [Run] /docker/mariadb/pre_start/iredadmin_db.sh
[iRedMail] + Create database iredadmin.
[iRedMail] [Run] /docker/mariadb/pre_start/iredapd_db.sh
[iRedMail] + Create database iredapd.
[iRedMail] + Enable greylisting.
[iRedMail] [Run] /docker/mariadb/pre_start/roundcube.sh
[iRedMail] + Import /opt/www/roundcubemail/SQL/mysql.initial.sql
[iRedMail] [Run] /docker/mariadb/pre_start/sa_bayes.sh
[iRedMail] + Create database sa_bayes.
[iRedMail] + Import sa_bayes.mysql
[iRedMail] [Entrypoint] /docker/entrypoints/dovecot.sh 
[iRedMail] Generating self-signed ssl cert under /opt/iredmail/ssl.
Generating a RSA private key
.......................++++
...........................................................................++++
writing new private key to '/opt/iredmail/ssl/key.pem'
-----
[iRedMail] Generating dh param file: /opt/iredmail/ssl/dhparam2048.pem. It make take a long time.
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
........................................+.......................................................................................................................................................................+..+......+............+............................ ......+.................................+.............................................................................................................+...............................................+........+.................................................................................................................+.......................................................+.................................+..+....................................................................................................................................................+............................................................+................................+.......................................+.................................+.............................+......+.................................................................................................................................................+....................................................................................................................................................................................................+................ ..............................................+............................................................................................................................................................+......................................................................+.......................................................................................+.......................................................................................................+.........................................+.....................................................................................+.............................................................................................................................................+...............................................................................................................................................................................................+.................................................................+...........................................................+..........................................+...................................................................+.........................................+........................................................................................................................................................................................................................................................................................................................+.......................................................................+..............+............................................+.................................................................................................................................................................+..................................................+......+..................................................................................................................................................................................................................................................................................................+.................................................................................................................................................................................................................................+......+.....................................+.........................................................................................................+...................................................+........................+...................................................................................................................................+.........+.......................................................................+........................+............................................................................................................................+............................+...............................................................................................+.......+.............+..........................+.......................+.+........................................................................................................+..........................................................................................................................................+.......+............................................................................................................+...............+..................................................................+......................................................................................................................................................+........................................................+..............................+............+.....................................................................................+.................................................................................................................................................................................+...................................................+............................................................................................................+........+...........................................................................................+.............................................................................................................................................................................................................................+................................................................................................................................................................................+..+...................................................................................................................................................................................................................................................................................................................+.............................................................................................................................................+.............................................................................................................................................................................................................................................................+..........+....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+..........................................................................................................................................................................................................................................................................................................................................................................................................................+......+......................................................................+.....................................................+...+.+..............................................+......................+................................................................................................................+...........................................................................................................................................................+........................................................................+...............................................................................+.....................................+.................................................................+.....+...........................................................................................................................................................................+.........................................................................................................................................................................................................+..........................+............................................................................................................................+....................................+...............+....................................................+................................................................................................................................+...................................................................................................................................+.....+..................+.........+.........................................................................................+...........................................................................................+........................................................................................+.........+.............................................+.........................................................................................................................................................................+.............+.........................+............................................+.........................................................................................................................................................................................................................................................................+.................................................+......+...........+.........................................................+..........................................................................................................+..............................+.......+....+........+..............................................................................................+..........................................................................+..............................+...............................................................................................................................................................................................................................................................................+.............................................+...........+.......................................................................................................+.......................................................................................................................................................................+..................................................................................................+........................+................+............................................................................................................................................................................................................+.......................................................................................................................+..............+....+........................................................................................................................................................................................................................+............................................................................................................+.....................................+...................................................................................................................................................................................+.................................................................................................................................................................................................................................................+...................................................................................................................+................................................................................................................................................+................+.............................+.............................................................................................................................................................................................................................................................................................................................................................+..........................................................+........+..............................................................................................................................+...................................................................................................................................................................+....................................+...........................................+....................................................................................................................................................................................+....................................................................................+........................+...............................+.......................................................................................................................................+...........................+...............................+.....................+................................................................................................................+.............+...............................................................................................................................................+...............................+....................................................................+.......................................................................................................................................................................................................................................................................................................+...................................................................................................................................................+..........................................................................................+.................+............+..............................................+........................................................................................+.............................................................................+.........................+...............................................................................................................................................................................+..............................+........................................................................................+...............................+...................................................................................................................................................................................................................................................................................................................................................+.....................+...................................................................................................................................................................................+...............+..........+..................................................................................................................................+..............................+............................................................................................+...............................................................................+......................+....................+..............+..........+............................................................................+..+.........................................................................................................................................+..................+.......................................................................................+.....................................................................................................................................................................................................................................................................+............................................................................................+....+................................................................................+..............................+...........................................................................................................................................................................+.......................................................................................................+.................................................+.................................................................................................+......................................................+.....................................................................................................................................................................................................................................................................................................................................................................................................................................+.......................................................................................................................................................................+.......+................................+............+.......................................................................+..................+......................................................+................................................................................................................................................................................................................................................................................................................................................................................................................................+......+.....................................................................................................................+.......................................................................+............................................................................................................................................................................................+..............................................................................................................................................................+......................................................+...................................................................................+..............................................................+..........................................................................................+.................................................................................................................................................................+...................................................................................+..............+...................................................................+................................................................................................+..................................................................................................................................................+...............................................................................................................................................................+...................................................................................................................+............................................................................................................+.......................................................................+............................................................................................................................................................................+......................................................................................................................+............................................................+...............................................................................................................................................................................................................................+..............................................................................................+...............................................................+...........................+.................+..............................................................................................................................................................................+.......................................................................................................................................................................................................+...................+.......................................................................................+..............+.+...........+...........................................................................................................+............................................................................................................................................................................................+...........+................+.........................................................................................................................................................................................................................+..............................................................................................................................+.......................................................................................................+..........................................................................................................................................................................................................+.........................................................................................................................................................................+..............................................................+...............................................................................................................+..................................................+.........................................................................................................................................................................................................................................................+.....................................................................+...........................+............................................................................................................................................................................................................+....................................................................................................+..............................................................................................................................................................+......................................................................................................................................................................................................................................................................................................................................+...............................................................................................................................................................................................................................................+..+................+........................................................................................................................................+...................................................................................................+.............................+.....................................................................+...........................................................................................................................................................................................................................................................................................................................................................................................................................+......+.............................................................................................................................................+...........................................................................................................................................................................................................................................................................................+........................................................+..+................+..+...............................................................................+....................................................................................................+........................................+..............+.............................................................................................................................................................+..........................................................................................+........................................................................................................+.........+....................................................................................................................................+.....................................................................................................................................................................................................................................................+.............+.....................................................................................................................+.................................+................................................................................................................+.......+............................................................................+.......+...................+...................................+............................................+..............................................................................................................................+.....................................................................................+..........+...........................................................................................................................................................................+....................................................+.................+..................................................................................................+........................................................................................................+............................................................................................................................................................+.................................+...........................................................................................................+...................................................................................................................................++*++*++*++*
[iRedMail] [Entrypoint] /docker/entrypoints/postfix.sh 
Generating DH parameters, 512 bit long safe prime, generator 2
This is going to take a long time
..............+.............................+...+.+....................+..+..+.........+........+...............................................+.......................+....................................+.............+....................+.......+.+............................+...................................................................................................+....+...................................+.+............................................+.......................+................................+......+.......+.....................+....+.......+.............................+.+..............+................+.................+....+......................+.........................+.......+.........................+..............+...................+...................................................................+..............++*++*++*++*++*
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmj.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmjadmin.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/iredapd.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/antispam.sh 
Private RSA key successfully written to file "/opt/iredmail/custom/amavisd/dkim/el-gojo.com.pem" (1024 bits, PEM format) 
[iRedMail] Run 'sa-update' (required by Amavisd).
Update available for channel updates.spamassassin.org: -1 -> 1882751
postdrop: warning: mail_queue_enter: create file maildrop/337544.640: No such file or directory
http: (curl) GET http://spamassassin.apache.org/updates/MIRRORED.BY, success
http: (curl) GET http://sa-update.spamassassin.org/1882751.tar.gz, success
http: (curl) GET http://sa-update.spamassassin.org/1882751.tar.gz.sha512, success
http: (curl) GET http://sa-update.spamassassin.org/1882751.tar.gz.asc, success
Update was available, and was downloaded and installed successfully
[iRedMail] Run 'freshclam' (required by ClamAV).
ClamAV update process started at Fri Oct 23 08:25:01 2020
Current working dir is /var/lib/clamav/
Querying current.cvd.clamav.net
TTL: 1769
fc_dns_query_update_info: Software version from DNS: 0.103.0
Current working dir is /var/lib/clamav/
check_for_new_database_version: No local copy of "daily" database.
query_remote_database_version: daily.cvd version from DNS: 25965
daily database available for download (remote version: 25965)
Retrieving https://database.clamav.net/daily.cvd
downloadFile: Download source:      https://database.clamav.net/daily.cvd
downloadFile: Download destination: /var/lib/clamav/tmp.9202d/clamav-fea288d65cbdbe4b41d4b9a567fcf4b5.tmp
*   Trying 104.16.218.84:443...
* Connected to database.clamav.net (104.16.218.84) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
*  start date: Aug 15 00:00:00 2020 GMT
*  expire date: Aug 15 12:00:00 2021 GMT
*  subjectAltName: host "database.clamav.net" matched cert's "database.clamav.net"
*  issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55d2fef32920)
> GET /daily.cvd HTTP/2
Host: database.clamav.net
user-agent: ClamAV/0.102.4 (OS: linux-musl, ARCH: x86_64, CPU: x86_64)
accept: */*
connection: close

postdrop: warning: mail_queue_enter: create file maildrop/337730.640: No such file or directory
postdrop: warning: mail_queue_enter: create file maildrop/337958.640: No such file or directory
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200 
< date: Fri, 23 Oct 2020 08:25:01 GMT
< content-type: application/octet-stream
< content-length: 113783228
< set-cookie: __cfduid=d47278605fc8196bac55e3d2eb559ae4e1603441501; expires=Sun, 22-Nov-20 08:25:01 GMT; path=/; domain=.clamav.net; HttpOnly; SameSite=Lax
< last-modified: Thu, 22 Oct 2020 12:59:00 GMT
< etag: "5f918214-6c831bc"
< expires: Fri, 23 Oct 2020 20:25:01 GMT
< cache-control: public, max-age=43200
< cf-cache-status: HIT
< age: 27120
< accept-ranges: bytes
< cf-request-id: 05f628bd2b0000d3d78730d000000001
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< strict-transport-security: max-age=15552000
< x-content-type-options: nosniff
< server: cloudflare
< cf-ray: 5e6a10a84c7ed3d7-JIB
< 
* Connection #0 to host database.clamav.net left intact
updatedb: Running g_cb_download_complete callback...
download_complete_callback: Download complete for database : /var/lib/clamav/tmp.9202d/clamav-fea288d65cbdbe4b41d4b9a567fcf4b5.tmp-daily.cvd
download_complete_callback:   fc_context->bTestDatabases   : 1
download_complete_callback:   fc_context->bBytecodeEnabled : 1
Testing database: '/var/lib/clamav/tmp.9202d/clamav-fea288d65cbdbe4b41d4b9a567fcf4b5.tmp-daily.cvd' ...
Loading signatures from /var/lib/clamav/tmp.9202d/clamav-fea288d65cbdbe4b41d4b9a567fcf4b5.tmp-daily.cvd
postdrop: warning: mail_queue_enter: create file maildrop/338165.640: No such file or directory
Properly loaded 4375678 signatures from /var/lib/clamav/tmp.9202d/clamav-fea288d65cbdbe4b41d4b9a567fcf4b5.tmp-daily.cvd
postdrop: warning: mail_queue_enter: create file maildrop/338358.640: No such file or directory
Database test passed.
daily.cvd updated (version: 25965, sigs: 4334114, f-level: 63, builder: raynman)
fc_update_database: daily.cvd updated.
Current working dir is /var/lib/clamav/
check_for_new_database_version: No local copy of "main" database.
query_remote_database_version: main.cvd version from DNS: 59
main database available for download (remote version: 59)
Retrieving https://database.clamav.net/main.cvd
downloadFile: Download source:      https://database.clamav.net/main.cvd
downloadFile: Download destination: /var/lib/clamav/tmp.9202d/clamav-ce310a07b8543fd9065f385bb1728678.tmp
*   Trying 104.16.218.84:443...
* Connected to database.clamav.net (104.16.218.84) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
*  start date: Aug 15 00:00:00 2020 GMT
*  expire date: Aug 15 12:00:00 2021 GMT
*  subjectAltName: host "database.clamav.net" matched cert's "database.clamav.net"
*  issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55d2fef50da0)
> GET /main.cvd HTTP/2
Host: database.clamav.net
user-agent: ClamAV/0.102.4 (OS: linux-musl, ARCH: x86_64, CPU: x86_64)
accept: */*
connection: close

postdrop: warning: mail_queue_enter: create file maildrop/338540.640: No such file or directory
postdrop: warning: mail_queue_enter: create file maildrop/338728.640: No such file or directory
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200 
< date: Fri, 23 Oct 2020 08:25:35 GMT
< content-type: application/octet-stream
< content-length: 117859675
< set-cookie: __cfduid=dcb5a0cc7440e7408d749606936dd139f1603441535; expires=Sun, 22-Nov-20 08:25:35 GMT; path=/; domain=.clamav.net; HttpOnly; SameSite=Lax
< last-modified: Mon, 25 Nov 2019 13:56:00 GMT
< etag: "5ddbdd70-706655b"
< cf-cache-status: HIT
< age: 27144
< expires: Fri, 23 Oct 2020 20:25:35 GMT
< cache-control: public, max-age=43200
< accept-ranges: bytes
< cf-request-id: 05f62943780000d3d773b1f000000001
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< strict-transport-security: max-age=15552000
< x-content-type-options: nosniff
< server: cloudflare
< cf-ray: 5e6a117f2942d3d7-JIB
< 
* Connection #0 to host database.clamav.net left intact
updatedb: Running g_cb_download_complete callback...
download_complete_callback: Download complete for database : /var/lib/clamav/tmp.9202d/clamav-ce310a07b8543fd9065f385bb1728678.tmp-main.cvd
download_complete_callback:   fc_context->bTestDatabases   : 1
download_complete_callback:   fc_context->bBytecodeEnabled : 1
Testing database: '/var/lib/clamav/tmp.9202d/clamav-ce310a07b8543fd9065f385bb1728678.tmp-main.cvd' ...
Loading signatures from /var/lib/clamav/tmp.9202d/clamav-ce310a07b8543fd9065f385bb1728678.tmp-main.cvd
Properly loaded 4564902 signatures from /var/lib/clamav/tmp.9202d/clamav-ce310a07b8543fd9065f385bb1728678.tmp-main.cvd
postdrop: warning: mail_queue_enter: create file maildrop/338930.640: No such file or directory
Database test passed.
main.cvd updated (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
fc_update_database: main.cvd updated.
Current working dir is /var/lib/clamav/
check_for_new_database_version: No local copy of "bytecode" database.
query_remote_database_version: bytecode.cvd version from DNS: 331
bytecode database available for download (remote version: 331)
Retrieving https://database.clamav.net/bytecode.cvd
downloadFile: Download source:      https://database.clamav.net/bytecode.cvd
downloadFile: Download destination: /var/lib/clamav/tmp.9202d/clamav-68ccd093d58b14b89452e8a19a48cefa.tmp
*   Trying 104.16.218.84:443...
* Connected to database.clamav.net (104.16.218.84) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
*  start date: Aug 15 00:00:00 2020 GMT
*  expire date: Aug 15 12:00:00 2021 GMT
*  subjectAltName: host "database.clamav.net" matched cert's "database.clamav.net"
*  issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55d2fef3db20)
> GET /bytecode.cvd HTTP/2
Host: database.clamav.net
user-agent: ClamAV/0.102.4 (OS: linux-musl, ARCH: x86_64, CPU: x86_64)
accept: */*
connection: close

* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200 
< date: Fri, 23 Oct 2020 08:26:05 GMT
< content-type: application/octet-stream
< content-length: 296388
< set-cookie: __cfduid=d1fc0dd31d4c4e7bd50aa146eb38a06de1603441565; expires=Sun, 22-Nov-20 08:26:05 GMT; path=/; domain=.clamav.net; HttpOnly; SameSite=Lax
< cf-bgj: h2pri
< etag: "5d83a8d0-485c4"
< last-modified: Thu, 19 Sep 2019 16:12:00 GMT
< cf-cache-status: HIT
< age: 27173
< expires: Fri, 23 Oct 2020 20:26:05 GMT
< cache-control: public, max-age=43200
< accept-ranges: bytes
< cf-request-id: 05f629b86c0000d3cf50372000000001
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< strict-transport-security: max-age=15552000
< x-content-type-options: nosniff
< server: cloudflare
< cf-ray: 5e6a123a4a78d3cf-JIB
< 
* Connection #0 to host database.clamav.net left intact
updatedb: Running g_cb_download_complete callback...
download_complete_callback: Download complete for database : /var/lib/clamav/tmp.9202d/clamav-68ccd093d58b14b89452e8a19a48cefa.tmp-bytecode.cvd
download_complete_callback:   fc_context->bTestDatabases   : 1
download_complete_callback:   fc_context->bBytecodeEnabled : 1
Testing database: '/var/lib/clamav/tmp.9202d/clamav-68ccd093d58b14b89452e8a19a48cefa.tmp-bytecode.cvd' ...
Loading signatures from /var/lib/clamav/tmp.9202d/clamav-68ccd093d58b14b89452e8a19a48cefa.tmp-bytecode.cvd
Properly loaded 95 signatures from /var/lib/clamav/tmp.9202d/clamav-68ccd093d58b14b89452e8a19a48cefa.tmp-bytecode.cvd
Database test passed.
bytecode.cvd updated (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
fc_update_database: bytecode.cvd updated.
[iRedMail] [Entrypoint] /docker/entrypoints/nginx.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/phpfpm.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/roundcube.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/fail2ban.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/iredadmin.sh 
[iRedMail] CMD: /usr/bin/supervisord -c /etc/supervisord.conf
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/amavisd.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/clamav.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/cron.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/dovecot.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/fail2ban.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/iredadmin.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/iredapd.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/mariadb.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/mlmmjadmin.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/nginx.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/phpfpm.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/postfix.conf" during parsing
2020-10-23 08:26:06,512 INFO Included extra file "/etc/supervisor.d/rsyslog.conf" during parsing
2020-10-23 08:26:06,512 INFO Set uid to user 0 succeeded
2020-10-23 08:26:06,520 INFO RPC interface 'supervisor' initialized
2020-10-23 08:26:06,521 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-10-23 08:26:06,521 INFO supervisord started with pid 1
2020-10-23 08:26:07,524 INFO spawned: 'rsyslog' with pid 808
2020-10-23 08:26:07,527 INFO spawned: 'cron' with pid 809
2020-10-23 08:26:07,530 INFO spawned: 'mariadb' with pid 810
2020-10-23 08:26:07,534 INFO spawned: 'clamav' with pid 811
2020-10-23 08:26:07,536 INFO spawned: 'dovecot' with pid 812
2020-10-23 08:26:07,537 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-23 08:26:07,539 INFO spawned: 'iredapd' with pid 816
2020-10-23 08:26:07,540 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-23 08:26:07,542 INFO spawned: 'amavisd' with pid 817
2020-10-23 08:26:07,544 INFO spawned: 'phpfpm' with pid 818
2020-10-23 08:26:07,547 INFO spawned: 'nginx' with pid 819
2020-10-23 08:26:07,549 INFO spawned: 'postfix' with pid 820
2020-10-23 08:26:07,551 INFO spawned: 'fail2ban' with pid 822
2020-10-23 08:26:07,552 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,552 INFO success: cron entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,552 INFO success: mariadb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,552 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,552 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,553 INFO success: iredapd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,553 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,553 INFO success: phpfpm entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,553 INFO success: nginx entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,553 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:07,553 INFO success: fail2ban entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-10-23 08:26:09,106 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-23 08:26:09,106 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-23 08:26:11,111 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-23 08:26:11,111 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-23 08:26:14,117 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-23 08:26:14,117 INFO gave up: iredadmin entered FATAL state, too many start retries too quickly
2020-10-23 08:26:14,118 INFO spawnerr: can't find command '/usr/bin/uwsgi'
2020-10-23 08:26:14,118 INFO gave up: mlmmjadmin entered FATAL state, too many start retries too quickly
2020-10-23 08:26:16,122 INFO reaped unknown pid 592 (exit status 0)

it get's stuck on this error
spawnerr: can't find command '/usr/bin/uwsgi'

MariaDB lost settings ?

Hello,

I've started working with latest nightly docker tag, I've maded steps described in documentation everything was working perfectly .. but after Ive made a few docker stop iredmail && docker start iredmail .. I saw that some erros occurs in docker logs

docker logs --follow iredmail

[iRedMail] [Entrypoint] /docker/entrypoints/mariadb.sh 
[iRedMail] Starting temporary MariaDB instance.
2020-06-02 23:45:51 0 [Note] mysqld (mysqld 10.4.13-MariaDB-log) starting as process 164 ...
[iRedMail] Reset password for SQL user 'root'.
[iRedMail] [Run] /docker/mariadb/pre_start/0-vmail_db.sh
ERROR 1449 (HY000) at line 1: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'vmail'@'%'
ERROR 1449 (HY000) at line 1: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'vmailadmin'@'%'
[iRedMail] Grant privileges to SQL user 'vmail' and 'vmailadmin'.
[iRedMail] Make sure [email protected] is a global admin.
[iRedMail] [Run] /docker/mariadb/pre_start/amavisd_db.sh
ERROR 1449 (HY000) at line 1: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'amavisd'@'%'
[iRedMail] [Run] /docker/mariadb/pre_start/fail2ban_db.sh
ERROR 1449 (HY000) at line 1: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'fail2ban'@'%'
[iRedMail] [Run] /docker/mariadb/pre_start/iredadmin_db.sh
ERROR 1449 (HY000) at line 1: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'iredadmin'@'%'
[iRedMail] [Run] /docker/mariadb/pre_start/iredapd_db.sh
ERROR 1449 (HY000) at line 1: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'iredapd'@'%'
[iRedMail] [Run] /docker/mariadb/pre_start/roundcube.sh
ERROR 1449 (HY000) at line 1: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'roundcube'@'%'
[iRedMail] [Run] /docker/mariadb/pre_start/sa_bayes.sh
ERROR 1449 (HY000) at line 1: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'sa_bayes'@'%'
[iRedMail] [Entrypoint] /docker/entrypoints/dovecot.sh 
[iRedMail] Generating self-signed ssl cert under /opt/iredmail/ssl.
Generating a RSA private key
......++++
.................................................................................................................................................++++
writing new private key to '/opt/iredmail/ssl/key.pem'
-----
[iRedMail] Generating dh param file: /opt/iredmail/ssl/dhparam2048.pem. It make take a long time.
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
....................................................................+.......................................................+................+.........................................................................................+.................................................................................+..........................+........................................................................+.........................................+............................................................+................+.........................................................................+.........................................................................................+......................................................................................+.................+............................+..................................................................................................................................................................+..............................+..............................................................+..................+.....+.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+....................+....................................................................+.....................................................................+.........................+...........................................................+......................................................+........................................................................................................+.....................................................................................................................................................................................................................................................................................+.......................................+............+...........................................................+........................................................................................................................................................................................................+.......................................................................................................+......+..........+..........................+...........................................................+.........................+..+....................................................................................................................................................................................................+...................................+......................................................................................................................................+..........+.................+.....................................................+..............+....................................................................................................................................................................................+.....................................................................................................................................+........................................................................................................................+................+...+..............+....................................+........+.........................+.....................................+.......................................+.....................+................................................................................................+..........................................................+.......................................................................................+................................+...................................................................+..................................................................................................................+............................................................+....................................................................................................+....................................................................................+..............................+............................................................................................................................+................................................................+.................+.......................................................................................................................+.......................................................................................................................................................................................................................................................................................+....................................................................................................................................................................................+.............+.........................................+...........................+.......................+.................................................................+...............................................+...............................................................................................................................................+...................+..............+....+................+......................................................................................................................................................................................+................+..............+.+.....................................................+..+.........................................................................+......................................................+...................................................................................................................................................................+...+...........................................+.......................................................+................++*++*++*++*
[iRedMail] [Entrypoint] /docker/entrypoints/postfix.sh 
Generating DH parameters, 512 bit long safe prime, generator 2
This is going to take a long time
..+.....+..........+.......+.................+....+.....+........+............++*++*++*++*++*
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmj.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmjadmin.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/iredapd.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/antispam.sh 
[iRedMail] Run 'sa-update' (required by Amavisd).
Update finished, no fresh updates were available
[iRedMail] [Entrypoint] /docker/entrypoints/nginx.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/phpfpm.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/roundcube.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/fail2ban.sh 
[iRedMail] [Entrypoint] /docker/entrypoints/iredadmin.sh 
[iRedMail] CMD: /usr/bin/supervisord -c /etc/supervisord.

Also i tried to look in /var/lib/mysql from container to see if there are files and it seems ok

total 188704
     4 drwxr-xr-x   11 mysql    root          4096 Jun  3 10:51 .
     8 drwxr-xr-x    1 root     root          4096 Jun  2 23:46 ..
     4 drwx------    2 mysql    mysql         4096 Jun  2 23:25 amavisd
    68 -rw-rw----    1 mysql    mysql        65536 Jun  3 10:55 aria_log.00000001
     4 -rw-rw----    1 mysql    mysql           52 Jun  3 10:51 aria_log_control
     4 drwx------    2 mysql    mysql         4096 Jun  2 23:25 fail2ban
     8 -rw-r-----    1 mysql    mysql         4114 Jun  3 10:51 ib_buffer_pool
 49152 -rw-rw----    1 mysql    mysql     50331648 Jun  3 10:55 ib_logfile0
 49152 -rw-rw----    1 mysql    mysql     50331648 Jun  2 23:25 ib_logfile1
 77824 -rw-rw----    1 mysql    mysql     79691776 Jun  3 10:55 ibdata1
 12288 -rw-rw----    1 mysql    mysql     12582912 Jun  3 10:51 ibtmp1
     4 drwx------    2 mysql    mysql         4096 Jun  2 23:25 iredadmin
     4 drwx------    2 mysql    mysql         4096 Jun  2 23:25 iredapd
     0 -rw-rw----    1 mysql    mysql            0 Jun  2 23:25 multi-master.info
     4 drwx------    2 mysql    mysql         4096 Jun  2 23:25 mysql
    68 -rw-rw----    1 mysql    mysql        61981 Jun  3 10:57 mysqld.err
     4 drwx------    2 mysql    mysql         4096 Jun  2 23:25 performance_schema
     4 drwx------    2 mysql    mysql         4096 Jun  2 23:25 roundcubemail
     4 drwx------    2 mysql    mysql         4096 Jun  2 23:25 sa_bayes
    92 -rw-rw----    1 mysql    mysql        87682 Jun  3 10:51 slow-query.log
     4 drwx------    2 mysql    mysql         4096 Jun  2 23:25 vmail

Missing pieces in quick start for newbies

First of all thank you very much for providing this easy containerised solution.

Today I gave it a shot, but for a first time user some bits in the documentation could be improved:

  1. How do I administer iredmail? "Installed softwares" lists "iRedAdmin", but it's not in "Exposed network ports".

  2. Any idea of hardware requirements? What's a good starting point for number of CPUs and amount of RAM?

  3. Maybe add a link to the other required piece of work: DNS, etc.

  4. Why are two long docker commands included? I love them, but I desperately tried to find a difference ;-)

  5. I find this way of generating the environment file a bit easier to read:

cat << EOF > iredmail-docker.conf
HOSTNAME=mail.mydomain.com
FIRST_MAIL_DOMAIN=mydomain.com
FIRST_MAIL_DOMAIN_ADMIN_PASSWORD=my-secret-password
MLMMJADMIN_API_TOKEN=$(openssl rand -base64 32)
ROUNDCUBE_DES_KEY=$(openssl rand -base64 24)
EOF

Cheers
bluepuma

TLS key has bad permissions

Somewhere during the startup of the Docker image the permissions on the TLS key is set too broadly which allow anyone on the system to be able to read the key. This is a major security problem!

I started the container as it is recommended in the README.md file in this repository. It created a self signed cert and key in the specified ssl directory as expected.

❯ ls -l ssl
total 20
-rw-r--r-- 1 root root 1919 Mar 13 21:37 cert.pem
-rw-r--r-- 1 root root 3505 Mar 13 21:37 combined.pem
-rw-r--r-- 1 root root  424 Mar 13 21:34 dhparam2048.pem
-rw-r--r-- 1 root root  156 Mar 13 21:34 dhparam512.pem
-rw-r--r-- 1 root root 1704 Mar 13 21:37 key.pem

Note the relaxed permissions on key.pem.

I then copied my cert and key in to the directory fixing the permissions on key.pem so that only the owner and group have access to the file. Upon restarting the container again, I once again find that the permissions on key.pem have once again been changed so that any user has access to the key.pem.

Unable to create db

I am getting an error on docker run. It's complaining about ibdata1. This seems to be a fairly common error for windows/mac and using docker volumes, but I'm on ubuntu 20.04.1 running docker 19.03.13 without volumes.

I searched this repo but did not see others reporting this issue. Any help would be greatly appreciated! Much thanks in advance.

docker run
--rm
--name iredmail
--env-file /opt/adc/mnt/iredmail/iredmail-docker.conf
--hostname mail.codex.in.th
-p 80:80
-p 443:443
-p 110:110
-p 995:995
-p 143:143
-p 993:993
-p 25:25
-p 465:465
-p 587:587
-v /opt/adc/mnt/iredmail/data/backup:/var/vmail/backup
-v /opt/adc/mnt/iredmail/data/mailboxes:/var/vmail/vmail1
-v /opt/adc/mnt/iredmail/data/mlmmj:/var/vmail/mlmmj
-v /opt/adc/mnt/iredmail/data/mlmmj-archive:/var/vmail/mlmmj-archive
-v /opt/adc/mnt/iredmail/data/imapsieve_copy:/var/vmail/imapsieve_copy
-v /opt/adc/mnt/iredmail/data/custom:/opt/opt/adc/mnt/iredmail/custom
-v /opt/adc/mnt/iredmail/data/ssl:/opt/opt/adc/mnt/iredmail/ssl
-v /opt/adc/mnt/iredmail/data/mysql:/var/lib/mysql
-v /opt/adc/mnt/iredmail/data/clamav:/var/lib/clamav
-v /opt/adc/mnt/iredmail/data/sa_rules:/var/lib/spamassassin
-v /opt/adc/mnt/iredmail/data/postfix_queue:/var/spool/postfix
iredmail/mariadb:stable

[iRedMail] [Entrypoint] /docker/entrypoints/mariadb.sh
[iRedMail] Create directory used to store custom config files: /opt/iredmail/custom/mysql.
[iRedMail] Initializing database ...
[iRedMail] Starting temporary MariaDB instance.
2020-11-11 2:01:45 0 [Note] mysqld (mysqld 10.4.15-MariaDB-log) starting as process 244 ...
[iRedMail] Initialization failed. Please check /var/lib/mysql/mysqld.err for more details.
adchang@kvm-mail:/opt/adc/mnt/iredmail/data$ sudo more mysql/mysqld.err
2020-11-11 2:01:44 0 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibdata1 failed with error 95
2020-11-11 2:01:44 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
2020-11-11 2:01:44 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file b
efore trying to start up again.
2020-11-11 2:01:45 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-11-11 2:01:45 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-11-11 2:01:45 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-11-11 2:01:45 0 [ERROR] Aborting
2020-11-11 2:01:45 0 [Note] InnoDB: Using Linux native AIO
2020-11-11 2:01:45 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-11-11 2:01:45 0 [Note] InnoDB: Uses event mutexes
2020-11-11 2:01:45 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-11-11 2:01:45 0 [Note] InnoDB: Number of pools: 1
2020-11-11 2:01:45 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-11-11 2:01:45 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
2020-11-11 2:01:45 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
2020-11-11 2:01:45 0 [Note] InnoDB: Completed initialization of buffer pool
2020-11-11 2:01:45 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the m
an page of setpriority().
2020-11-11 2:01:45 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specif
ied in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2020-11-11 2:01:45 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-11-11 2:01:46 0 [Note] InnoDB: Starting shutdown...
2020-11-11 2:01:46 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-11-11 2:01:46 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-11-11 2:01:46 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-11-11 2:01:46 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2020-11-11 2:01:46 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-11-11 2:01:46 0 [ERROR] Aborting

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.