Hello. I just switched to from my old mail server to mailcow yesterday. Really like what I see in mailcow.
This morning I see a bunch of warnings about permissions. Doing some research I found that mailcow should have been installed all as root. If true, it’s a basic step I failed.
In trying to fix the permission I’ve made it so I can’t even start it back up after I did a docker compose down. when I do the up I get this error:
service “postfix” has neither an image nor a build context specified: invalid compose project
I’ve gone over my docker-compose.yml and cannot find anything wrong, and I haven’t changed it in days. I had just been doing docker restarts with any changes, rather than taking everything down.
The postfix section of docker-compse.yml looks like:
postfix-mailcow:
image: mailcow/postfix:1.79
depends_on:
mysql-mailcow:
condition: service_started
unbound-mailcow:
condition: service_healthy
volumes:
- ./data/hooks/postfix:/hooks:Z
- ./data/conf/postfix:/opt/postfix/conf:z
- ./data/assets/ssl:/etc/ssl/mail/:ro,z
- postfix-vol-1:/var/spool/postfix
- crypt-vol-1:/var/lib/zeyple
- rspamd-vol-1:/var/lib/rspamd
- mysql-socket-vol-1:/var/run/mysqld/
environment:
- LOG_LINES=${LOG_LINES:-9999}
- TZ=${TZ}
- DBNAME=${DBNAME}
- DBUSER=${DBUSER}
- DBPASS=${DBPASS}
- REDIS_SLAVEOF_IP=${REDIS_SLAVEOF_IP:-}
- REDIS_SLAVEOF_PORT=${REDIS_SLAVEOF_PORT:-}
- REDISPASS=${REDISPASS}
- MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME}
- SPAMHAUS_DQS_KEY=${SPAMHAUS_DQS_KEY:-}
cap_add:
- NET_BIND_SERVICE
ports:
- “${SMTP_PORT:-25}:25”
- “${SMTPS_PORT:-465}:465”
- “${SUBMISSION_PORT:-587}:587”
restart: always
dns:
- ${IPV4_NETWORK:-172.35.1}.254
networks:
mailcow-network:
ipv4_address: ${IPV4_NETWORK:-172.35.1}.253
aliases:
- postfix
The mailcow images are all on the docker host (ubuntu server).
I also have a docker-compose.override.yml that specifies mynetworks for postfix:
services:
postfix:
environment:
- “POSTFIX_mynetworks=127.0.0.0/8 192.168.1.0/24”
I did modify these files for personal settings:
git status
On branch master
Your branch is up to date with ‘origin/master’.
Changes not staged for commit:
(use “git add <file>…” to update what will be committed)
(use “git restore <file>…” to discard changes in working directory)
modified: data/assets/ssl-example/cert.pem
modified: data/assets/ssl-example/key.pem
modified: data/conf/dovecot/dovecot.conf
modified: data/conf/postfix/main.cf
modified: data/conf/rspamd/rspamd.conf.local
modified: data/conf/rspamd/rspamd.conf.override
modified: docker-compose.yml
Untracked files:
(use “git add <file>…” to include in what will be committed)
data/conf/dovecot/ssl
data/conf/nginx/ssl
data/conf/postfix/ssl
no changes added to commit (use “git add” and/or “git commit -a”)
Should all files under mailcow-dockerized be owned by root?
Any idea what the error would be pointing to?
Can anyone point me in a direction? Since I have been running it since yesterday, I’d prefer not to lose what I had setup.
Help is appreciated.
Sorry, can’t figure out how to get the formatting to stick.
Sorry, couldn’t figure out how to get the formatting to stick.