docker-mailserver: Not able to start docker image
Tried following the getting started guide but I keep getting these logs:
Other
Description
mailserver | 2022-07-30 16:12:19,504 INFO exited: dovecot (exit status 89; not expected)
mailserver | 2022-07-30 16:12:19,504 DEBG received SIGCHLD indicating a child quit
mailserver | 2022-07-30 16:12:19,505 INFO success: amavis entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mailserver | 2022-07-30 16:12:19,507 INFO spawned: 'dovecot' with pid 2613
mailserver | 2022-07-30 16:12:19,534 DEBG 'dovecot' stderr output:
mailserver | Error: bind(/var/spool/postfix/private/auth) failed: Invalid argument
mailserver |
mailserver | 2022-07-30 16:12:19,534 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mailserver | 2022-07-30 16:12:19,535 DEBG 'dovecot' stderr output:
mailserver | Error: service(auth): net_listen_unix(/var/spool/postfix/private/auth) failed: Invalid argument
mailserver | Fatal: Failed to start listeners
Steps followed
- Ran this command
DMS_GITHUB_URL='https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master'
wget "${DMS_GITHUB_URL}/docker-compose.yml"
wget "${DMS_GITHUB_URL}/mailserver.env"
wget "${DMS_GITHUB_URL}/setup.sh"
chmod a+x ./setup.sh
- Added a new email using
./setup.sh email add <user@domain> [<password>]
- Created DKIM keys.
./setup.sh [-Z] config dkim
- Ran the image
docker-compose up -d mailserver
But it did not run, gives the above logs
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16 (8 by maintainers)
This also happens on my Apple M1 (macOS Monterey V 12.6). I also used the default docker-compose file:
Think it’s relevant to keep this issue open, as it still seems to be a problem when running on a MacOS server.
We already have someone who had related issues from Podman AFAIK due to chroot capability being disabled by default or something. Probably better to wait until Dovecot and PostSRSd have also opted out of chroot.
I’m a bit behind schedule but plan to get to that this week.
@polarathene makes sense, I’ll dig into it and report back, had hit problems with how Docker for mac handles sockets in the past when trying to get SSH Agent forwarding working.
EDIT: This comment is about the file having a permission error, rather than an invalid argument error, but might be relevant.
@johnmccabe if you are able to reproduce, it’s possible a
user-patches.shas described recently in this discussion could fix the problem.If we can get some confirmation that a workaround like that does resolve it, then we can add that to our startup scripts I think as a fix. It might be that this file is persisted to a volume mount and the container is restarted later but didn’t expect this file to have persisted.
Alternatively trying
ONE_DIR=0should also fix it (the default isONE_DIR=1for putting our mail state into a single volume location, instead of many mounts for each service)I’m not able to replicate this on my M1 MacMini now.
😅 Ok so this is unexpected but makes sense. Sure will use a Linux VM.
I am using intel Mac right now.
Great, I believe that’s likely the issue then. Here are some related issues around
/var/spool/postfix/private/auth:I made some efforts to help investigate but the reporters stopped looking into it. I don’t think any of the regular maintainers use macOS or have access to a mac system to investigate further unfortunately.
Chances are this is something specific to the macOS environment or it’s implementation for Docker. You normally wouldn’t deploy DMS to a mac server, so for local testing perhaps try running Docker in a linux VM guest. Chances are that will work.
Following the steps you mentioned, DMS starts fine for me.
What does your docker-compose.yml looks like? Did you change anything to the default configuration, especially SSL settings? If so, check if the certificate is correctly mounted and the correct path is configured.
var/spool/postfix/private/authisn’t created by Dovecot, when there are certificate issues.