Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some issues with dockerized environment #255

Closed
lispercat opened this issue Sep 16, 2019 · 1 comment
Closed

Some issues with dockerized environment #255

lispercat opened this issue Sep 16, 2019 · 1 comment

Comments

@lispercat
Copy link

lispercat commented Sep 16, 2019

hi,
I have two questions:

  1. I see no files under maildir so looks like messages are not persisted
  2. When I leave http://localhost:8025 open for some time I see a bunch of email collected there, but as soon as click on "inbox", all the messages disappear.
  3. When I send a message to mailhog with this configuration I get "Unable to store message" error

I can fix issue #2 if I remove storage related configuration from the docker

So here is the setup which doesn't work:
mail:
container_name: sp-mail
image: mailhog/mailhog
restart: always
privileged: true
tty: true
command: ["-storage=maildir", "-maildir-path=/maildir"]
ports:
- 1025:1025
- 8025:8025
volumes:
- "/home/user/mailhog/maildir:/maildir"

So here is the setup that works:
mail:
container_name: sp-mail
image: mailhog/mailhog
ports:
- 1025:1025
- 8025:8025

Please see if you can spot some issues there.
Thanks!

@lispercat
Copy link
Author

The issues is solved by providing user: root to the docker-compose file.
The reason for that is the folder /maildir has the root owner/group and 755 permission.
By default the Mailhog process is started as "mailhog" user so it doesn't have write permission to the /maildir folder. So we need to start it as a "root" user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant