lejmr/iredmail-docker

Assorted minor build and runtime warnings/errors and other issues

Closed this issue · 0 comments

During build the following errors/warnings appear:

  • chown: invalid user: 'syslog:adm'
  • tar: Removing leading `/' from member names

During the process of starting a container (not the first start, only subsequent starts) the following errors appear:

  • ./run: 18: [: X1: unexpected operator
  • ./run: 52: [: Xstopped: unexpected operator

The chown error is caused by the fact that on a normal Ubuntu system there is a system account 'syslog' that has ownership over many of the logs, but on the base image this account does not exist. iRedMail.sh, thinking it is a normal Ubuntu system, attempts to set change the ownership to a non-existent account. The solution is to set an environment variable in config-gen.sh to make it change it to the 'root' account instead.

The tar warning is not so much of a problem but can be addressed fairly easily by changing the tar commands from 'tar jcf /root/vmail.tar.bz2 /var/vmail' (and equivalents) to 'tar jcf /root/vmail.tar.bz2 -C / var/vmail'.

The run error is caused by the use of a double equal '==' equality operator in iredapd.sh. This works in the '/bin/bash' shell but is not acceptable in the '/bin/sh' shell, which is what iredapd.sh currently uses. The solution is to change '==' to '=', or use '/bin/bash'. I prefer the former.