Content
Sendmail configuration in Docker-based environment
Added by Hans Wurst over 8 years ago
Hi,
I run openproject in a docker container. Since I want to be able to configure openproject from outside the container I start it as follows, using a configuration file:
docker run -d -p 80:80 --name openproject --env-file /home/openproject/configuration.env -v /home/openproject/pgdata:/var/lib/postgresql/9.4/main -v /home/openproject/logs:/var/log/supervisor -v /home/openproject/static:/var/db/openproject openproject/community:5.0
My /home/openproject/configuration.env
file looks as follows:
SECRET_KEY_BASE=secret EMAIL_DELIVERY_METHOD=sendmail SENDMAIL_LOCATION=/usr/sbin/sendmail
When I log in as admin and go to Administration -> System Settings -> Email Notification and click on Send a test email
, I get the popup containing this message: An email was sent to my
email.de@
Tailing the /home/openproject/logs/web-stdout.log
log reveals this message after sending the test mail:
App 396 stdout: Sent mail to my@email.de (33.6ms) App 396 stdout: Redirected to http://153.96.234.121/settings/edit?tab=notifications App 396 stdout: Completed 302 Found in 322ms (ActiveRecord: 1.5ms) App 396 stdout: Started GET "/settings/edit?tab=notifications" for 127.0.0.1 at 2016-06-27 09:27:49 +0000 App 396 stdout: Processing by SettingsController#edit as HTML App 396 stdout: Parameters: {"tab"=>"notifications"}
But the problem is, that I never get an email in my mailbox. Can you please help me how to solve this? Is the openproject docker image not configured correctly for sendmail? Any hints, which log might be relevant to solve this?