diff --git a/build-all.sh b/build-all.sh index ee8ae793..c09c645e 100755 --- a/build-all.sh +++ b/build-all.sh @@ -1,10 +1,14 @@ #!/bin/bash +/bin/bash port-check.sh +[[ $? != 0 ]] && exit 1 /bin/bash build-network.sh /bin/bash build-pdns.sh + [[ $? != 0 ]] && exit 1 for buildx in $(ls build-*.sh | grep -vE "all|network|pdns"); do echo "Starting build file ${buildx} ..." /bin/bash ${buildx} done + /bin/bash fix-permissions.sh diff --git a/build-postfix.sh b/build-postfix.sh index 45fc4462..4531848b 100755 --- a/build-postfix.sh +++ b/build-postfix.sh @@ -36,15 +36,10 @@ else build fi -sed -i "/myhostname/c\myhostname=${MAILCOW_HOSTNAME}" data/conf/postfix/main.cf sed -i "/^user/c\user = ${DBUSER}" data/conf/postfix/sql/* sed -i "/^password/c\password = ${DBPASS}" data/conf/postfix/sql/* sed -i "/^dbname/c\dbname = ${DBNAME}" data/conf/postfix/sql/* -if [[ -z $(cat data/conf/postfix/main.cf | grep ${DOCKER_SUBNET}) ]]; then - sed -i -e "s_^mynetworks.*_& ${DOCKER_SUBNET}_" data/conf/postfix/main.cf -fi - docker run \ -p ${SMTP_PORT}:25 \ -p ${SMTPS_PORT}:465 \ diff --git a/build-sql.sh b/build-sql.sh index 2145d17a..723b303e 100755 --- a/build-sql.sh +++ b/build-sql.sh @@ -7,6 +7,7 @@ NAME="mariadb-mailcow" reconf() { echo "Installing database schema (this will not overwrite existing data)" echo "It may take a while for MariaDB to warm up, please wait..." + echo docker exec ${NAME} mysql -u${DBUSER} -p${DBPASS} ${DBNAME} until docker exec ${NAME} /bin/bash -c "mysql -u'${DBUSER}' -p'${DBPASS}' ${DBNAME} < /assets/init.sql"; do echo "Trying again in 2 seconds..." sleep 2 diff --git a/mailcow.conf b/mailcow.conf index 7a0143e8..6c309d2b 100644 --- a/mailcow.conf +++ b/mailcow.conf @@ -3,13 +3,13 @@ # Default admin user is "admin" # Default password is "moohoo" -MAILCOW_HOSTNAME=logs.servercow.de +MAILCOW_HOSTNAME=mail.example.org # SQL database configuration DBNAME=mailcow DBUSER=mailcow DBPASS=mysafepasswd -DBROOT=myverysafepasswd +DBROOT=myothersafepasswd # MariaDB DBVERS=latest @@ -25,7 +25,7 @@ NGINXVERS="stable" # You should leave that alone # Can also be 11.22.33.44:25 or 0.0.0.0:465 etc. for specific binding -SMTP_PORT=26 +SMTP_PORT=25 SMTPS_PORT=465 SUBMISSION_PORT=587 IMAP_PORT=143